A managed table and an unmanaged external table were both created in Databricks SQL, and data was ingested into each table. Later, both tables were dropped.
What is the status of data for each of those tables?
A.
The data in both tables were deleted.
B.
The data in the managed table were deleted, and the data in the unmanaged external table were left untouched.
C.
The data in the unmanaged external table were deleted, and the data in the managed table were left untouched.
Option B is correct. In Databricks, when a managed table is dropped, Databricks removes the table and its associated managed storage location. For an external table, Databricks removes only the table metadata; the underlying external data files are not deleted. Therefore, dropping both tables deletes the managed table’s data but leaves the external table’s data untouched. Official Databricks documentation states that DROP TABLE “deletes the table and removes the directory associated with the table from the file system if the table is not an EXTERNAL table,” and for external tables, Unity Catalog “removes the table metadata but does not delete the underlying data files.”
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit