DROP EXTERNAL VIEW - Amazon Redshift
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

DROP EXTERNAL VIEW

Drops an external view from the database. Dropping an external view removes it from all SQL engines the view is associated with, such as Amazon Athena and Amazon EMR Spark. This command can't be reversed. For more information about Data Catalog views, see Amazon Glue Data Catalog views.

Syntax

DROP EXTERNAL VIEW schema_name.view_name [ IF EXISTS ] {catalog_name.schema_name.view_name | awsdatacatalog.dbname.view_name | external_schema_name.view_name}

Parameters

schema_name.view_name

The schema that’s attached to your Amazon Glue database, followed by the name of the view.

IF EXISTS

Drops the view only if it exists.

catalog_name.schema_name.view_name | awsdatacatalog.dbname.view_name | external_schema_name.view_name

The notation of the schema to use when dropping the view. You can specify to use the Amazon Glue Data Catalog, a Glue database that you created, or an external schema that you created. See CREATE DATABASE and CREATE EXTERNAL SCHEMA for more information.

query_definition

The definition of the SQL query that Amazon Redshift runs to alter the view.

Examples

The following example drops a Data Catalog view named sample_schema.glue_data_catalog_view.

DROP EXTERNAL VIEW sample_schema.glue_data_catalog_view IF EXISTS