Skip to content

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 integration
DROP STORAGE INTEGRATION s3_integration;
-- Drop a storage integration if it exists
DROP STORAGE INTEGRATION IF EXISTS gcs_integration;

Behavior

When you drop a storage integration:

  1. The integration is removed from the system catalog.
  2. Any external tables that were using the integration will no longer be able to access the external storage system using that integration.
  3. 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.

Information Schema

You can view information about existing storage integrations using the information_schema.storage_integrations view:

SELECT * FROM information_schema.storage_integrations;