and_apo
and_apo

Reputation: 1297

Google BigQuery error 401 msg:Unauthorized when processing large amount of data

We are trying to retrieve a daily table from Google Big Query, which averages to around 40million rows per day through HTTP requests:

Having ran this process a few times whenever the total number of processed rows reaches near a million a NULL object is returned and we get the error 401 msg:Unauthorized.

Can you provide some more info on why this is happening? Having a look in the list of BigQuery's troubleshooting errors https://cloud.google.com/bigquery/troubleshooting-errors a 401 error is only described as an Authentication error, but I am pretty sure we succeed in authenticating with Google Big Query in the earlier steps.

Thanks for your time

Upvotes: 3

Views: 1256

Answers (1)

Pentium10
Pentium10

Reputation: 208002

The authorization token is valid for 3600 seconds, and you need to refresh the token in order to continue with the pagination.

Most libraries out there have dedicated method to refresh the token.

Upvotes: 0

Related Questions