我的目标是使用BigQuery标准SQL语法在数据集的多个表中进行查询.
当数据集的所有表遵循相同的数字模式时,我可以成功地使其工作.但是,对于包含其他表的数据集.yesterday,我收到错误:Views cannot be queried through prefix. Matched views are: githubarchive:day.yesterday
这是我使用的查询:
SELECT
COUNT(*)
FROM
`githubarchive.day.*`
WHERE
type = "WatchEvent"
AND _TABLE_SUFFIX BETWEEN '20170101' AND '20170215'
Run Code Online (Sandbox Code Playgroud) 我的目标是随着时间的推移跟踪我的 BigQuery 存储库的受欢迎程度。
我想使用公开可用的 BigQuery 数据集,例如GitHub Archive或GitHub 数据集
GitHub 数据集sample_repos不包含星数的快照:
SELECT
watch_count
FROM
[bigquery-public-data:github_repos.sample_repos]
WHERE
repo_name == 'angular/angular'
Run Code Online (Sandbox Code Playgroud)
返回 5318。
GitHub Archive 是事件的时间线。我可以尝试将它们全部相加,但这些数字与 GitHub UI 中的数字不匹配。我猜是因为它不计算 unstar 动作。这是我使用的查询:
SELECT
COUNT(*)
FROM
[githubarchive:year.2011],
[githubarchive:year.2012],
[githubarchive:year.2013],
[githubarchive:year.2014],
[githubarchive:year.2015],
[githubarchive:year.2016],
TABLE_DATE_RANGE([githubarchive:day.], TIMESTAMP('2017-01-01'), TIMESTAMP('2017-03-30') )
WHERE
repo.name == 'angular/angular'
AND type = "WatchEvent"
Run Code Online (Sandbox Code Playgroud)
返回 24144
实际值为 21,921
我在 App Engine 标准版和灵活版上使用 Node.js。
在日志查看器中,是否可以显示嵌套在请求日志中的应用程序日志?
我正在使用 Cloud Run + Cloud Firestore 构建一个简单的基于 Flask 的应用程序。有一种方法带来了很多数据,日志都显示这个错误:
`Memory limit of 244M exceeded with 248M used. Consider increasing the memory limit, see https://cloud.google.com/run/docs/configuring/memory-limits`
Run Code Online (Sandbox Code Playgroud)
如何增加 cloudbuild.yaml 中的内存限制?我们的 YAML 文件包含以下内容:
# cloudbuild.yaml
steps:
# build & push the container image
- name: "gcr.io/kaniko-project/executor:latest"
args: ["--cache=true", "--cache-ttl=48h", "--destination=gcr.io/$PROJECT_ID/todo:latest"]
# Deploy container image to Cloud Run
- name: "gcr.io/cloud-builders/gcloud"
args: ['beta', 'run', 'deploy', 'todo', '--image', 'gcr.io/$PROJECT_ID/todo:latest', '--region', 'us-central1', '--allow-unauthenticated', '--platform', 'managed']
Run Code Online (Sandbox Code Playgroud)
谢谢
python containers flask google-cloud-platform google-cloud-run