bridge_discount_campaign_to_organization_unit


Description

Maps studios (organization units) to their currently registered discount campaigns. A studio can have multiple campaigns registered simultaneously, provided their active_from / active_to validity windows do not overlap (enforced at application level). Join with dim_discount_campaign and filter on the campaign’s validity window to determine which campaign is effective at a given point in time.

Important limitation: This is a point-in-time snapshot. When a studio deactivates a discount campaign, the corresponding row is hard-deleted — no historical record is preserved.

Columns

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

The primary key of this table. Surrogate key derived from (organization_unit_id, discount_campaign_id).

discount_campaign_id int8 19 null
dim_discount_campaign.discount_campaign_id Implied Constraint R

The discount campaign currently active for this studio.

organization_unit_id int8 19 null

The studio for which this discount campaign is currently active.

last_updated timestamptz 35 null

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

Relationships