Skip to main content
Update records that match conditions defined in the Use Predicate parameter. Instead of updating individual rows, it replaces the entire partition of the table that matches the given predicate. The predicate defines which rows in the target table should be fully replaced with the incoming data.

Parameters

ParameterDescription
Use PredicateLets you add conditions that specify when to apply the merge.
Use a condition to filter data or incremental runsEnables applying conditions for filtering the incoming data into the table.
(Advanced) On Schema ChangeSpecifies how schema changes should be handled during the merge process.
  • ignore: Newly added columns will not be written to the model. This is the default option.
  • fail: Triggers an error message when the source and target schemas diverge.
  • append_new_columns: Append new columns to the existing table.
  • sync_all_columns: Adds any new columns to the existing table, and removes any columns that are now missing. Includes data type changes. This option uses the output of the previous gem.

Example: Update trips from January 5th onwards

When any record from January 5th onwards needs updating, ALL records from that date forward are dropped and replaced with the incoming data. Records from before January 5th remain unchanged. Predicate: DATE >= '2024-01-05'
Incoming table
TRIP_IDSTATUSDATE
201Closed2024-01-05
203Closed2024-01-10
Existing table
TRIP_IDVEHICLE_IDDATESTATUS
2011012024-01-05Open
2021022023-12-20Open
2031032024-01-10Open
2041042024-01-15Open
Updated table
TRIP_IDVEHICLE_IDDATESTATUS
2011012024-01-05Closed
2031032024-01-10Closed
2021022023-12-20Open
Notice that ALL trips from January 5th onwards (201, 203, and 204) were dropped and replaced with only the incoming records (201 and 203), while trip 202 (from December 20th) remained unchanged.