fix(recovery): restore source removed by production documentation merge
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
-- CURATED (BI-P003). Joins and conformed entities. Reads STAGING only.
|
||||
{{ config(materialized='table', tags=['tier:CURATED']) }}
|
||||
|
||||
select
|
||||
e.event_id,
|
||||
e.tenant_id,
|
||||
e.customer_id,
|
||||
e.amount_sek,
|
||||
e.channel,
|
||||
coalesce(c.country_code, e.country_code) as country_code,
|
||||
c.segment,
|
||||
e.invoiced_at
|
||||
from {{ ref('stg_sales_events') }} e
|
||||
left join {{ ref('stg_customers') }} c
|
||||
on e.customer_id = c.customer_id
|
||||
and e.tenant_id = c.tenant_id -- the join itself stays tenant-scoped
|
||||
Reference in New Issue
Block a user