Skip to content

Commit ac64493

Browse files
committed
temporal_merge: Complete reference architecture for usage with minimal copying
1 parent 491b50b commit ac64493

File tree

4 files changed

+565
-156
lines changed

4 files changed

+565
-156
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ This validation is implemented using a `CHECK` constraint on the regular table,
206206
- `p_target_table`: The temporal table to merge data into.
207207
- `p_source_table`: A table (usually temporary) containing the source data.
208208
- `p_identity_columns`: An array of column names that form the conceptual, permanent entity identifier.
209-
- `p_ephemeral_columns`: An array of column names that should not be considered when comparing for data changes, but whose values should still be updated (e.g., `edit_comment`).
209+
- `p_ephemeral_columns`: An array of column names that should not be considered when comparing for data changes, but whose values should still be updated. This is ideal for metadata like `edit_comment` or `batch_id` that should be attached to a historical record without creating a new version of that record if only the metadata changes.
210210
- `p_mode`: Controls the scope and payload semantics of the merge. By default, all modes are non-destructive to the timeline.
211211
- `'MERGE_ENTITY_PATCH'`: (Default) Merges the source timeline with the target entity's full timeline, patching data for overlapping periods. This mode correctly handles sparse source data by "carrying forward" the last known value for any attribute that is `NULL` in a subsequent source row. It preserves non-overlapping parts of the target timeline.
212212
- `'MERGE_ENTITY_REPLACE'`: Merges the source timeline with the target entity's full timeline, replacing data for overlapping periods. Preserves non-overlapping parts of the target timeline.

0 commit comments

Comments
 (0)