The problem I’m having
- following the docs here: BigQuery setup | dbt Developer Hub
- set up Python 3.9, poetry, dbt-core 1.2.0 + bigquery 1.2.0
- set up GCP user with role grants “BigQuery Data Editor” and “BigQuery User”
- set up my
profiles.yml
viadbt init
dbt_project.yml
is the same we’re using in the team
When I hit dbt compile
, I get an error message:
% poetry run dbt compile
16:58:08 Running with dbt=1.2.0
16:58:08 Found 426 models, 525 tests, 3 snapshots, 2 analyses, 629 macros, 0 operations, 0 seed files, 148 sources, 2 exposures, 0 metrics
16:58:08
16:58:08 Encountered an error:
Database Error
Runtime Error
dbt encountered an error while trying to read your profiles.yml file.
File was not found.
Note that there are two spaces after the word “File”, indicating a null string
poetry run dbt debug
results in
% poetry run dbt debug
17:09:15 Running with dbt=1.2.0
dbt version: 1.2.0
python version: 3.9.18
python path: ~/Library/Caches/pypoetry/virtualenvs/poetry-warehouse-{{HASH}}-py3.9/bin/python
os info: macOS-13.3-x86_64-i386-64bit
Using profiles.yml file at ~/.dbt/profiles.yml
Using dbt_project.yml file at ~/{{DBT_PROJECT}}/dbt_project.yml
Configuration:
profiles.yml file [OK found and valid]
dbt_project.yml file [OK found and valid]
Required dependencies:
- git [OK found]
Connection:
method: oauth
database: {{DATABASE}}
schema: {{USERNAME}}
location: US
priority: interactive
timeout_seconds: 300
maximum_bytes_billed: None
execution_project: {{PROJECT_NAME}}
job_retry_deadline_seconds: None
job_retries: 4
job_creation_timeout_seconds: None
job_execution_timeout_seconds: 300
Connection test: [ERROR]
1 check failed:
dbt was unable to connect to the specified database.
The database returned the following error:
>Database Error
Runtime Error
dbt encountered an error while trying to read your profiles.yml file.
File was not found.
Check your database credentials and try again. For more information, visit:
https://docs.getdbt.com/docs/configure-your-profile
and in the logs
e[0m19:26:02.459021 [debug] [ThreadPool]: BigQuery adapter: Got an error when attempting to create a bigquery client: 'Runtime Error
dbt encountered an error while trying to read your profiles.yml file.
File was not found.
'
The context of why I’m trying to do this
I want to use dbt, but it won’t let me
I’m the only team member who’s having these (permissions?) problems.
The error message is of no help
What am I missing? I wish the error message would at least tell me the name of the property it tried to access, or what number line in profiles.yml
is making it unhappy
What I’ve already tried
See above
Some example code or error messages
See above
The context of why I’m trying to do this
I want to use dbt, but it won’t let me
I’m the only team member who’s having these (permissions?) problems.
The error message is of no help
What am I missing? I wish the error message would at least tell me the name of the property it tried to access, or what number line in profiles.yml
is making it unhappy
What I’ve already tried
See above
Some example code or error messages
See above