
Answer-first summary for fast verification
Answer: The table was managed
When a managed table is dropped in Spark SQL, both the data files and the metadata are deleted from the file system. This is because managed tables are fully controlled by Spark, including their storage locations and lifecycle.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
In a scenario where a data engineer is working with Spark SQL and attempts to delete a table named 'my_table' by executing the command: DROP TABLE IF EXISTS my_table;, the engineer observes that both the data files and metadata files related to the table are removed from the file system. What is the underlying reason for the deletion of all associated files?
A
The table was managed
B
The table's data was smaller than 10 GB
C
The table did not have a location
D
The table was external
No comments yet.