python - 通过 Python API 提交的 BigQuery 作业历史记录

标签 python google-bigquery google-cloud-platform

我正在使用 Python API 提交 BigQuery 查询,但是当我访问 bigquery.cloud.google.com 并在查询历史记录中时,我无法找到通过 API 提交的查询。在我的用例中,我试图跟踪每个查询中正在处理的数据量以及整个 BigQuery 帐户中处理的数据总量。有关如何查找上述内容的任何信息都会有所帮助。

谢谢。

最佳答案

在 BQ UI 中,您只能查看由您登录的帐户发出的作业。这就是为什么当您使用个人帐户登录时看不到服务帐户发布的职位的原因

要获取您的服务帐户发布的作业 - 您可以使用 Jobs.list API

Lists all jobs that you started in the specified project. Job information is available for a six month period after creation. The job list is sorted in reverse chronological order, by job creation time. Requires the Can View project role, or the Is Owner project role if you set the allUsers property.

关于python - 通过 Python API 提交的 BigQuery 作业历史记录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47583485/

相关文章:

python - 使用 Python 拆分 ps 的输出

python - 二元组检测: Comparing a string with a list in order to merge certain substrings

node.js - 如何使用 createWriteStream 将 JSON 流式传输到 BigQuery 表?

sql - Bigquery - 忽略 NULL 值的列之间的平均值

javascript - Google Vision API 调用的 CORS 问题

python - Google Cloud Shell 使用的是 project=cloud-devshell-dev 而不是我的实际项目,找不到已启用的 API

python - 我该如何解决以下SQL语法错误

python - 使内部矩形适合关节

python - 如何从 Google Dataflow 中的 PCollection 中获取元素列表并在管道中使用它来循环写入转换?

google-cloud-platform - 长时间运行的 Dataflow 作业失败,用户代码中没有错误