我正在使用Google APIs Client Library for php,并且希望能够在将查询发送到执行之前对其进行验证。 Google BigQuery API中是否有任何方法可以验证查询(在红色框中获取文本)。
我找不到我正在阅读本节https://cloud.google.com/bigquery/docs/reference/v2/jobs/query
最佳答案
在dryRun
请求上将 jobs.query
参数设置为true应该可以验证查询。空运行查询不能捕获所有错误,但可以捕获很多错误。 Web UI中的查询验证器使用空运行查询来提供实时错误,如屏幕截图所示。dryRun
参数的文档:
[Optional] If set, don't actually run this job. A valid query will return a mostly empty response with some processing statistics, while an invalid query will return the same error it would if it wasn't a dry run.
关于google-api - 有什么方法可以验证BigQuery API中的查询,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31060881/