Technical validity and history-chain fields
On this page
Ordinary validity dates describe when a version is valid in the modeled business timeline. Optional technical dates record processing times, while chain fields connect generated versions by surrogate key. These are separate settings, not interchangeable date columns.
Effective field names
| DWH setting | Repository parameter |
|---|---|
| Technical valid from date field | HIST_TECHNICAL_FROM_COLUMN |
| Technical valid to date field | HIST_TECHNICAL_TO_COLUMN |
| Root surrogate key field | HIST_ROOT_SURROGATE_KEY_COLUMN |
| Previous surrogate key field | HIST_PREV_SURROGATE_KEY_COLUMN |
| Next surrogate key field | HIST_NEXT_SURROGATE_KEY_COLUMN |
A nonempty historization-specific name overrides the corresponding global name. A blank local name inherits the global value; it does not explicitly disable a configured global field. If the resulting effective name is empty, the generator omits that optional SQL fragment. Effective names are normalized before use.
Choose distinct names and verify that the generated destination definition contains the fields with suitable types. Setting a name alone is not a substitute for reviewing/deploying the table definition.
Technical dates in generated processing
| Path | Technical timestamp behavior |
|---|---|
| Initial load with no open history | Optional technical-from is the run start; technical-to is the open-end sentinel 99991231. |
| Insert a new or changed SCD2 version | Technical-from is the run start; technical-to is the open-end sentinel. |
| Close a changed version | Technical-to is the run close timestamp, while business ValidTo can use the configured source-derived boundary. |
| Close a missing record | The closing path assigns the run close timestamp to technical-to. |
| Add empty record | The old version is technically closed; the replacement receives run start/open end. |
| Insert-only path | Inserted rows receive run start/open end when the fields are configured. |
The run close timestamp uses the configured interval convention: the inclusive branch adjusts the run start by two milliseconds, while the other branch uses the run start directly. Do not equate this technical close time with a backdated business correction.
Previous, root and next keys
For ordinary version insertion, Previous surrogate key receives the preceding version's surrogate key held during change detection. Root surrogate key carries forward the existing root when available, otherwise the preceding version's key. The empty-record insertion path follows the same pattern.
The Next surrogate key update starts with the previous version identified during processing and finds the current open version with the same business key. It assigns that open version's surrogate key to the previous version. The match uses the open-end validity sentinel; it is not a universal chronological sort of every row in the table. Add-empty-record processing includes an additional update before preparing the empty-record replacement.
The initial-load insert does not explicitly populate the optional previous/root/next columns, and ordinary new-key insertion has no preceding key. Do not assume every first version points to itself or that every root is non-NULL. Inspect actual defaults and generated data before relying on such a rule.
Late corrections and audit limits
Future-history cleanup physically deletes qualifying business-history rows. Configuring technical dates does not change those DELETE statements into a separate append-only technical archive. The inspected generator does not establish a general contract that every version ever observed remains queryable after rollback.
Similarly, chain fields should not be treated as a proven complete audit trail through every rollback, source-history-reuse and insert-only combination. The intended preservation semantics for those advanced uses are pending clarification; the behavior above describes inspected assignments, not a broader bitemporal guarantee.
Validation checklist
- Review global names and effective overrides; test blank-local inheritance explicitly.
- Generate and review both the table and procedure before deployment.
- Test initial load, a second SCD2 version, another change, disappearance, and an empty-record replacement separately.
- Check business dates, technical dates and each configured link together. Do not validate chains from row counts alone.
- Run the late-arriving correction scenario and inspect links involving removed versions.
- Test source-history reuse and insert-only separately if used; results from ordinary keyed historization do not prove those paths.
These are source-based checks. No database execution or complete bitemporal audit certification is claimed.
Owner-confirmed semantics
Deleted future versions are no longer available; technical validity is not a retained archive of physically deleted records. The root key of the first version is intended to equal that version's own surrogate key. This clarifies the contract; any earlier code-specific chain assignment notes are implementation observations, not an alternative business rule.