maiven gateway · online··
manifest · 2d ago
Sign in
Back to catalog
MAIVENmodelmarts

mart_consent_current

certified
mart table

Where each customer stands on each purpose, right now.

Definition

Point-in-time snapshot of the consent ledger — the latest event per (customer × purpose) wins. The `is_active` flag is the gate analytics queries should filter on before processing personal data for that purpose. Snapshot only; for trend (withdrawals over time) read the source log `stg_postgres__consent_events`.

Watch out for
  • highUsing this snapshot for a withdrawal trend

    `mart_consent_current` is the latest state per (customer × purpose) — one row, no history. A "withdrawals over time" question needs the append-only source log `stg_postgres__consent_events`, which is not exposed as a metric.

  • mediumReading consent state as an analyst persona

    The `consent_state` metric is restricted to `executive` + `dpo` (privacy-sensitive even at aggregate level). Analyst personas get a 403 — they reason about consented populations indirectly via `revenue` / `customer_health` instead.

Questions this answers
  • “What share of customers have active marketing consent?”
  • “How many customers have withdrawn consent for analytics?”
8 of 8
Column
Type
Description
Tests · PII
customer_id
UInt64
FK to mart_customers.customer_id.
purpose
String
Processing purpose. Closed list (see governance/CLASSIFICATION.md).
2 tests
basis
String
Lawful basis under GDPR Art. 6.
1 test
current_state
String
granted | withdrawn | expired — derived from the latest event_type.
2 tests
last_source
String
Where the most recent state change was captured.
last_event_at
DateTime64(6)
Timestamp of the most recent state change. DateTime64(6).
1 test
expires_at
Nullable(DateTime64(6))
Optional scheduled expiry of this consent. Null = open-ended.
is_active
Nullable(UInt8)
Derived gate — true when current_state='granted' AND (expires_at IS NULL OR expires_at > now()). Downstream analytics models should filter on this for any purpose with lawful_basis=consent.
1 test