Skip to content

[Audit] Declare grain explicitly in model descriptions for dim_ports, fact_charge_attempts, fact_downtime_daily, fact_interval_data #98

Description

@daria-sukhareva

Context

Four models have descriptions that do not state their grain. Grain is the single most important piece of documentation on any dimensional model — it tells consumers exactly what one row represents, prevents incorrect aggregations, and is the first thing a reviewer checks when a metric looks wrong.

The current state:

Model Current description Required grain statement
dim_ports "Port/connector dimension" "One row per charge_point_id + port_id + connector_id"
fact_charge_attempts "combines charge attempts and transactions data" "One row per charge attempt per port"
fact_downtime_daily "Daily aggregation of charge point downtime" "One row per date + charge_point_id + port_id + outage type"
fact_interval_data "15-minute interval meter values" "One row per charge_point_id + transaction_id + connector_id + ingested_ts + measurand + unit + phase + 15-min interval"

fact_uptime is the only model that currently states its grain correctly and does not need to change.

Acceptance criteria

  • dim_ports model description begins with a grain statement in the form "One row per …"
  • fact_charge_attempts model description begins with a grain statement in the form "One row per …"
  • fact_downtime_daily model description begins with a grain statement in the form "One row per …"
  • fact_interval_data model description begins with a grain statement in the form "One row per …"
  • Each grain statement is specific enough that two engineers would independently produce the same unique key definition from it
  • Grain statements are consistent with the unique key columns actually tested in each model's .yml config
  • No SQL changes are required for this issue — documentation only

Metadata

Metadata

Assignees

No one assigned

    Labels

    kwwhat-auditKimball compliance audit findings

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions