Search code examples
dbt

DBT problem with yml file: Profile my-bigquery-db in profiles.yml is empty


I am doing the DBT hello world tutorial found here, and I have created my first project on a windows machine. My profiles.yml file looks like this:

    my-bigquery-db:
target: dev
outputs:
dev:
type: bigquery
method: service-account
project: abiding-operand-286102 
dataset: xxxDBTtestO1
threads: 1
keyfile: C:\Users\xxx\.dbt\abiding-operand-286102-ed9e3c9c13cd.json
timeout_seconds: 300

when I execute dbt run I get:

Running with dbt=0.17.2 Encountered an error while reading profiles: ERROR Runtime Error

dbt encountered an error while trying to read your profiles.yml file.

Profile my-bigquery-db in profiles.yml is empty

Defined profiles:

  • my-bigquery-db
  • target
  • outputs
  • dev
  • type
  • method
  • project
  • dataset
  • threads
  • keyfile
  • timeout_seconds

Any idea?


Solution

  • At first glance from both your code and the source walkthrough, this is just a yml config problem. YML is a markup language that is white-space sensitive. And by just looking at the example that you may have pulled from - it doesn't look appropriately white spaced to me.

    I'm not sure if you can simply copy from the below but it might be worth a shot.

    my-bigquery-db:
      target: dev
      outputs:
        dev:
          type: bigquery
          method: service-account
          project: abiding-operand-286102 
          dataset: xxxDBTtestO1
          threads: 1
          keyfile: C:\Users\xxx\.dbt\abiding-operand-286102-ed9e3c9c13cd.json
          timeout_seconds: 300
    

    Basically - your dbt profile.yml needs to be setup with the sections at certain levels (not unlike python indentation or any other white spacing scheme).

    enter image description here