AnalyticsCreator Docs Preview

Verify late-arriving history corrections

On this page
  1. Configure a controlled test
  2. Initial history and incoming correction
  3. Expected sequence to inspect
  4. Boundary cases
  5. Record the result

Use this synthetic scenario to review Delete future history if it exists before deploying a historization procedure. It is a test design based on the generator, not a report of an executed sample. Do not prepare it in production: the option deletes stored history versions.

Configure a controlled test

Use ordinary keyed historization with Insert only (no PK) and Source is historicised disabled. Enable Delete future history if it exists. Configure ValidFrom existing keys to read the incoming business date, for example I.[ChangeDate], if that column exists in your test source. Mark the changing payload column as SCD2.

Choose Do not close for missing records in this isolated test so that a source record omitted from the test is not closed by the separate missing-record policy. Leave source/history filters empty for the first run. Keep source duplicate checking enabled and supply one incoming row per business key.

The first example uses half-open validity: the end timestamp belongs to the next version. Verify your actual interval setting before interpreting dates. Field names below are illustrative and must match DWH Settings in the test repository.

Initial history and incoming correction

Assume execution occurs after April 2025 and the destination contains:

Business key Surrogate key Valid from Valid to Status
A 101 2025-01-01 2025-03-01 Original
A 102 2025-03-01 Open end Later
B 201 2025-01-01 Open end Unrelated

Supply a source row for A with ChangeDate = 2025-02-01 and Status = Corrected. The correction date precedes the March version but follows the January version.

Expected sequence to inspect

  1. The existing-key date expression evaluates to February 1 for A, regardless of the later procedure run time.
  2. A's versions whose ValidFrom is at or after February 1 are deleted. This includes surrogate key 102.
  3. The last retained version spanning the boundary is reopened for subsequent historization processing.
  4. Change processing closes the January version at the correction boundary and creates the changed version from February 1. Do not assert the newly allocated surrogate-key value.
  5. B is not rolled back by A's source-derived date. The chosen missing-record policy keeps this separate from source-absence processing.

The final half-open periods for A should be January 1 to February 1, followed by the Corrected version from February 1 to the open end. Inspect both attributes and periods; row counts alone cannot prove a correct timeline.

Boundary cases

Run each case from a known fixture rather than layering unrelated test changes:

Case What to verify
Correction exactly at an existing ValidFrom Cleanup uses >=, so that version is included in rollback.
Correction earlier than every retained version of A The replacement still uses the evaluated existing-key date even if rollback removes all old versions.
Different dates for A and B in the same source Each existing key uses its own boundary.
NULL existing-key date The boundary falls back to the procedure run timestamp. Record that timestamp when assessing results.
New business key C Its initial validity follows ValidFrom new keys; that initial-date setting does not become A's rollback date.
Inclusive validity Review the generated two-millisecond adjustment and actual datetime precision instead of expecting the half-open end value.
Source/history filters Confirm which rows qualify for deletion and reopening; excluded data must be assessed separately.
Insert-only or source-history reuse This ordinary future-history rollback branch is not generated.

If source duplicate checking is disabled, the custom-boundary calculation uses the earliest evaluated date for each key. That does not make conflicting source rows a recommended input; test duplicate behavior independently.

Record the result

Keep the selected repository/sample revision, relevant settings, generated and deployed procedure definitions, run timestamp, anonymized before/after rows, and any error. Updating a generator does not automatically replace an already deployed procedure.

Demo_Northwind AI is the selected documentation sample, but these keys and dates are synthetic and are not asserted to exist in it. Sample execution and screenshots remain unverified.

See historization configuration, missing records and future history, and generation troubleshooting.

Search documentation