Exam Certified Data Engineer Associate All QuestionsBrowse all questions from this exam
Question 103

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 and metadata files have been deleted from the file system.

What is the reason behind the deletion of all these files?

    Correct Answer: A

    When a managed table is dropped in Spark SQL, both the metadata and the data files are deleted. In contrast, if an external table were dropped, only the metadata would be removed, leaving the data files intact. Therefore, the deletion of both data and metadata files indicates that the table was managed.

Discussion
jetplanesOption: A

The answer should be A --> the table was MANAGED. If the metadata and the underlined files have been deleted, then this is a MANAGED table and not an external table.

3fbc31bOption: A

The correct answer is A. BOTH data and metadata were deleted meaning the table was managed. If the metadata was gone, but the actual data files themselves were still there then it would be an external table.

yolandiOption: A

also go with A

31cadd7Option: A

it's A

THC1138Option: A

For D to be correct, the metadata would have been deleted, but the data would still exist. The answer is A

PreranaCOption: A

A - Both Data was deleted as well along with Metadata

Ivan_PetrovOption: A

Answer should be A as data was deleted table was managed