truncate

Astro SDKCertified

Perform a TRUNCATE operation on a given table.

View on GitHub

Last Updated: Jun. 13, 2022

Access Instructions

Install the Astro SDK provider package into your Airflow environment.

Import the module into your DAG file and instantiate it with your desired params.

Parameters

tableRequiredastro.sql.table.TableThe ``Table`` to be truncated.
conn_idstrThe ID of the configured Airflow Connection to use to connect to a database.
databasestrThe name of the database to use when executing the SQL.
schemastrThe name of the schema to use when executing the SQL.
warehousestrThe name of the warehouse to use when executing the SQL.

Documentation

Perform a TRUNCATE operation on a given table.

Example:
a = truncate(
table=TRUNCATE_TABLE,
conn_id="snowflake_conn",
database="DWH_LEGACY",
)

Was this page helpful?