12

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?

James Z
  • 12,209
  • 10
  • 24
  • 44
Ravi
  • 203
  • 1
  • 3
  • 6

5 Answers5

14

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

Thomas Dickson
  • 313
  • 3
  • 9
5

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

luther
  • 254
  • 1
  • 7
1

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

Ravi
  • 203
  • 1
  • 3
  • 6
0

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 https://docs.getdbt.com/dbt-cli/configure-your-profile

0

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"