DATABRICKS-CERTIFIED-DATA-ENGINEER-ASSOCIATE · Question #76
A data engineer is attempting to drop a Spark SQL table my_table and runs the following command: DROP TABLE IF EXISTS my_table; After running this command, the engineer notices that the data files…
The correct answer is A. The table was managed. In Spark SQL and Databricks, there are two types of tables: managed and external. For a managed (internal) table, Spark controls both the metadata in the metastore and the underlying data files. When you DROP a managed table, Spark deletes both the metadata and the actual data…
Question
Options
- AThe table was managed
- BThe table's data was smaller than 10 GB
- CThe table's data was larger than 10 GB
- DThe table was external
- EThe table did not have a location
How the community answered
(26 responses)- A92% (24)
- C4% (1)
- E4% (1)
Explanation
In Spark SQL and Databricks, there are two types of tables: managed and external. For a managed (internal) table, Spark controls both the metadata in the metastore and the underlying data files. When you DROP a managed table, Spark deletes both the metadata and the actual data files from storage. For an external table, only the metadata is removed - the data files remain intact. Because both data and metadata were deleted after DROP TABLE, the table must have been managed.
Topics
Community Discussion
No community discussion yet for this question.