Skip to content

Truncate Table

The Truncate Table component removes all rows from a table or partitions, while keeping the table intact. The table must not be a view or an external or temporary table.

Truncate is implemented in two different ways, depending on whether the current flow is in the middle of a database transaction or not. The first is by using a TRUNCATE statement. The second is by using a DELETE FROM statement, which is preferable if the current pipeline is using a transaction.

  • A truncate operation is faster than a delete operation.
  • A truncate operation is not transaction safeā€”it cannot be rolled back.

Properties

Name = string

A human-readable name for the component.


Warehouse = drop-down

The Snowflake warehouse used to run the queries. The special value, [Environment Default], will use the warehouse defined in the environment. Read Overview of Warehouses to learn more.


Database = drop-down

The Snowflake database. The special value, [Environment Default], will use the database defined in the environment. Read Databases, Tables and Views - Overview to learn more.


Schema = drop-down

The Snowflake schema. The special value, [Environment Default], will use the schema defined in the environment. Read Database, Schema, and Share DDL to learn more.


Target Table = dual-listbox

The tables you want to truncate.