The DROP TABLE SQL removes an OTF table in the OTF metadata. The user must specify if the manifests and data should also be removed or just remove the table definition in the catalog.
Syntax
DROP TABLE <datalake_name>.<OTFdatabase_name>.<OTFtable_name> {PURGE ALL | NO PURGE}; <datalake_name> ::= !! name of the data lake object <OTFdatabase_name> ::= !! name of the database in the OTF catalog <OTFtable_name> ::= !! name of the OTF table
Example
DROP TABLE datalake_glue.MyDatabase.Tab2 PURGE ALL;
Usage Considerations
Either the PURGE ALL or the NO PURGE clause must be specified.
- PURGE ALL removes the table entry from the catalog and deletes the manifests and data files.
- NO PURGE removes the table entry from the catalog only. This is useful if the data is shared with another catalog. Then the manifests and data will still remain for the other catalog.