Google BigQuery结算通知

时间:2017-09-14 07:44:38

标签: google-bigquery

如何知道我是否超过了Google BQ上的1TB免费分析查询?我似乎无法在控制台的计费窗格中找到它。

1 个答案:

答案 0 :(得分:2)

对于手动解决方案,您可以将所有BigQuery日志导出到BigQuery中 - 然后运行查询以跟踪计费的总字节数:

#standardSQL
SELECT TIMESTAMP_TRUNC(timestamp, MONTH) month
  , ROUND(SUM(protopayload_auditlog.servicedata_v1_bigquery.jobCompletedEvent.job.jobStatistics.totalBilledBytes
             ) / 1000000000, 2) gb_queried
FROM `fh-bigquery.audit.cloudaudit_googleapis_com_data_access_2017*` 
GROUP BY 1
ORDER BY 1

要设置日志导出和其他查询,请参阅:https://cloud.google.com/bigquery/audit-logs