Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions models/staging/stg_orders.sql
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ renamed as (

select
id as order_id,
user_id as customer_id,
user_id as client_id,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

customer_id renamed to client_id but 5 downstream columns across orders, returned_orders, artificial_anomaly, date_based_anomaly, and forced_anomaly still reference customer_id. Update all consumers or this rename will silently break them.

order_date,
status

from source

)

select * from renamed
select * from named

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CTE reference typo: named does not exist — the CTE above is called renamed. This will cause a compile error and break all 9 downstream models.