BigQuery在第一次getQueryResults时引发了分页标记过期 [英] BigQuery raises Pagination token expired on first getQueryResults
问题描述
我们看到BigQuery在第一次尝试调用getQueryResults(例如没有分页标记)时引发的查询错误的零星情况(4x今天)。错误是:
HttpError 400请求 https://www.googleapis.com/bigquery/v2/projects/.../queries/job_...?alt=json 返回分页标记已过期>
get()调用的作业状态返回'DONE'。
这是bq等待失败作业的输出:
等待...(0s )当前状态:完成
工作
工作类型状态开始时间持续时间字节处理
查询失败24五月08:00:06 0:00:00
作业执行期间遇到错误。分页标记过期
请注意,这在提交查询作业后的几秒内发生。
发生在这里?
原来这只是一个错误的错误信息。问题在于BigQuery在过去7天内只支持装饰器。对于上述作业中使用的查询,过去指定的时间范围为30天。
错误应该说无效的表装饰器,尝试从过去的XXXX时间读取。相反,它说分页令牌已过期。原因是在封面下的分页令牌使用了与表装饰器类似的机制,并且错误的消息被通过了。
因此,我们将修复错误消息,但是应该修复的查询也有问题。
We're seeing sporadic cases (4x today) of query errrors that BigQuery raises at the firs attempt to call getQueryResults (e.g. without a pagination token). The error is:
HttpError 400 when requesting https://www.googleapis.com/bigquery/v2/projects/.../queries/job_...?alt=json returned "Pagination token expired">
The status of the job on a get() call returned 'DONE'.
This is the output of a bq wait for the failed job:
Waiting on ... (0s) Current status: DONE
Job
Job Type State Start Time Duration Bytes Processed
query FAILURE 24 May 08:00:06 0:00:00
Errors encountered during job execution. Pagination token expired
Note that this happened within seconds after submitting the query job.
Any ideas on what could be happening here?
It turns out this is just a bad error message. The problem is that BigQuery only supports decorators within the last 7 days. For the query used in the job mentioned above, the time range specified was 30 days in the past.
The error should have said something like "invalid table decorator, trying to read from a time XXXX in the past". Instead it said "Pagination token expired". The reason for this is that pagination tokens under the covers use a similar mechanism to table decorators, and the wrong message got plumbed through.
So we'll fix the error message, but there is also a problem with the query that should be fixed.
这篇关于BigQuery在第一次getQueryResults时引发了分页标记过期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!