bigquery/ERR/2023_005
Scheduled query not failing due to outdated credentials.
Product: BigQuery Rule class: ERR - Something that is very likely to be wrong
Description
If you’re scheduling an existing query, you might need to update the user credentials on the query. Credentials are automatically up to date for new scheduled queries. Some other situations that could require updating credentials include the following:
- You want to query Google Drive data in a scheduled query.
- You receive an INVALID_USER error when you attempt to schedule the query:
Error code 5 : Authentication failure: User Id not found. Error code: INVALID_USERID
Remediation
Scheduled queries are a kind of transfer. To update the credentials of a scheduled query, you can use the bq_cli to update the transfer configuration.
Enter the bq update
command and supply the transfer flag --transfer_config
.
The following flags are also required:
--update_credentials
Optional flag:
--service_account_name
is for authenticating your scheduled query with a service account instead of your individual user account.