Reputation: 31
When Vertex Pipelines component launches a BigQuery job, I encountered the following error
google.api_core.exceptions.Forbidden: 403 POST https://bigquery.googleapis.com/bigquery/v2/projects/ddde1b02a7e52415cp-tp/jobs?prettyPrint=false:
Access Denied: Project ddde1b02a7e52415cp-tp: User does not have bigquery.jobs.create permission in project ddde1b02a7e52415cp-tp.
Upvotes: 0
Views: 357
Reputation: 31
This is due to uninitialized bigquery client.
The code is running in a managed environment which is in a different project than the one running the pipeline. The code won't be able to automatically identify the project running the pipeline.
Initializing the BQ client by explicitly specify the project ID in the Bigquery code solved the issue
bigquery.Client(project=[your-project], credentials=credentials)
Upvotes: 1