我正在使用 Google Cloud Platform 的 Google Cloud Monitoring。
我为我监控的对象创建了一些警报策略。但是,当有警报触发时,我希望将一些未包含的信息包含在电子邮件中。所以我想使用一个云函数,如果在这种情况下可以做到的话,它将触发我创建的策略之一。
如果可能,请提供有关此问题的建议。
python-3.x google-cloud-platform google-cloud-functions stackdriver google-cloud-monitoring
我正在查询多个表,我可以看到每个查询的成本供我个人使用。当我查看查询历史时,我只看到我在我的帐户上运行的查询。
所以我的问题是,是否有可能以某种方式从查询历史记录中查看项目中其他人运行的查询(以及查询的成本)?
我正在编写一个将查询结果写入 BQ 表的 python 脚本。第一次运行脚本后,它总是在此之后出错,并显示以下错误:google.api_core.exceptions.Conflict: 409 Already Exists: Table project-id.dataset-id
. 我不明白为什么每次运行脚本时它都试图创建一个表。我是否指定了任何特定参数?
这是来自谷歌的文档。我以此为例,并认为已经创建了当前表。我在哪里可以阻止 api 创建同一个表?
from google.cloud import bigquery
# TODO(developer): Construct a BigQuery client object.
client = bigquery.Client()
# TODO(developer): Set table_id to the ID of the destination table.
table_id = "your-project.your_dataset.your_table_name"
job_config = bigquery.QueryJobConfig(destination=table_id)
sql = """
SELECT corpus
FROM `bigquery-public-data.samples.shakespeare`
GROUP BY corpus;
"""
# Start the query, passing in the extra configuration.
query_job = client.query(sql, job_config=job_config) # Make an API request.
query_job.result() # Wait for …
Run Code Online (Sandbox Code Playgroud)