
Answer-first summary for fast verification
Answer: USING CSV
To create a table in Databricks using data from a CSV file, you need to specify the format of the source data. The correct syntax after specifying the table name and schema (if applicable) is to use the USING CSV clause. This tells Databricks that the data source format is CSV.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
A data engineer is working on setting up a new table in Databricks that should directly read its data from an existing CSV file located at '/path/to/csv'. To achieve this, the engineer intends to use the CREATE TABLE statement. Considering that they need to specify the format of the input data as part of this SQL command, the engineer runs the following command: CREATE TABLE my_table <fill in the blank> LOCATION '/path/to/csv' Which of the following lines of code correctly completes the command, specifying the necessary format to accurately read and create the table from the CSV file?
A
None of these lines of code are needed to successfully complete the task
B
USING CSV
C
FROM CSV
D
USING DELTA
E
FROM "path/to/csv"