Databricks Data Engineer Associate Question 258
Select 2You are working with a Databricks workspace, and your task is to identify the storage location of a managed Delta table named sales_data. Which of the following methods will correctly provide the storage location of the table?
- A
Query the
locationcolumn of theSHOW TABLEScommand output for thesales_datatable. - B
Run the command
DESCRIBE EXTENDED sales_dataand check theLocationfield in the result. - C
Look for the table location in the metadata of the Databricks workspace UI under the ‘Data’ tab.
- D
Run the
DESCRIBE HISTORY sales_datacommand and check theLocationfield in the output. - E
Run the command
SHOW CREATE TABLE sales_dataand examine the returned SQL statement for theLOCATIONclause.
Show answer and explanation
Correct answers: B, E
Explanation
To identify the storage location of a table in Databricks, the most accurate methods are using the DESCRIBE EXTENDED command, which explicitly shows the Location field, or using the SHOW CREATE TABLE command, which provides the SQL definition of the table, including the LOCATION clause. Other methods like SHOW TABLES or the Databricks UI do not provide the storage location directly.
- A. Incorrect.
The
SHOW TABLEScommand provides a list of tables but does not include the storage location of the table in its output. - B. Correct.
The
DESCRIBE EXTENDEDcommand provides detailed metadata about the table, including theLocationfield, which specifies the storage location. - C. Incorrect.
The Databricks workspace UI under the ‘Data’ tab lists tables and their schema but does not explicitly show the storage location of a managed Delta table.
- D. Incorrect.
The
DESCRIBE HISTORYcommand provides historical changes to the Delta table but does not include the storage location of the table. - E. Correct.
The
SHOW CREATE TABLEcommand outputs the SQL statement used to create the table. For managed tables, it includes theLOCATIONclause, which specifies the storage location.