> ## 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.

# Table Output

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", "Google BigQuery"]} componentType="Transformation" connectionInputs="One" connectionOutputs="None" />

The **Table Output** transformation component lets you write an input dataset out to an existing table in your cloud data warehouse. Table Output will be the last component in your pipeline, as you write the dataset out after all other processing is complete.

The target table must already exist, and should have suitable columns to map to the columns in your dataset. The component will validate if the input columns don't map to suitable output columns (for example, if you map a date column to an integer column), but you may encounter unexpected results when the pipeline runs. You can choose whether the new data will be appended to the existing table (**Append** option), or whether the existing table rows will be deleted before the new data is written out (**Truncate** option).

This component is equivalent to using the SQL `INSERT INTO` statement, optionally preceded by a `DELETE FROM` statement.

<Note>
  There are other components that can write data to a table and may better suit your use case:

  * To output data to a new table, use [Rewrite Table](/docs/components/rewrite-table).
  * To replace the values of existing rows in a table, use [Table Update](/docs/components/table-update).
</Note>

### Use case

The Table Output component supports two ways of writing data out to a table:

* Making incremental data loads to an existing table. For example, appending today's transactions to a sales table.
* Overwriting existing data with fresh data. For example, replacing a staging table's data with the latest extracted file.

***

## Properties

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

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

    <ResponseField name="Warehouse" type="drop-down" required>
      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>

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

    <ResponseField name="Database" type="drop-down" required>
      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>

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

    <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:[targetTable] | warehouses: [snowflake] --> */}

    <ResponseField name="Target table" type="drop-down" required>
      Select the output table. The available tables depend on the selected environment.
    </ResponseField>

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

    <ResponseField name="Fix data type mismatches" type="boolean" required>
      Select whether to cast types in the event of data type mismatches.

      * **Yes:** If the source column type does not match the target table type, attempt to CAST the value to the required target type.
      * **No:** Do not cast types (do not fix data type mismatches).
    </ResponseField>

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

    <ResponseField name="Column mapping" type="column editor" required>
      In each **Source column** drop-down, select a column in your dataset that you want to write to your existing table. Click the **+** icon to add another row, or before adding any rows, click **Add all** to add all input columns to the **Source column**. If you click **Add all**, the **Target column** fields will automatically be completed if there is a column in the selected target table that matches the name of the source column.

      In each **Target column** drop-down, select the existing column in the selected target table to populate with the selected **Source column** data. You can add source columns multiple times to populate different target columns with the same data.
    </ResponseField>

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

    <ResponseField name="Order by" type="column editor">
      * **Column:** Select the output column(s) to sort by.
      * **Sort Order:** Set the corresponding column to be ordered ascending (default) or descending.
    </ResponseField>

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

    <ResponseField name="Output mode" type="drop-down" required>
      * **Append:** Adds the records to the end of the table.
      * **Truncate:** Empty existing rows in the target table before loading the incoming input rows. This operation may use either a [TRUNCATE](https://docs.snowflake.com/en/sql-reference/sql/truncate-table.html) or [DELETE FROM](https://docs.snowflake.com/en/sql-reference/sql/delete.html) query, depending on whether the current flow is in a transaction or not. TRUNCATE is faster, and therefore preferred, but is not transaction-safe and is not used if a transaction is in progress.
    </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 determines which databases are available in the next parameter.
    </ResponseField>

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

    <ResponseField name="Schema (Database)" type="drop-down" required>
      The Databricks schema. The special value `[Environment Default]` uses the schema defined in the environment. Read [Create and manage schemas](https://docs.databricks.com/en/data-governance/unity-catalog/create-schemas.html) to learn more.
    </ResponseField>

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

    <ResponseField name="Target table" type="drop-down" required>
      Select the output table. The available tables depend on the selected environment.
    </ResponseField>

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

    <ResponseField name="Fix data type mismatches" type="boolean" required>
      Select whether to cast types in the event of data type mismatches.

      * **Yes:** If the source column type does not match the target table type, attempt to CAST the value to the required target type.
      * **No:** Do not cast types (do not fix data type mismatches).
    </ResponseField>

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

    <ResponseField name="Column mapping" type="column editor" required>
      In each **Source column** drop-down, select a column in your dataset that you want to write to your existing table. Click the **+** icon to add another row, or before adding any rows, click **Add all** to add all input columns to the **Source column**. If you click **Add all**, the **Target column** fields will automatically be completed if there is a column in the selected target table that matches the name of the source column.

      In each **Target column** drop-down, select the existing column in the selected target table to populate with the selected **Source column** data. You can add source columns multiple times to populate different target columns with the same data.
    </ResponseField>

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

    <ResponseField name="Output mode" type="drop-down" required>
      * **Append:** Adds the records to the end of the table.
      * **Truncate:** Empty existing rows in the target table before loading the incoming input rows. This operation may use either a [TRUNCATE](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-ddl-truncate-table) or [DELETE FROM](https://docs.databricks.com/aws/en/sql/language-manual/delta-delete-from) query, depending on whether the current flow is in a transaction or not. TRUNCATE is faster, and therefore preferred, but is not transaction-safe and is not used if a transaction is in progress.
    </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>
      Select the table schema. The special value `[Environment Default]` uses the schema defined in the environment. 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:[targetTable] | warehouses: [redshift] --> */}

    <ResponseField name="Target table" type="drop-down" required>
      Select the output table. The available tables depend on the selected environment.
    </ResponseField>

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

    <ResponseField name="Fix data type mismatches" type="boolean" required>
      Select whether to cast types in the event of data type mismatches.

      * **Yes:** If the source column type does not match the target table type, attempt to CAST the value to the required target type.
      * **No:** Do not cast types (do not fix data type mismatches).
    </ResponseField>

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

    <ResponseField name="Column mapping" type="column editor" required>
      In each **Source column** drop-down, select a column in your dataset that you want to write to your existing table. Click the **+** icon to add another row, or before adding any rows, click **Add all** to add all input columns to the **Source column**. If you click **Add all**, the **Target column** fields will automatically be completed if there is a column in the selected target table that matches the name of the source column.

      In each **Target column** drop-down, select the existing column in the selected target table to populate with the selected **Source column** data. You can add source columns multiple times to populate different target columns with the same data.
    </ResponseField>

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

    <ResponseField name="Output mode" type="drop-down" required>
      * **Append:** Adds the records to the end of the table.
      * **Truncate:** Empty existing rows in the target table before loading the incoming input rows. This operation may use either a [TRUNCATE](https://docs.aws.amazon.com/redshift/latest/dg/r_TRUNCATE.html) or [DELETE FROM](https://docs.aws.amazon.com/redshift/latest/dg/r_DELETE.html) query, depending on whether the current flow is in a transaction or not. TRUNCATE is faster, and therefore preferred, but is not transaction-safe and is not used if a transaction is in progress.
    </ResponseField>

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

    <ResponseField name="Analyze compression" type="drop-down" required>
      Select whether the component will perform a [Redshift compression analysis](https://docs.aws.amazon.com/redshift/latest/dg/r_ANALYZE_COMPRESSION.html). Options are:

      * **Yes**
      * **No**
      * **If not already**
    </ResponseField>
  </Tab>

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

    {/* <!-- param-start:[gcpProjectId] | warehouses: [bigquery] --> */}

    <ResponseField name="GCP project ID" type="drop-down" required>
      The Google Cloud project. The special value `[Environment Default]` uses the project defined in the environment. Read [Creating and managing projects](https://docs.cloud.google.com/resource-manager/docs/creating-managing-projects) to learn more.
    </ResponseField>

    {/* <!-- param-start:[dataset] | warehouses: [bigquery] --> */}

    <ResponseField name="Dataset" type="drop-down" required>
      The Google BigQuery dataset. The special value `[Environment Default]` uses the dataset defined in the environment. Read [Introduction to datasets](https://docs.cloud.google.com/bigquery/docs/datasets-intro) to learn more.
    </ResponseField>

    {/* <!-- param-start:[targetTable] | warehouses: [bigquery] --> */}

    <ResponseField name="Target table" type="drop-down" required>
      Select the output table. The available tables depend on the selected environment.
    </ResponseField>

    {/* <!-- param-start:[fixDataTypeMismatches] | warehouses: [bigquery] --> */}

    <ResponseField name="Fix data type mismatches" type="boolean" required>
      Select whether to cast types in the event of data type mismatches.

      * **Yes:** If the source column type does not match the target table type, attempt to CAST the value to the required target type.
      * **No:** Do not cast types (do not fix data type mismatches).
    </ResponseField>

    {/* <!-- param-start:[columnMapping] | warehouses: [bigquery] --> */}

    <ResponseField name="Column mapping" type="column editor" required>
      Click the gear icon to open the **Column mapping** dialog and configure the following:

      * **Source column:** The source field from the input flow.
      * **Target column:** The target table's output column to insert data into.

      Click **Add all** to automatically populate the **Target column** with all the columns in the table selected in the **Target table** property. The **Source column** matches what is in the **Target column**, unless there is no column in the source table that matches that column name in the output table, in which case it is blank. You can then selectively edit the list if required, but if you click **Add all** again it will return the list to the default fully populated state, removing any changes you have made.

      To add a mapping row manually, click **+**. To remove a selected row, click **-**.

      Click the **Text mode** toggle at the bottom of the dialog to open a multi-line editor that lets you add items in a single block. For more information, read [Text mode](/docs/guides/components-overview#text-mode).

      To use grid variables, toggle **Use Grid Variable** on at the bottom of the dialog. For more information, read [Grid variables](/docs/guides/grid-variables).
    </ResponseField>

    {/* <!-- param-start:[outputMode] | warehouses: [bigquery] --> */}

    <ResponseField name="Output mode" type="drop-down" required>
      * **Append:** Adds the records to the end of the table.
      * **Truncate:** Empty existing rows in the target table before loading the incoming input rows. This operation uses a [TRUNCATE TABLE](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/dml-syntax#truncate_table_statement) or [DELETE](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/dml-syntax#delete_statement) statement.
    </ResponseField>
  </Tab>
</Tabs>
