I am using Dataform to create a table on a dataset that I have created on a Google Cloud project, but I get this error: "Access Denied: BigQuery BigQuery: Permission denied while getting Drive credentials."
Why? What should I do about this?
In a compiled version of a sqlx dataform file I try to create or replace a table and this causes the error.
CREATE OR REPLACE TABLE my_project_id.my_data_set.my_table
I'm not using a table that reads something from Google Drive but I am creating a new one. The service account associated with my dataform project has Dataset Owner access rights to my_data_set, and interestingly the dataform project is able to create views, but not tables.
Also, the dataform workspace uses a table that reads a Google Spreadsheet, but I don't get any errors on that.
I answer myself: the solution is to check if the dataform project reads tables which are built on top of spreadsheets on Google Drive. Then one needs to add view rights on those spreadsheets to the service account associated with the dataform project.
This is slightly confusing, as the dataform project has been perfectly able to read those tables with bigquery access rights and the table that I am creating is done three steps after reading the table based on spreadsheet.