Databricks Data Engineer Associate Question 244
Select 4A data engineering team is deciding whether to use managed or external tables in their Databricks Lakehouse architecture. They want the flexibility to directly manage the underlying data files stored in a cloud object storage system. Which of the following statements accurately represent the characteristics of managed and external tables to help them make the correct choice?
- A
Managed tables store metadata and data under Databricks' control, and Databricks manages the lifecycle of both.
- B
External tables allow users to store data in a location outside of Databricks' control, but Databricks manages the metadata.
- C
Dropping a managed table deletes both the table data and metadata from Databricks.
- D
Dropping an external table deletes the table data but retains the metadata.
- E
External tables provide users full control over the location and lifecycle of the data files.
Show answer and explanation
Correct answers: A, B, C, E
Explanation
The key difference between managed and external tables lies in who controls the data files. Managed tables are fully managed by Databricks, meaning it handles both the metadata and the data. Dropping a managed table removes both from the system. External tables, on the other hand, store metadata in Databricks but allow users to manage the data files themselves, so dropping an external table only removes its metadata while leaving the data intact.
- A. Correct.
This is correct. For managed tables, Databricks handles both the metadata and the storage of the underlying data in a default directory.
- B. Correct.
This is correct. External tables allow users to store data in external locations (e.g., cloud object storage), while Databricks only manages the metadata.
- C. Correct.
This is correct. For managed tables, dropping the table removes both its metadata and data from Databricks.
- D. Incorrect.
This is incorrect. Dropping an external table only removes the metadata from Databricks, leaving the underlying data intact.
- E. Correct.
This is correct. External tables give users complete control over the data files, including where they are stored and how they are managed.