A Delta Lake table was created with the below query:
Consider the following query:
DROP TABLE prod.sales_by_store -
If this statement is executed by a workspace admin, which result will occur?
A Delta Lake table was created with the below query:
Consider the following query:
DROP TABLE prod.sales_by_store -
If this statement is executed by a workspace admin, which result will occur?
In Delta Lake, when a DROP TABLE command is executed on a managed table, it will remove both the metadata entry for the table from the catalog and the data in storage associated with that table. This means that both the table definition and the data itself are deleted. Therefore, the correct answer is that the table will be removed from the catalog and the data will be deleted.
According to the exam courses answer is C, for a managed table dropped. But, as after Nov'23, UNDROP is introduced and I have test it working with UC managed tables. https://docs.databricks.com/en/sql/language-manual/sql-ref-syntax-ddl-undrop-table.html However, I don't see any official doc says UNDROP related to 'time travel'. So, be aware of the above info; in exam, watch the question carefully if it is updated.
In Delta Lake, when a DROP TABLE command is executed, it removes both the metadata entry for the table from the catalog and the data in storage associated with that table. Workspace administrators typically have the necessary permissions to drop tables, and unless there are additional protections or retention policies in place, the data is not recoverable through normal operations after the table is dropped.
C. is only correct statement. Though the table can be UNDROP in 7 days https://learn.microsoft.com/en-us/azure/databricks/sql/language-manual/sql-ref-syntax-ddl-undrop-table E. Time Travel can retrieve versioned records but not tables. https://www.databricks.com/blog/2019/02/04/introducing-delta-time-travel-for-large-scale-data-lakes.html
C : AS SELECT - Managed table Will remove table and data
I meant C is correct, not D
I think E is better answer
E. Since the table is still recoverable from transaction logs.
D is most correct
Answer is C as it is a managed table
it is a managed table
its a as it is managed table
it is a managed table. So both table def and data will be deleted
Drop will usually delete the table structure and data if its managed, hence c