while running the dbt run command gets error
Asked Answered
dbt
C

5

13

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?

Charter answered 5/7, 2020 at 15:0 Comment(0)
P
16

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

Pianoforte answered 10/6, 2021 at 7:44 Comment(0)
M
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

Magnetomotive answered 6/7, 2020 at 11:58 Comment(0)
C
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>

Charter answered 6/7, 2020 at 9:56 Comment(0)
D
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

Detestation answered 17/6, 2022 at 12:32 Comment(0)
B
-1

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"
Bachelorism answered 11/10, 2022 at 9:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.