Skip to content

breaking change - #235

Open
michael-myaskovsky wants to merge 2 commits into
mainfrom
breaking-change
Open

breaking change#235
michael-myaskovsky wants to merge 2 commits into
mainfrom
breaking-change

Conversation

@michael-myaskovsky

Copy link
Copy Markdown
Owner

No description provided.

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

Review: models/staging/stg_orders.sql

🔴 Critical: Broken CTE Reference

Line 26 (new): select * from named — the CTE defined earlier is called renamed, not named. This will cause a compilation error and fail the entire downstream pipeline (9 models affected).

🔴 Breaking Column Rename: customer_idclient_id

Elementary's column lineage shows customer_id is actively consumed by 5 downstream columns across 5 models:

  • orders.customer_id (hop 1) — described as "Foreign key to the customers table"
  • returned_orders.customer_id, artificial_anomaly.customer_id, date_based_anomaly.customer_id, forced_anomaly.customer_id (hop 2)

None of these downstream models appear to be updated in this PR. Renaming without updating all consumers will break them silently (via NULL columns or runtime errors, depending on how they reference the field).

⚠️ Pre-existing Test Failure

The only test on stg_orders3rd_test (singular, severity ERROR) — is already failing. Its query hardcodes orders.customer_id, meaning this rename will further entrench the failure. This should be resolved before merging.

Summary

Risk: HIGH. This PR has two independent blockers: (1) a typo that makes the model unrunnable (named vs renamed), and (2) a breaking column rename with 5 unupdated downstream dependents. Do not merge until both are resolved.


Other findings

  • models/staging/stg_orders.sql:18 The only test on this model (3rd_test) is currently in ERROR status and explicitly references orders.customer_id — this rename will deepen the failure.

Posted by Elementary CI

)

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.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant