DROP CATALOG
Preview
Unity Catalog is in Public Preview. To participate in the preview, contact your Databricks representative.
Drops a catalog. An exception is thrown if the catalog does not exist in the metastore.
Since: Databricks Runtime 10.3
Parameters
IF EXISTS
If specified, no exception is thrown when the catalog does not exist.
-
The name of an existing catalog in the metastore. If the name does not exist, an exception is thrown.
RESTRICT
If specified, will restrict dropping a non-empty catalog and is enabled by default.
CASCADE
If specified, will drop all the associated databases (schemas) and the objects within them.
Examples
-- Create a `vaccine` catalog
> CREATE CATALOG vaccine COMMENT 'This catalog is used to maintain information about vaccines';
-- Drop the catalog and its schemas
> DROP CATALOG vaccine CASCADE;
-- Drop the catalog using IF EXISTS and only if it is empty.
> DROP CATALOG IF EXISTS vaccine RESTRICT;