Q: 19
A data engineer needs to create a table in Databricks using data from a CSV file at location
/path/to/csv.
They run the following command:
Which of the following lines of code fills in the above blank to successfully complete the task?
Which of the following lines of code fills in the above blank to successfully complete the task?Options
Discussion
B , USING CSV is right for Databricks. FROM CSV is an easy trap, seen that in similar practice sets before.
B , Databricks SQL expects USING CSV to define the file format when creating an external table. FROM is for specifying the path but not the format, so using FROM CSV wouldn't make sense syntactically. Seen this in practice tests too, but open to correction if I'm missing something.
Its C, this one is super straightforward compared to similar questions I’ve seen.
Trick is format vs path, so B in this specific SQL context.
B , USING CSV specifies the format for the source data, which is required in Databricks CREATE TABLE commands. FROM CSV is a common trap but it's not valid syntax. Seen this catch folks out before, agree with the others here.
Had something like this in a mock, pretty sure it's B. In Databricks SQL, you use
USING CSV to specify the file format when creating the table.Be respectful. No spam.