Nipun Seri
Nipun Seri

Reputation: 21

Why do I get the permission denied error when creating a table in BigQuery GCP Console with an "owner" account?

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

Answers (1)

Sandeep Mohanty
Sandeep Mohanty

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 -

  1. go to google cloud console
  2. navigate to IAM and Services
  3. Go to roles and check for this role is enabled or not, if not then enable it.

Check this public documentation for Access controls in BigQuery.

Access Controls

Upvotes: 7

Related Questions