> ## Documentation Index
> Fetch the complete documentation index at: https://docs.maia.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Truncate Table

export const ComponentMetadata = ({warehouses, unsupportedWarehouses = [], componentType, connectionInputs, connectionOutputs}) => {
  const allWarehouses = [...warehouses.map(w => ({
    name: w,
    supported: true
  })), ...unsupportedWarehouses.map(w => ({
    name: w,
    supported: false
  }))];
  return <div style={{
    background: 'var(--colors-background-light, #f9fafb)',
    border: '1px solid var(--colors-border-default, #e5e7eb)',
    borderRadius: '12px',
    padding: '20px 28px',
    marginBottom: '28px',
    boxShadow: '0 1px 4px rgba(0,0,0,0.10)'
  }}>
      <table style={{
    width: '100%',
    borderCollapse: 'collapse'
  }}>
        <tbody>
          <tr>
            <td style={{
    fontWeight: '600',
    paddingRight: '32px',
    paddingBottom: '14px',
    whiteSpace: 'nowrap',
    verticalAlign: 'middle',
    width: '180px'
  }}>Project Availability</td>
            <td style={{
    paddingBottom: '14px',
    verticalAlign: 'middle'
  }}>
              <div style={{
    display: 'flex',
    flexWrap: 'wrap',
    gap: '8px'
  }}>
                {allWarehouses.map((w, i) => <span key={i} style={{
    background: w.supported ? '#dcfce7' : '#fee2e2',
    color: w.supported ? '#15803d' : '#b91c1c',
    border: `1px solid ${w.supported ? '#bbf7d0' : '#fca5a5'}`,
    borderRadius: '9999px',
    padding: '3px 12px',
    fontSize: '0.85rem',
    fontWeight: '500',
    whiteSpace: 'nowrap'
  }}>
                    {w.name} {w.supported ? '✅' : '❌'}
                  </span>)}
              </div>
            </td>
          </tr>
          <tr>
            <td style={{
    fontWeight: '600',
    paddingRight: '32px',
    paddingBottom: '14px',
    whiteSpace: 'nowrap',
    verticalAlign: 'middle'
  }}>Component Type</td>
            <td style={{
    paddingBottom: '14px',
    verticalAlign: 'middle'
  }}>{componentType}</td>
          </tr>
          <tr>
            <td style={{
    fontWeight: '600',
    paddingRight: '32px',
    paddingBottom: '14px',
    whiteSpace: 'nowrap',
    verticalAlign: 'middle'
  }}>Connection Inputs</td>
            <td style={{
    paddingBottom: '14px',
    verticalAlign: 'middle'
  }}>{connectionInputs}</td>
          </tr>
          <tr>
            <td style={{
    fontWeight: '600',
    paddingRight: '32px',
    whiteSpace: 'nowrap',
    verticalAlign: 'middle'
  }}>Connection Outputs</td>
            <td style={{
    verticalAlign: 'middle'
  }}>{connectionOutputs}</td>
          </tr>
        </tbody>
      </table>
    </div>;
};

<ComponentMetadata warehouses={["Snowflake", "Databricks", "Amazon Redshift"]} unsupportedWarehouses={["BigQuery"]} componentType="Orchestration, Test" connectionInputs="One" connectionOutputs="Unlimited" />

