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.
- To output data to an existing table, appending to or replacing the current contents, use Table Output.
Use case
Table Update is typically used in pipelines when you’re working with slowly changing dimensions, CDC (change data capture), or data harmonization. Some typical examples of use are:- Overwriting existing attributes in a table row when changes are detected. For example, when a customer updates their email address or phone number, you need to update that single field without overwriting the rest of the data.
- Change data capture (CDC) handling. For example, ingesting change logs from an upstream system and reflecting those changes in your warehouse table.
- Synchronizing reference or lookup tables. For example, updating a product description based on a trusted source feed.
Properties
- Snowflake
- Databricks
- Amazon Redshift
- Google BigQuery
A human-readable name for the component.
The Snowflake warehouse used to run the queries. The special value
[Environment Default] uses the warehouse defined in the environment. Read Overview of Warehouses to learn more.The Snowflake database. The special value
[Environment Default] uses the database defined in the environment. Read Databases, Tables and Views - Overview to learn more.The Snowflake schema. The special value
[Environment Default] uses the schema defined in the environment. Read Database, Schema, and Share DDL to learn more.The table you want to update.
The alias for the target table. An alias allows a table to be referred to and is usually a name that is typically shorter and simpler than its actual name.
The alias for the source table. An alias allows a table to be referred to and is usually a name that is typically shorter and simpler than its actual name.
The condition used to match rows in the source data to rows in the target table, determining which rows to update. This is equivalent to the
ON clause in a SQL MERGE INTO statement. Each expression is evaluated as true or false—rows where the condition is true are considered a match.Reference columns using the aliases set in Source Alias and Target Alias. Keys must uniquely identify rows and must not be NULL, otherwise you’ll get unexpected results.Examples:- Simple key match:
"input"."customer_id" = "target"."customer_id" - Date range match:
"input"."event_date" BETWEEN "target"."start_date" AND "target"."end_date"
Select a case as previously defined in the Join Expression property. Add as many rows to the editor as you need, one per case. Choose an operation for when the corresponding case occurs according to the join expression.
- Delete: Completely remove the row from the output table if the case is matched.
- Update: Output the data as expected if a match is found.
The input column name from the matched input flow. Add as many rows to the editor as you need, one per input column. Property only available when a matched case results in an update.The name of the output column that the corresponding matched input is written to. This can be the same name as the input column if desired.
If Yes, allow non-matched data to continue through to the output. The columns this data is written to are defined in the Insert Mapping property.
The input column name from the unmatched input flow. Add as many rows to the editor as you need, one per input column. Property only available when an unmatched case is included.The name of the output column that the corresponding unmatched input is written to. This can be the same name as the input column if desired.
