Reputation: 11
I have a python program executing bigquery using cloud service account successfully. When I try to schedule the python program using Jenkins, I see the below error The gcloud user has bigquery editor, dataowner and admin permission to table, and dataset.
Log: gcloud auth activate-service-account abc --key-file=**** Activated service account credentials for: abc273721.iam.gserviceaccount.com] gcloud config set project p1 Updated property p1. 403 Access Denied: Table XYZ: User does not have permission to query table
Upvotes: 0
Views: 620
Reputation: 3663
Create a service account with BigQuery Admin Role
and download JSON key file (example
: data-lab.json).
Use below code:
gcloud auth activate-service-account "service-account" --key-file=data-lab.json --project="project-name"
Upvotes: 0
Reputation: 1078
I see that you have provided all the required roles; bigquery.dataOwner & bigquery.admin,as mentioned here but it looks like you have to also grant the service account access to the dataset.
Upvotes: 0