DROP STORAGE INTEGRATION
The DROP STORAGE INTEGRATION
command removes a previously created storage integration from the system.
Syntax
DROP STORAGE INTEGRATION [IF EXISTS] integration_name;
IF EXISTS
: (Optional) Prevents an error if the specified integration does not exist.integration_name
: The name of the storage integration to drop.
Examples
-- Drop a storage integrationDROP STORAGE INTEGRATION s3_integration;
-- Drop a storage integration if it existsDROP STORAGE INTEGRATION IF EXISTS gcs_integration;
Behavior
When you drop a storage integration:
- The integration is removed from the system catalog.
- Any external tables that were using the integration will no longer be able to access the external storage system using that integration.
- The actual external data files are not affected; only the integration definition is removed.
Error Handling
If you attempt to drop a storage integration that does not exist and you do not include the IF EXISTS
clause, an error will be returned:
Error: Storage integration 'non_existent' does not exist.
Including the IF EXISTS
clause prevents this error and makes the command a no-op if the integration does not exist.
Related Commands
CREATE STORAGE INTEGRATION
: Creates a new storage integration.CREATE EXTERNAL TABLE
: Creates an external table that can use a storage integration.
Information Schema
You can view information about existing storage integrations using the information_schema.storage_integrations
view:
SELECT * FROM information_schema.storage_integrations;