maiven gateway · online··
manifest · 1d ago
Sign in
Back to catalog
MAIVENmodelstaging

stg_postgres__consent_events

staging view

Consent ledger, typed and FK-validated.

Definition

Append-only consent log staged for `mart_consent_current`. Preserves event order so the mart can derive the latest state per (customer × purpose); FK-validates against the customers dimension so a stray event row can't anchor to an unknown customer.

10 of 10
Column
Description
Tests · PII
consent_event_id
Primary key — UInt64.
2 tests
customer_id
FK to stg_postgres__customers.customer_id. NOT NULL.
purpose
Processing purpose; see governance/CLASSIFICATION.md.
1 test
basis
GDPR Art. 6 lawful basis.
1 test
event_type
granted | withdrawn | expired.
1 test
source
Where the state change was captured.
captured_at
When the change occurred. DateTime64(6).
1 test
expires_at
Optional scheduled expiry. Null = open-ended.
source_created_at
Row insert timestamp from the source DB.
airbyte_extracted_at
When Airbyte extracted this row.