dbt Analytics Engineering · Debugging data modeling errors
dbt Analytics Engineering · Debugging data modeling errors
dbt run, you see the following error in your terminal:
Compilation Error in model dim_customers (models/marts/dim_customers.sql)
'customer_id' is ambiguous. This is happening because the column is present in more than one table used in this query.
Your model joins stg_customers and stg_orders, and both tables have a customer_id column. What is the most direct fix?