In Hologres V3.0 and later, you can drop an external schema from an external database whose data source is DLF 2.0. This topic describes the usage and limits of the DROP EXTERNAL SCHEMA statement.
An external schema in Hologres corresponds to an entity object in an external data source, such as a database in DLF 2.0. When you drop an external schema, the database that corresponds to the external schema and tables in the database are dropped. Proceed with caution.
Limitations
If you want to execute this statement to drop an external schema, you must be granted the CONNECT permission on the external database to which the external schema belongs and the permissions to drop resources in the catalog in DLF 2.0.
Syntax
DROP EXTERNAL SCHEMA [IF NOT EXISTS] <ext_database_name>.<ext_schema_name>;Example
Create a catalog in the DLF console.
Create an external database in Hologres to map the catalog in DLF. For more information, see CREATE EXTERNAL DATABASE.
CREATE EXTERNAL DATABASE ext_db_dlf WITH metastore_type 'dlf-rest' catalog_type 'paimon' dlf_catalog 'dlf_catalog';Create a schema in the external database in Hologres. For more information, see CREATE EXTERNAL SCHEMA.
CREATE EXTERNAL SCHEMA ext_db_dlf.ext_schema_dlf;Drop the external schema in Hologres.
DROP EXTERNAL SCHEMA ext_db_dlf.ext_schema_dlf;