Databricks Data Engineer Associate Question 260
Single answerYou are working with a Databricks workspace and need to determine the storage location of a Delta table named 'sales_data' that resides in the catalog 'main' and schema 'analytics'. Which of the following commands would you use to identify the table's location?
- A
DESCRIBE DETAIL main.analytics.sales_data
- B
SHOW TABLES IN main.analytics
- C
SELECT * FROM main.analytics.sales_data
- D
DESCRIBE SCHEMA main.analytics
Show answer and explanation
Correct answer: A
Explanation
To identify the storage location of a Delta table in Databricks, the DESCRIBE DETAIL command should be used. This command returns detailed metadata, including the table's storage path, which is necessary when working with table data at the file system level or troubleshooting storage issues.
- A. Correct.
This is the correct command. The
DESCRIBE DETAILcommand provides detailed metadata about the table, including its storage location. - B. Incorrect.
This command lists tables in the specified schema, but it does not provide storage location details.
- C. Incorrect.
This is a query to retrieve data from the table, but it does not provide metadata such as the storage location.
- D. Incorrect.
This command provides schema-level details, such as properties and comments, but not the storage location of a specific table.