Diagnose and fix a model that broke due to an upstream column rename. Five prompts plus terminal verification. Identifies the failing column, finds every reference (SQL, schema tests, YAML), edits the source-side identifier while preserving the downstream alias, recompiles, and re-runs.
Path A walkthrough: RET_PRODUCTS.brand renamed to brand_name. ~8 downstream files, alias-preserved.
Path B walkthrough: RET_ORDERS.status renamed to order_status. ~11 files including the YAML column tests in _staging__models.yml.
Path C walkthrough: RET_CUSTOMERS.customer_type renamed to segment. 5 files plus the YAML tests.
A Fivetran-synced retail source column was renamed upstream overnight. The dbt run fails referencing the old column name.
Find what changed, find every file that referenced the old name (SQL, source definitions, YAML tests), edit the source-side identifier while preserving the downstream alias, recompile, re-run.
Pick one path before Step 1. The prompt flow is identical across paths; placeholders and blast radius differ.
retail.RET_PRODUCTS.brand renamed to brand_name.
Blast radius: stg_products plus ~8 downstream files - 4 intermediates (int_inventory_status, int_order_items_enriched, int_product_sales_summary, int_products_enriched) and 4 marts (dim_products, fct_inventory_transactions, fct_order_items, agg_product_performance).
retail.RET_ORDERS.status renamed to order_status.
Blast radius: stg_orders, the YAML column tests in _staging__models.yml, and ~7 downstream files including int_orders_enriched, int_daily_revenue, int_customer_order_summary, and fct_orders. The staging model already aliases status as order_status.
retail.RET_CUSTOMERS.customer_type renamed to segment.
Blast radius: stg_customers, the YAML column tests in _staging__models.yml, and 5 downstream files (int_customer_cohorts, dim_customers, customer_lifetime_value, fct_tickets, agg_customer_cohorts).
The prompts use placeholders [OLD_COLUMN], [NEW_COLUMN], and [BROKEN_MODEL]. Substitute the values for your path. The placeholder table is below.
The lab environment ships with the rename already applied to the source table. Run dbt first to surface the real error, then proceed in dbt Wizard.
dbt run --select [BROKEN_MODEL]+You will see a compile or runtime error referencing
[OLD_COLUMN]. Capture the exact error text; Step 1 uses it.
dbt Wizard reads the most recent run results and identifies the model name, failing column, and upstream source.
My dbt run just failed. Read the most recent run results and tell me which model failed, what the error was, and which upstream source or column the error references.
Then ask for the current schema.
Describe the current schema of the upstream source table that [BROKEN_MODEL] reads from. List every column that exists today.
dbt Wizard pulls the live column list from Snowflake and compares it against what the model references. Identifies the rename concretely.
Show me every model, source definition, and test in this project that references the column [OLD_COLUMN]. I need a complete blast-radius list before I change anything.
[OLD_COLUMN] renamed to [NEW_COLUMN]. Inferring the new name from context is the most common source of incorrect fixes here.
dbt Wizard returns every file that references the old name: staging SQL, intermediate SQL, mart SQL, column tests in _staging__models.yml, and other YAML descriptions.
Update [BROKEN_MODEL] and every other file you just listed to use [NEW_COLUMN] instead of [OLD_COLUMN]. Keep the downstream column alias the same so consumers of these models don't break - only the source-side reference should change.
_staging__models.yml is in the result." Column-test definitions in _staging__models.yml are the most common source of incomplete fixes in this scenario.
Change the source-side reference to [NEW_COLUMN] but keep the public column name (brand, order_status, customer_type) so downstream models and dashboards continue to resolve without further changes. A staging model selecting brand becomes select brand_name as brand, not select brand_name.
Compile [BROKEN_MODEL] and every downstream model you just edited, then preview the first 10 rows of [BROKEN_MODEL] ordered deterministically. Do not materialize anything yet.
If any file still references [OLD_COLUMN], compile fails here rather than at runtime. The preview confirms the renamed column flows through under its original public name.
[OLD_COLUMN] (alias preserved) with reasonable values. No compile errors anywhere in the lineage.
A green run here closes the loop on the original failure from the pre-step.
dbt run --select [BROKEN_MODEL]+
stg_productsbrandbrand_namestg_ordersstatusorder_statusfct_ordersstg_customerscustomer_typesegmentstg_products, stg_orders, or stg_customers) compiles, runs, and emits the renamed source column under its original public name. Every downstream model resolves without further edits.
Skill definition with all three paths, blast-radius detail, and instructor notes.
Every prompt in this scenario, formatted for print.
Return to the overview to pick another scenario.