Reputation: 21
create table if not exists [dataset].[table] (id int64, name string, created_at timestamp) partition by date(created_at) cluster by id;
Error running query
Access Denied: Dataset [project]:[dataset]: Permission bigquery.tables.create denied on dataset [project]:[dataset] (or it may not exist).
Upvotes: 2
Views: 29605
Reputation: 1552
From the Error it can be seen that when you are creating a table in your bigquery you are getting the bigquery.tables.create permission denied error.
bigquery.tables.create role is used for creating new tables. You are getting this error because you do not have this permission enabled in your IAM roles in your project.
The bigquery.admin and bigquery.dataEditor roles both contain the bigquery.tables.create permission. so either should be sufficient.
Make sure that the user being the owner has the permissions on the project in which the job is being run.
You can check for the same by going to -
Check this public documentation for Access controls in BigQuery.
Upvotes: 7