The Truncate Table orchestration 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. For more information, read [TRUNCATE TABLE for Snowflake](https://docs.snowflake.com/en/sql-reference/sql/truncate-table.htm), [TRUNCATE TABLE for Databricks](https://docs.databricks.com/en/sql/language-manual/sql-ref-syntax-ddl-truncate-table.html), and [TRUNCATE for Redshift](https://docs.aws.amazon.com/redshift/latest/dg/r_TRUNCATE.html), respectively. The second is by using a `DELETE FROM` statement, which is preferable if the current pipeline is using a transaction. For more information, read [DELETE FROM for Snowflake](https://docs.snowflake.com/en/sql-reference/sql/delete.html), [DELETE FROM for Databricks](https://docs.databricks.com/en/sql/language-manual/delta-delete-from.html), and [DELETE for Redshift](https://docs.aws.amazon.com/redshift/latest/dg/r_DELETE.html), respectively.

* A truncate operation is faster than a delete operation.
* A truncate operation is not transaction safe—it cannot be rolled back.

***

## Properties

<Tabs>
  <Tab title="Snowflake">
    <ResponseField name="Name" type="string" required>
      A human-readable name for the component.
    </ResponseField>

    <ResponseField name="Warehouse" type="drop-down">
      The Snowflake warehouse used to run the queries. The special value `[Environment Default]` uses the warehouse defined in the environment. Read [Overview of Warehouses](https://docs.snowflake.com/en/user-guide/warehouses-overview.html) to learn more.
    </ResponseField>

    <ResponseField name="Database" type="drop-down">
      The Snowflake database. The special value `[Environment Default]` uses the database defined in the environment. Read [Databases, Tables and Views - Overview](https://docs.snowflake.com/en/guides-overview-db) to learn more.
    </ResponseField>

    <ResponseField name="Schema" type="drop-down" required>
      The Snowflake schema. The special value `[Environment Default]` uses the schema defined in the environment. Read [Database, Schema, and Share DDL](https://docs.snowflake.com/en/sql-reference/ddl-database.html) to learn more.
    </ResponseField>

    {/* <!-- param-start:[tablesToTruncate] | warehouses: [snowflake] --> */}

    <ResponseField name="Target Table" type="dual-listbox" required>
      The tables you want to truncate.

      To use [grid variables](/docs/guides/grid-variables), select the **Use Grid Variable** checkbox at the bottom of the **Target Table** dialog.
    </ResponseField>
  </Tab>

  <Tab title="Databricks">
    <ResponseField name="Name" type="string" required>
      A human-readable name for the component.
    </ResponseField>

    {/* <!-- param-start:[catalog] | warehouses: [databricks] --> */}

    <ResponseField name="Catalog" type="drop-down" required>
      Select a [Databricks Unity Catalog](https://docs.databricks.com/en/data-governance/unity-catalog/index.html). The special value `[Environment Default]` uses the catalog defined in the environment. Selecting a catalog will determine which databases are available in the next parameter.
    </ResponseField>

    <ResponseField name="Database" type="drop-down">
      Select the Delta Lake database. The special value `[Environment Default]` uses the database defined in the environment.
    </ResponseField>

    <ResponseField name="Tables to Truncate" type="dual listbox" required>
      Select the tables you want to truncate.

      To use [grid variables](/docs/guides/grid-variables), select the **Use Grid Variable** checkbox at the bottom of the **Tables to Truncate** dialog.
    </ResponseField>
  </Tab>

  <Tab title="Amazon Redshift">
    <ResponseField name="Name" type="string" required>
      A human-readable name for the component.
    </ResponseField>

    {/* <!-- param-start:[schema] | warehouses: [redshift] --> */}

    <ResponseField name="Schema" type="drop-down" required>
      The Amazon Redshift schema. The special value `[Environment Default]` uses the schema defined in the environment. Read [Schemas](https://docs.aws.amazon.com/redshift/latest/dg/r_Schemas_and_tables.html) to learn more.

      For more information on using multiple schemas, read [Schemas](https://docs.aws.amazon.com/redshift/latest/dg/r_Schemas_and_tables.html).
    </ResponseField>

    {/* <!-- param-start:[tablesToTruncate] | warehouses: [redshift] --> */}

    <ResponseField name="Tables to Truncate" type="dual listbox" required>
      Select the tables you want to truncate.

      To use [grid variables](/docs/guides/grid-variables), select the **Use Grid Variable** checkbox at the bottom of the **Tables to Truncate** dialog.
    </ResponseField>
  </Tab>
</Tabs>
