在Google BigQuery API中,查询响应的默认超时是多少? [英] In Google BigQuery API, what is the default timeout for a query response?

查看:125
本文介绍了在Google BigQuery API中,查询响应的默认超时是多少?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Google BigQuery API中,查询响应的默认超时是多少?

In Google BigQuery API, what is the default timeout for a query response?

换句话说,默认情况下等待多长时间,直到响应针对未完成的作业返回null为止.

In other words, how long does it wait by default until the response returns null for an incomplete job.

推荐答案

jobs.query中的="noreferrer"> timeoutMs 说:

The documentation for timeoutMs in the jobs.query says:

[可选]等待查询完成的时间,以 请求超时并返回之前的毫秒数.请注意, 只是请求的超时,不是查询的超时.如果查询需要 运行时间超过超时值,则调用返回而没有任何超时 结果,并且'jobComplete'标志设置为false.你可以打电话 GetQueryResults()等待查询完成并读取 结果.默认值为10000毫秒(10秒).

[Optional] How long to wait for the query to complete, in milliseconds, before the request times out and returns. Note that this is only a timeout for the request, not the query. If the query takes longer to run than the timeout value, the call returns without any results and with the 'jobComplete' flag set to false. You can call GetQueryResults() to wait for the query to complete and read the results. The default value is 10000 milliseconds (10 seconds).

但是,如果我理解正确,我想你是在问超时之前查询可以执行多长时间.我们将查询执行的时间限制为六个小时(在撰写本文时),尽管我不知道是否在某处明确记录了该时间.但总的来说,查询的运行时间应该不会花那么长时间.

If I understand correctly, though, I think you're asking how long a query can execute before timing out. We limit query execution to six hours (at the time of this writing), though I don't know if that's explicitly documented somewhere. In general, though, queries shouldn't take nearly that long to run.

如果您想对查询完成实施更严格的超时,则可以使用

If you want to impose a stricter timeout on query completion, you could use the jobs.cancel API after a specific amount of elapsed time, though note that you will still be charged for execution of the query.

这篇关于在Google BigQuery API中,查询响应的默认超时是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