bridge_payment_to_revenue


Description

Connects payments with the revenue entries they settle. Each row represents one payment-to-revenue link across budget, invoice-based, and cash-based accounting. The payment_id joins to fct_payment.payment_id, and the revenue ID columns join to their corresponding revenue fact tables. The payment_to_revenue_id identifies the unique payment-to-revenue relationship.

Columns

Column Type Size Nulls Auto Default Children Parents Comments
payment_to_revenue_id varchar 256 null

Surrogate primary key generated from the booking-detail link and revenue entry.

revenue_id int8 19 √ null
fct_revenue.revenue_id erp_v2_bridge_payment_to_revenue_revenue_id__erp_v2_fct_revenue_revenue_id_fkey_cf88bdaea053 R

Budget/accrual revenue entry linked to the payment.

revenue_invoice_based_id int8 19 √ null
fct_revenue_invoice_based.revenue_invoice_based_id erp_v2_bridge_payment_to_revenue_revenue_invoice_based_id__erp_v2_fct_revenue_invoice_based_revenue_invoice_ba_454d87e51545 R

Invoice-based revenue entry linked to the payment.

revenue_cash_based_id int8 19 √ null
fct_revenue_cash_based.revenue_cash_based_id erp_v2_bridge_payment_to_revenue_revenue_cash_based_id__erp_v2_fct_revenue_cash_based_revenue_cash_based_id_fk_4643f1995d21 R

Cash-based revenue entry linked to the payment.

payment_revenue_cash_based_id int8 19 √ null
fct_revenue_cash_based.revenue_cash_based_id erp_v2_bridge_payment_to_revenue_payment_revenue_cash_based_id__erp_v2_fct_revenue_cash_based_revenue_cash_bas_0d2b3c544987 R

Cash-based revenue entry of the settling payment.

internal_payment_id int8 19 √ null

Identifies the payment that settles the linked revenue entry.

payment_id varchar 32 √ null
fct_payment.payment_id erp_v2_bridge_payment_to_revenue_payment_id__erp_v2_fct_payment_payment_id_fkey_4b31ff9bbf9f R

The payment identity used by fct_payment, generated from the payment booking entry and reversal state.

last_updated timestamptz 35 √ null

System column. UTC Timestamp at which entry was calculated (lags shortly behind source system).

data_landing_time timestamptz 35 getdate()

System column. UTC timestamp assigned when a table batch is applied on Redshift. It represents warehouse landing order at table-batch granularity, not source event order. Usable to filter for incremental extractions.

Relationships