Which of the following describes the result of running this command?

After running DESCRIBE EXTENDED accounts.customers;, the following was returned:

Now, a data analyst runs the following command:

DROP accounts.customers;

Which of the following describes the result of running this command?
A . Running SELECT * FROM delta. `dbfs:/stakeholders/customers` results in an error.
B . Running SELECT * FROM accounts.customers will return all rows in the table.
C . All files with the .customers extension are deleted.
D . The accounts.customers table is removed from the metastore, and the underlying data files are deleted.
E . The accounts.customers table is removed from the metastore, but the underlying data files are untouched.

Answer: E

Explanation:

the accounts.customers table is an EXTERNAL table, which means that it is stored outside the default warehouse directory and is not managed by Databricks. Therefore, when you run the DROP command on this table, it only removes the metadata information from the metastore, but does not delete the actual data files from the file system. This means that you can still access the data using the location path (dbfs:/stakeholders/customers) or create another table pointing to the same location. However, if you try to query the table using its name (accounts.customers), you will get an error because the table no longer exists in the metastore.

Reference: DROP TABLE | Databricks on AWS, Best practices for dropping a managed Delta Lake table – Databricks

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments