
Answer-first summary for fast verification
Answer: `map("delimiter", "\\t", "header", "true"))`
To correctly use Auto Loader in Delta Live Tables for ingesting tab-delimited CSV files with headers, the `cloud_files()` function requires specific format options. The correct syntax involves using the `map()` function to pass these options as key-value pairs. The appropriate option is `map("delimiter", "\\t", "header", "true"))`, where "delimiter" specifies the tab character (`\\t`) as the field separator and "header" indicates the presence of a header line in the files. This approach ensures that Auto Loader can efficiently process the files incrementally, adhering to the specified format requirements.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
A data engineering team is transitioning their existing data pipeline to use Auto Loader in Delta Live Tables for incremental processing of CSV files. These files are tab-delimited and include a header in the first line. A data engineer has prepared the following code snippet for this task: CREATE OR REFRESH STREAMING LIVE TABLE customers AS SELECT * FROM cloud_files("/databricks-datasets/retail-org/customers/", "csv", ____). Which of the following options correctly completes the cloud_files() function to utilize Auto Loader for data ingestion?
A
options("delimiter", "\\t", "header", "true"))
B
map("delimiter", "\\t", "header", "true"))
C
options("lineSep", "\\t", "header", "true"))
D
map("lineSep", "\\t", "header", "true"))
E
map("delimiter", "\xa0 \xa0 ", "header", "true"))
No comments yet.