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

stg_postgres__communication_links

staging view

Comms-to-entity links, cleaned.

Definition

Polymorphic links: comm_id (keyed by comm_type) ↔ entity_id (keyed by entity_type). Coverage is asserted via accepted_values on both type columns since no hard relationship test spans the union. Carries `confidence` when inferred.

11 of 11
Column
Description
Tests · PII
communication_link_id
Primary key — UInt64.
2 tests
comm_type
Comm side — email_message / chat_message / finance_note. Keys the comm_id soft FK.
1 test
comm_id
Soft FK to the comm_type table PK. NOT NULL. No hard relationship test (polymorphic).
1 test
entity_type
Entity side — customer_invoice / vendor_bill / customer / vendor / gl_account / period / budget / forecast / journal_entry. Keys the entity_id soft FK.
1 test
entity_id
Soft FK to the entity_type table PK. NOT NULL. No hard relationship test (polymorphic).
1 test
link_reason
Why the link exists — explicit_mention / thread_subject / attachment_match / manual_tag / inferred. Nullable.
confidence
0..1 when inferred; NULL when explicit. Decimal(4,3). Nullable.
linked_by_employee_id
FK to `stg_postgres__finance_employees.employee_id` — actor reference. Nullable.
source_created_at
Row insert timestamp from the source DB. DateTime64(6).
source_updated_at
Row update timestamp from the source DB. DateTime64(6).
airbyte_extracted_at
When the loader extracted this row from postgres-source.