AnalyticsCreator Docs Preview

Choose transformation and join history modes

On this page
  1. Prerequisites and main source
  2. Output modes
  3. Per-source predicates
  4. Snapshot paths
  5. Historical_to in half-open mode
  6. Review scenarios

The transformation's history mode controls the output timeline. Each source's JoinHistType controls its temporal participation. JoinType (INNER, LEFT and so on) controls SQL matching independently. A Full history mode is not the same thing as a SQL FULL JOIN.

Prerequisites and main source

The generator recognizes history metadata by the presence of all three configured columns: surrogate key, Valid from and Valid to. Merely choosing a history join mode does not supply missing columns.

Sources are processed by SequenceNumber. The first source becomes the main alias used by Historical_from and Historical_to. Reordering sources can therefore change which dates those modes reference, even if a relationship connects a later source to another joined table.

Output modes

Mode Inspected behavior
FullHist Generates history fields. One Full participant uses a simpler history path; multiple Full participants construct timeline boundaries from participating histories.
SnapshotHist Generates history fields and constrains results using snapshots. The single-source path differs from the multi-source path; see below.
Snapshot Adds the snapshot source and joins historical rows to snapshot dates.
CurrentOnly Restricts the historical main source to its open-end ValidTo and reduces joined Full participants to current rows.
None Does not request an output-history timeline. Inspect per-source predicates independently.

For multiple Full participants, the generator collects start/end boundaries and rejoins versions at timeline dates. It requires a transformation primary key drawn from Full-participating sources; missing eligible PK metadata raises a generation error. This timeline construction does not repair overlapping or conflicting input histories.

Per-source predicates

The examples use M for the first source and J for the joined source. Actual aliases and field names come from metadata.

JoinHistType Predicate or role
None Adds no temporal predicate for that joined source. It does not repair the source's dates.
Current J.ValidTo = '99991231'; this is an open-end test, not a GETDATE test.
Historical_from Selects against M.ValidFrom. Inclusive mode uses BETWEEN; half-open mode uses J.ValidFrom <= M.ValidFrom AND J.ValidTo > M.ValidFrom.
Historical_to Inclusive mode tests M.ValidTo BETWEEN J.ValidFrom AND J.ValidTo. The half-open branch has a different predicate documented below.
Full In snapshot output, joins against the snapshot date. In CurrentOnly, uses the current-row predicate. In FullHist, participates in the generated timeline.

An explicit Reference Statement takes priority over reference-table lookup. The generated temporal condition is then appended to the join conditions; providing a Reference Statement does not by itself disable history selection. Review Filter Statement separately, especially with LEFT JOIN.

Snapshot paths

Snapshot and multi-source SnapshotHist insert the snapshot table into the FROM structure. Snapshot membership predicates normally use inclusive BETWEEN when configured, otherwise start-inclusive/end-exclusive comparisons. Full joined sources receive the snapshot-date condition. In this branch a Full source configured as CROSS JOIN is converted to INNER JOIN to carry its temporal predicate.

The single-source SnapshotHist optimization instead emits an EXISTS query over snapshots using BETWEEN. In the inspected statement it does not switch to a half-open comparison and does not include the selected snapshot-ID restriction. Do not assume its boundary or selection behavior is identical to the multi-source path. The owner confirms that SnapshotHist is normally used with one source and should return records at predefined snapshot moments, reducing volume relative to FullHist. This explains the purpose but does not independently validate the selection/boundary difference noted here.

Historical_to in half-open mode

The current generated predicate is:

J.ValidFrom <= M.ValidTo
AND J.ValidTo > M.ValidFrom

This can match a joined interval that overlaps the main interval without containing its end. For example, main [January 1, April 1) and joined [February 1, March 1) satisfy it. It is not equivalent to testing only April 1 against the joined interval. The owner confirms endpoint selection: Historical_to selects at the main ValidTo, while Historical_from selects at the main ValidFrom. The overlap predicate above remains a code-review discrepancy, not an unresolved business rule; do not silently interpret it as the Historical_from predicate with only the date name changed.

Review scenarios

  1. Confirm all configured history columns exist and identify the first source by sequence.
  2. Test a boundary shared by adjacent joined versions under the configured inclusive/half-open mode.
  3. For Current, include a future-start row with open-end ValidTo to distinguish an open-end test from an as-of-today test.
  4. For Historical_from/to, change the first source's dates and verify which joined version is selected.
  5. For FullHist, change each Full-participating source independently and review the resulting intervals and PK.
  6. Compare single-source and multi-source SnapshotHist with a deliberately restricted snapshot selection.
  7. Test a missing joined row with LEFT JOIN and inspect whether additional predicates preserve or exclude it.

These are code-derived checks, not executed database results. See transformation configuration and source-history reuse, which is a separate loading feature.

Search documentation