What is the best way to query external csv files located on DBFS Storage to inspect the data using SQL?

What is the best way to query external csv files located on DBFS Storage to inspect the data using SQL?
A . SELECT * FROM ‘dbfs:/location/csv_files/’ FORMAT = ‘CSV’
B. SELECT CSV. * from ‘dbfs:/location/csv_files/’
C. SELECT * FROM CSV. ‘dbfs:/location/csv_files/’
D. You can not query external files directly, us COPY INTO to load the data into a table first
E. SELECT * FROM ‘dbfs:/location/csv_files/’ USING CSV

Answer: C

Explanation:

Answer is, SELECT * FROM CSV. ‘dbfs:/location/csv_files/’

you can query external files stored on the storage using below syntax SELECT * FROM format.`/Location` format – CSV, JSON, PARQUET, TEXT

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments