Parameters
| Parameter | Description |
|---|---|
| Partition by | Defines the partitions of the target table.
|
| (Advanced) On Schema Change | Specifies how schema changes should be handled during the merge process.
|
Example: Update trips for a specific day
In this case, the partition column is theDATE column, where each partition corresponds to a single day. Since the incoming data includes records from 2024-01-15, all of the records from that date are dropped from the existing table and replaced with the new data.
Incoming table
Existing table
Updated table
Notice that only the
| TRIP_ID | VEHICLE_ID | DATE |
|---|---|---|
| 401 | 201 | 2024-01-15 |
| 402 | 202 | 2024-01-15 |
| TRIP_ID | VEHICLE_ID | DATE |
|---|---|---|
| 101 | 101 | 2024-01-14 |
| 301 | 201 | 2024-01-15 |
| 302 | 202 | 2024-01-15 |
| TRIP_ID | VEHICLE_ID | DATE |
|---|---|---|
| 101 | 101 | 2024-01-14 |
| 401 | 201 | 2024-01-15 |
| 402 | 202 | 2024-01-15 |
2024-01-15 partition was replaced with new data, while the 2024-01-14 partition remained untouched.Define partition granularity (BigQuery only)
The following partitioning parameters allow you to define the partition granularity for this operation.| Parameter | Description |
|---|---|
| Column Name | The name of the column used for partitioning the target table. |
| Data Type | The data type of the partition column. Supported types: timestamp, date, datetime, and int64. |
| Partition By granularity | Applicable only to timestamp, date, or datetime data type. Defines the time-based partition granularity: hour, day, month, or year. |
| Partition Range | Applicable only to int64 data type. Specify a numeric range for partitioning using a start, end, and interval value (e.g., start= 0, end=1000, interval=10).You must define an interval value so that Prophecy knows at what intervals to create the partitions. |

