Parameters
| Parameter | Description |
|---|---|
| Use Predicate | Lets you add conditions that specify when to apply the merge. |
| Use a condition to filter data or incremental runs | Enables applying conditions for filtering the incoming data into the table. |
| (Advanced) On Schema Change | Specifies how schema changes should be handled during the merge process.
|
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
Existing table
Updated table
Notice that ALL trips from January 5th onwards (
| TRIP_ID | STATUS | DATE |
|---|---|---|
| 201 | Closed | 2024-01-05 |
| 203 | Closed | 2024-01-10 |
| TRIP_ID | VEHICLE_ID | DATE | STATUS |
|---|---|---|---|
| 201 | 101 | 2024-01-05 | Open |
| 202 | 102 | 2023-12-20 | Open |
| 203 | 103 | 2024-01-10 | Open |
| 204 | 104 | 2024-01-15 | Open |
| TRIP_ID | VEHICLE_ID | DATE | STATUS |
|---|---|---|---|
| 201 | 101 | 2024-01-05 | Closed |
| 203 | 103 | 2024-01-10 | Closed |
| 202 | 102 | 2023-12-20 | Open |
201, 203, and 204) were dropped and replaced with only the incoming records (201 and 203), while trip 202 (from December 20th) remained unchanged.
