Introducing History Mode in get.myview

Overview

As part of the continuing development of get.myview, we can now expose historical records from current CDM views through a controlled parameter-driven approach.

This enhancement allows users and report developers to move beyond the current-state snapshot and review how values have changed over time, using the same trusted view structures already in use today.

Rather than creating separate history views, the logic is handled centrally within get.myview.


Why This Matters

Many reporting and analysis requirements need more than the latest value. Typical questions include:

  • What was the status last month?
  • When did this code change?
  • Which records became inactive?
  • What value was current at a previous point in time?
  • How has a project or employee attribute evolved?

History Mode helps answer these questions while keeping a consistent access pattern.


How History Is Built

Current historical coverage is created using two sources:

1. Archived History

Records are trawled from the archive back to 23 October 2023.

2. Daily Change Tracking

From the start of the current financial year, daily changes are processed to build a Type 2 style history trail.

This means we retain previous values when a qualifying change occurs.


Change Detection Rules

A historical change is currently triggered when the Code Value changes.

When a change is detected:

  • The previous row is expired
  • ACTIVE_FLAG is set to 0
  • EXPIRED_DATE is set to the day before the new value became active
  • A new active row is inserted for the changed value

At present, metadata-only amendments do not create a historical version.

Examples of metadata-only changes may include:

  • Description wording updates
  • Supporting labels
  • Non-value annotations

New @mode Parameter

The new @mode parameter controls how rows are returned.

Supported Modes

current   → active rows only
history   → full historical records
asat      → future point-in-time capability

Example Usage

Current View (default operational state)

exec get.myview
    @dataMart = 'project',
    @viewName = 'meta_codes',
    @mode = 'current'

Returns only active records.


Full History

exec get.myview
    @dataMart = 'project',
    @viewName = 'meta_codes',
    @mode = 'history'

Returns active and expired rows.


Dynamic Filtering with modeWhere

A new internal logic block named modeWhere dynamically applies filtering based on:

  • Selected @mode
  • Table type
  • Active / historical rules

This allows one procedure to serve both operational and historical use cases cleanly.


Benefits

For Analysts

  • Easier access to trend and change data
  • No need for separate history datasets
  • Consistent querying model

For Engineering

  • Reduced duplication
  • Centralised logic
  • Easier future enhancements

For Governance

  • Clear distinction between current and historic records
  • Controlled release of historical capability
  • Better auditability

Future Direction: asat

A future asat mode is planned to support:

“Show me what the data looked like on a chosen date.”

This will provide true point-in-time reporting from the same view framework.


Summary

get.myview now supports historical retrieval from standard CDM views through the new @mode parameter.

This is an important step toward richer self-service reporting, improved audit trails, and time-aware analytics without increasing view sprawl.


Change Log

2026-02-13 – Added @mode framework (current, history, future asat)
2026-04-29 – Added dynamic modeWhere filtering by mode and table type

Leave a Comment