Getting the following error by running dbt run:
dbt run
13:18:56 Running with dbt=1.11.12
13:18:56 Registered adapter: postgres=1.11.0-b2
13:18:57 Unable to do partial parsing because profile has changed
13:18:57 Unable to do partial parsing because a project config has changed
13:18:59 Found 7 models, 12 data tests, 712 macros
13:19:00
13:19:00 Concurrency: 1 threads (target=‘source’)
13:19:00
13:19:00 1 of 7 START sql table model classicmodels_star_schema.dates … [RUN]
13:19:00 1 of 7 OK created sql table model classicmodels_star_schema.dates … [SELECT 1095 in 0.29s]
13:19:00 2 of 7 START sql table model classicmodels_star_schema.dim_customers … [RUN]
13:19:00 2 of 7 ERROR creating sql table model classicmodels_star_schema.dim_customers .. [ERROR in 0.10s]
13:19:00 3 of 7 START sql table model classicmodels_star_schema.dim_employees … [RUN]
13:19:00 3 of 7 ERROR creating sql table model classicmodels_star_schema.dim_employees .. [ERROR in 0.11s]
13:19:00 4 of 7 START sql table model classicmodels_star_schema.dim_offices … [RUN]
13:19:00 4 of 7 ERROR creating sql table model classicmodels_star_schema.dim_offices … [ERROR in 0.09s]
13:19:00 5 of 7 START sql table model classicmodels_star_schema.dim_products … [RUN]
13:19:01 5 of 7 ERROR creating sql table model classicmodels_star_schema.dim_products … [ERROR in 0.10s]
13:19:01 6 of 7 START sql table model classicmodels_star_schema.fact_orders … [RUN]
13:19:01 6 of 7 ERROR creating sql table model classicmodels_star_schema.fact_orders … [ERROR in 0.10s]
13:19:01 7 of 7 START sql table model classicmodels_star_schema.dim_dates … [RUN]
13:19:01 7 of 7 OK created sql table model classicmodels_star_schema.dim_dates … [SELECT 1095 in 0.38s]
13:19:01
13:19:01 Finished running 7 table models in 0 hours 0 minutes and 1.61 seconds (1.61s).
13:19:01
13:19:01 Completed with 5 errors, 0 partial successes, and 0 warnings:
13:19:01
13:19:01 Failure in model dim_customers (models/star_schema/dim_customers.sql)
13:19:01 Database Error in model dim_customers (models/star_schema/dim_customers.sql)
relation “classicmodels.customers” does not exist
LINE 25: FROM classicmodels.customers
^
compiled code at target/run/classicmodels_modeling/models/star_schema/dim_customers.sql
13:19:01
13:19:01 compiled code at target/compiled/classicmodels_modeling/models/star_schema/dim_customers.sql
13:19:01
13:19:01 Failure in model dim_employees (models/star_schema/dim_employees.sql)
13:19:01 Database Error in model dim_employees (models/star_schema/dim_employees.sql)
relation “classicmodels.employees” does not exist
LINE 18: FROM classicmodels.employees
^
compiled code at target/run/classicmodels_modeling/models/star_schema/dim_employees.sql
13:19:01
13:19:01 compiled code at target/compiled/classicmodels_modeling/models/star_schema/dim_employees.sql
13:19:01
13:19:01 Failure in model dim_offices (models/star_schema/dim_offices.sql)
13:19:01 Database Error in model dim_offices (models/star_schema/dim_offices.sql)
relation “classicmodels.offices” does not exist
LINE 19: FROM classicmodels.offices
^
compiled code at target/run/classicmodels_modeling/models/star_schema/dim_offices.sql
13:19:01
13:19:01 compiled code at target/compiled/classicmodels_modeling/models/star_schema/dim_offices.sql
13:19:01
13:19:01 Failure in model dim_products (models/star_schema/dim_products.sql)
13:19:01 Database Error in model dim_products (models/star_schema/dim_products.sql)
relation “classicmodels.products” does not exist
LINE 20: FROM classicmodels.products
^
compiled code at target/run/classicmodels_modeling/models/star_schema/dim_products.sql
13:19:01
13:19:01 compiled code at target/compiled/classicmodels_modeling/models/star_schema/dim_products.sql
13:19:01
13:19:01 Failure in model fact_orders (models/star_schema/fact_orders.sql)
13:19:01 Database Error in model fact_orders (models/star_schema/fact_orders.sql)
relation “classicmodels.orders” does not exist
LINE 23: FROM classicmodels.orders
^
compiled code at target/run/classicmodels_modeling/models/star_schema/fact_orders.sql
13:19:01
13:19:01 compiled code at target/compiled/classicmodels_modeling/models/star_schema/fact_orders.sql
13:19:01
13:19:01 Done. PASS=2 WARN=0 ERROR=5 SKIP=0 NO-OP=0 TOTAL=7
Hi, is this error still happening? Did you check the profiles.yml to match the PostgreSQL endpoint?
I am getting the same error. For some reason the “classicmodels” source schema that is referenced in each of the dbt models (models/star_schema dbt) does not exist in the Postgres DB.
The connection to the Postgres DB using the endpoint from CloudFormation is functioning properly, that doesn’t seem to be the root cause.
I have the same issue mentioned by pprisinzano
Hi @pprisinzano and @Shuai_Zhang1. The source is pulled from AWS, so if the time is up (meaning it took you longer to run that command and AWS was shutting down) or you run this command early, before the stack is completed, even though the endpoint was reachable, you will get this error.
To solve it, you can either wait and restart the lab or check the CloudFormation stack status in the AWS console.
