Databricks Data Engineer Associate Question 259
Select 3You are tasked with identifying the location of a table named sales_data in a Databricks workspace. The table is registered in the metastore. Which of the following methods can you use to determine the table's location?
- A
Run the command DESCRIBE EXTENDED sales_data and check the location field in the output.
- B
Query the metastore directly using a SQL command such as SELECT * FROM information_schema.tables WHERE table_name = 'sales_data'.
- C
Navigate to the Data tab in the Databricks workspace UI and check the table's details.
- D
Use the Databricks REST API to retrieve metadata about the
sales_datatable. - E
Run the command SHOW TABLES and check the output for the table's location.
Show answer and explanation
Correct answers: A, C, D
Explanation
To identify the location of a table in Databricks, you can use commands like DESCRIBE EXTENDED, explore the table's metadata through the UI, or leverage the Databricks REST API to retrieve the necessary details. While the SHOW TABLES command and querying the metastore provide some metadata, they do not reveal the physical storage location of the table.
- A. Correct.
This option is correct. The DESCRIBE EXTENDED command provides detailed metadata about the table, including its storage location.
- B. Incorrect.
This option is incorrect. While querying the metastore can return information about tables, it does not include the physical storage location of the table.
- C. Correct.
This option is correct. The Databricks workspace UI allows you to view metadata about tables, including their storage locations, through the Data tab.
- D. Correct.
This option is correct. The Databricks REST API can be used to retrieve table metadata, including the storage location.
- E. Incorrect.
This option is incorrect. The SHOW TABLES command lists tables and their database but does not provide details about their locations.