I am currently trying to write a PR for dbt, so I was using dbt on the dev/marian-anderson branch which looks like the most up-to-date branch.
While testing the
dbt compile command, I got hit by an error message that says
User does not have bigquery.datasets.create permission in project
And from what I saw in the code it indeed looks like the
dbt compile calls a method
create_schemas() that tries to create datasets on the BigQuery project.
I question whether this is a good thing to do that, especially when the description of the
compile command simply says:
Generates executable SQL from source, model, test, and analysis files. Compiled SQL files are written to the target/ directory.
We are using an older version of dbt in production and using the
dbt compile command in PR-triggered-builds to validate the syntax without having to connect to BigQuery, but I suspect that it might cease working when we upgrade dbt.
I just checked on v0.17 and it looks like it does the same thing there too.
If this is the intended behavious maybe you should update the documentation to explain
compile command does more than just compiling.