connection to dbt and snowfalke was successful but when tried to run this command:

$ dbt run 

it gives this error

ERROR: Runtime Error Could not find profile named 'learn_dbt' Encountered an error: Runtime Error Could not run dbt"

Am I making any command mistake?

5 Answers

There are a few different approaches to solving to this problem:

  1. Check the profile key in your dbt_project.yml
  2. Check the profiles you have in your profiles.yml
  3. Run dbt debug --config-dir to check where dbt thinks your config file is.

See the dbt documentation here

This is a problem in your profiles.yml file. You are running a project that requires you build a "dbt-learn" profile to run.

DBT profile.yml DOC

I think got the solution for this error if we give the dir name i,e dbt run --profiles-dir <path/of/.dbt folder>

For these types of errors you must ensure that your

**profile: 'snowflake' # This setting configures which "profile" dbt uses for this project.** 

matches the first key in profile.yml see

For me the issue was that i didn't put all string profile parameters value(like host, user, pass...) inside a quotation marks. While there is an example in documentation when they are also omitted. So it was something like this

jaffle_shop: target: dev outputs: dev: type: postgres threads: 1 host: localhost port: 5432 user: postgres pass: example dbname: postgres schema: public 

And it didn't work, but after i changed it to the following everything worked

jaffle_shop: outputs: dev: type: postgres threads: 1 host: "localhost" port: 5432 user: "postgres" pass: "example" dbname: "postgres" schema: "public" 

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.