Certified Data Engineer Associate Exam QuestionsBrowse all questions from this exam

Certified Data Engineer Associate 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?

Show Answer
Correct Answer: AD

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

7 comments
Sign in to comment
jetplanesOption: A
May 9, 2024

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.

Ivan_PetrovOption: A
May 10, 2024

Answer should be A as data was deleted table was managed

PreranaCOption: A
May 22, 2024

A - Both Data was deleted as well along with Metadata

THC1138Option: A
May 25, 2024

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

31cadd7Option: A
Jun 14, 2024

it's A

yolandiOption: A
Jun 22, 2024

also go with A

3fbc31bOption: A
Jul 8, 2024

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.