Databricks Data Engineer Associate Question 95
Select 4While querying a Delta table in Databricks, you want to include a prefix after the FROM keyword to specify the data type of the source table. Which of the following prefixes can be used?
- A
delta
- B
parquet
- C
csv
- D
json
- E
orc
- F
avro
Show answer and explanation
Correct answers: A, B, D, E
Explanation
In Databricks, the prefix after the FROM keyword is used to specify the data type or source format of the table being queried. Prefixes like 'delta', 'parquet', 'json', and 'orc' are valid because these formats can be directly referenced in SQL queries. However, formats like 'csv' and 'avro' require specific read functions and cannot be used as prefixes in this context.
- A. Correct.
The 'delta' prefix is valid as it specifies a Delta table as the data type. It is commonly used in Delta Lake queries.
- B. Correct.
The 'parquet' prefix is valid, allowing you to query Parquet files directly within Databricks.
- C. Incorrect.
The 'csv' prefix is not valid after the FROM keyword. CSV files are typically read using specific functions like spark.read.csv().
- D. Correct.
The 'json' prefix is valid, allowing you to query JSON files directly within Databricks.
- E. Correct.
The 'orc' prefix is valid, enabling direct querying of ORC files in Databricks.
- F. Incorrect.
The 'avro' prefix is not valid in this context. Avro files are also typically handled using specific read functions rather than as a prefix.