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 65 discussion

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

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.

Which of the following describes why all of these files were deleted?

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

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
benni_ale
7 months ago
Selected Answer: A
A is correct
upvoted 1 times
...
UGOTCOOKIES
10 months ago
Selected Answer: A
Two types of tables, managed and external. Both table types are treated the same, except when the table is dropped. For a managed table the data is stored in the managed storage location that is configured to the meta store. By default this is dbfs:/user/hive/warehouse. When the table is dropped the meta data and the underlying data is deleted. For external tables the data is stored in a cloud storage location outside of the managed storage location. The underlying data is retained when an external table is dropped, only the metadata is dropped.
upvoted 2 times
...
Garyn
11 months ago
Selected Answer: A
A. The table was managed. Explanation: In Spark SQL, when a table is managed (or internal), both the metadata that contains information about the table and the actual data files associated with the table are managed by the SQL engine. The DROP TABLE command, when used on a managed table, deletes not only the metadata but also the underlying data files associated with that table from the file system. When a managed table is dropped, it removes all information about the table, including metadata and data files, leading to the deletion of both the metadata and data files from the file system. Options B, C, D, and E don't specifically relate to why the data files and metadata files were deleted. The fact that the table was managed (or internal) is the reason for the removal of both the metadata and data files when the table was dropped using the DROP TABLE command.
upvoted 1 times
...
kz_data
11 months, 3 weeks ago
Selected Answer: A
A is correct
upvoted 2 times
...
meow_akk
1 year, 1 month ago
A is correct , managed tables files and metadata are managed by metastore and will be deleted when the table is dropped . while external tables the metadata is stored in a external location. hence when a external table is dropped you clear off only the metadata and the files (data) remain.
upvoted 4 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 ...