Delete Tables

Delete Tables Component

This component allows you to delete a list of tables in a single operation.

Note that the Delete Component has more in common with the Snowflake DROP TABLE statement than the DELETE statement. For detailed information on DROP TABLE in Snowflake, refer to the official documentation.

This component may be used inside a transaction. However, on rollback, deleted tables will NOT be restored.

Note that the Delete Component has more in common with the Redshift DROP TABLE statement than the DELETE statement. For detailed information on DROP TABLE in Redshift, refer to the official documentation. When deleting large amounts of table data, it is recommended you use a Vacuum Component afterward in order to save space on the cluster.

This component may be used inside a transaction. On commit, the table is removed permanently. On rollback, it will be retained.

For detailed information on deleting tables in BigQuery, refer to the official documentation.

Properties

Property Setting Description
Name Text The descriptive name for the component.
Warehouse Select Choose a Snowflake warehouse that will delete the table.
Database Select Select the database that the deleted table belongs to.
Schema Select Select the table schema. The special value, [Environment Default] will use the schema defined in the environment. For more information on using multiple schemas, see this article.
Dataset Select Select the table dataset. The special value, [Environment Default] will use the dataset defined in the environment.
For more information on Google Cloud Datasets, visit the official documentation.
Tables to Delete Select One or more tables to delete.
Cascade Select Yes - Drop dependent objects such as any dependent views that have been manually created.
No - Do not drop them. The component will fail at runtime if such objects exist and the table will not be removed.
Ignore Missing Select Yes - If the table doesn't exist, ignore it.
No - If a table doesn't exist, generate an error.

Strategy

Generates a single DROP TABLE statement, optionally with IF EXISTS and CASCADE modifiers.
Generates a single DELETE command.

Example

In this example, we use the Delete Tables component to drop a selection of tables that were used for testing and are no longer required. The job is shown below.

Editing the 'Tables' property will bring up a large selection of tables currently available for deletion. We also want to drop any dependent objects(Cascade set to Yes) and ignore any missing tables (Ignore Missing set to Yes).

Editing the 'Tables' property will bring up a large selection of tables currently available for deletion. We also want to ignore any missing tables (Ignore Missing set to Yes).

Running this component (or job) will now delete the selected tables.