bridge_pos_saleposition_to_payment


Description

Bridge table linking each POS sale position to every payment actively settling it. A single sale position can be split across multiple payments (e.g. partial settlements or split payment methods), so this table has a many-to-many grain: one row per active sale-position-to-payment link. Use this table instead of the deprecated fct_pos_saleposition.internal_payment_id, which collapses splits down to a single link and loses this granularity.

Columns

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

The primary key of this table. Surrogate key built from the sale position and payment.

pos_saleposition_id int8 19 null
fct_pos_saleposition.pos_saleposition_id bridge_pos_saleposition_to_payment_pos_saleposition_id_fkey R

The sale position (line item) this payment link belongs to. May appear on multiple rows when the sale position is settled by more than one payment.

payment_internal_id int8 19 null

One of the payment entries that records the financial impact of this sale position.

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