Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam Certified Data Engineer Associate All Questions

View all questions & answers for the Certified Data Engineer Associate exam

Exam Certified Data Engineer Associate topic 1 question 23 discussion

Actual exam question from Databricks's Certified Data Engineer Associate
Question #: 23
Topic #: 1
[All Certified Data Engineer Associate Questions]

A data engineer is attempting to drop a Spark SQL table my_table. The data engineer wants to delete all table metadata and data.
They run the following command:

DROP TABLE IF EXISTS my_table -
While the object no longer appears when they run SHOW TABLES, the data files still exist.
Which of the following describes why the data files still exist and the metadata files were deleted?

  • A. The table’s data was larger than 10 GB
  • B. The table’s data was smaller than 10 GB
  • C. The table was external
  • D. The table did not have a location
  • E. The table was managed
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
80370eb
3 months, 2 weeks ago
Selected Answer: C
C. The table was external When dropping an external table in Spark SQL, only the metadata is removed. The actual data files remain in their original location because they are not managed by Spark but by the external source.
upvoted 1 times
...
SerGrey
10 months, 3 weeks ago
Selected Answer: C
C is correct
upvoted 1 times
...
hemanthgvsk
1 year, 1 month ago
THE QUESTION SHOULD BE "Which of the following describes why the metadata files still exist and the data files were deleted?"
upvoted 1 times
...
vctrhugo
1 year, 2 months ago
Selected Answer: C
C. The table was external The reason why the data files still exist while the metadata files were deleted is because the table was external. When a table is external in Spark SQL (or in other database systems), it means that the table metadata (such as schema information and table structure) is managed externally, and Spark SQL assumes that the data is managed and maintained outside of the system. Therefore, when you execute a DROP TABLE statement for an external table, it removes only the table metadata from the catalog, leaving the data files intact. On the other hand, for managed tables (option E), Spark SQL manages both the metadata and the data files. When you drop a managed table, it deletes both the metadata and the associated data files, resulting in a complete removal of the table.
upvoted 2 times
...
surrabhi_4
1 year, 7 months ago
Selected Answer: C
Option C
upvoted 2 times
...
XiltroX
1 year, 7 months ago
Selected Answer: C
C is the correct answer. For external tables, you need to go to the specific location using DESCRIBE EXTERNAL TABLE command and delete all files.
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...