Using Merge Query for Update, Upsert, and Delete Operations
Using Merge Query for Update, Upsert, and Delete Operations
You can implement the Merge query to perform update, upsert, and delete operations on a Google BigQuery target in a single SQL statement.
To implement the Merge query, select the
Enable Merge
option in the advanced properties for the data object write operation.
Rules and Guidelines
Consider the following rules and guidelines when you use the Merge query:
When you configure a Google BigQuery connection to use the simple connection mode and select CSV as the staging file format, you must not mark any columns of the Record data type for update or upsert operation.
When you configure a Google BigQuery connection to use the simple connection mode, the Google BigQuery target table must not contain repeated columns.
When you configure a Google BigQuery connection to use hybrid connection mode, the Google BigQuery target table must not contain repeated columns as the key field.
When you perform an update or upsert operation on a column of record data type and the column is set to nullable in Google BigQuery, ensure that there are no required fields in the record.
When you perform upsert operation on a Google BigQuery target table, ensure that a column does not contains NULL values. Otherwise, the mapping fails.