Databricks Data Engineer Associate Question 91
Single answerWhen writing a SQL query in Databricks to access a Delta table, which prefix is included after the FROM keyword to specify the data type?
- A
delta.
<path_to_table> - B
parquet.
<path_to_table> - C
json.
<path_to_file> - D
csv.
<path_to_file>
Show answer and explanation
Correct answer: A
Explanation
In Databricks SQL, the delta.<path_to_table> prefix is used to specify that the data being queried is stored in a Delta table. This prefix is unique to Delta Lake and ensures that the query leverages Delta Lake's features such as ACID transactions, versioning, and schema enforcement.
- A. Correct.
This is the correct prefix for accessing Delta tables in Databricks using SQL. The delta keyword indicates that the data source is a Delta table, and it is followed by the file path or directory enclosed in backticks.
- B. Incorrect.
This prefix is used to access data in Parquet format, not Delta tables. While Parquet is supported in Databricks, it is not the correct prefix for Delta tables.
- C. Incorrect.
This prefix is used to access JSON files, not Delta tables. JSON is another supported data format but is unrelated to Delta-specific queries.
- D. Incorrect.
This prefix is used to access CSV files, not Delta tables. CSV is a supported format but does not pertain to Delta tables.