如何从 BigQuery 中提取 github 时间线数据
How to pull github timeline data from BigQuery
我无法从 BigQuery
访问 GitHub 时间线。
我正在使用以下查询:
SELECT repository_name, actor_attributes_company, payload_ref_type, payload_action, type, created_at FROM githubarchive:github.timeline WHERE repository_organization = 'foo' and created_at > '2014-07-01'
一切都很好。现在,githubarchive:github.timeline table 似乎不再可用。我环顾四周,发现了另一个 table:
SELECT repository_name, actor_attributes_company, payload_ref_type, payload_action, type, created_at FROM publicdata:samples.github_timeline WHERE repository_organization = 'foo' and created_at > '2014-07-01'
此查询有效,但 returns 零行。当我删除 created_at 限制时,它起作用了,但只返回了 2012 年的几行,所以看起来这只是样本数据。
有谁知道如何从 GitHub 中提取实时时间线数据?
查看 gitubarchive BigQuery 项目
它有三个数据集:日、月、年,分别有每日、每月和每年的数据
的确,publicdata:samples.github_timeline
只有样本数据。
对于真正的 GitHub 存档文档,请查看 http://www.githubarchive.org/
昨天写了一篇关于查询的文章:
示例查询:
SELECT repo.name,
JSON_EXTRACT_SCALAR(payload, '$.action') action,
COUNT(*) c,
FROM [githubarchive:month.201606]
WHERE type IN ('IssuesEvent')
AND repo.name IN ('kubernetes/kubernetes', 'docker/docker', 'tensorflow/tensorflow')
GROUP BY 1,2
ORDER BY 2 DESC
正如 Mikhail 指出的那样,还有另一个数据集包含 GitHub 的所有代码:
我无法从 BigQuery
访问 GitHub 时间线。
我正在使用以下查询:
SELECT repository_name, actor_attributes_company, payload_ref_type, payload_action, type, created_at FROM githubarchive:github.timeline WHERE repository_organization = 'foo' and created_at > '2014-07-01'
一切都很好。现在,githubarchive:github.timeline table 似乎不再可用。我环顾四周,发现了另一个 table:
SELECT repository_name, actor_attributes_company, payload_ref_type, payload_action, type, created_at FROM publicdata:samples.github_timeline WHERE repository_organization = 'foo' and created_at > '2014-07-01'
此查询有效,但 returns 零行。当我删除 created_at 限制时,它起作用了,但只返回了 2012 年的几行,所以看起来这只是样本数据。
有谁知道如何从 GitHub 中提取实时时间线数据?
查看 gitubarchive BigQuery 项目
它有三个数据集:日、月、年,分别有每日、每月和每年的数据
的确,publicdata:samples.github_timeline
只有样本数据。
对于真正的 GitHub 存档文档,请查看 http://www.githubarchive.org/
昨天写了一篇关于查询的文章:
示例查询:
SELECT repo.name,
JSON_EXTRACT_SCALAR(payload, '$.action') action,
COUNT(*) c,
FROM [githubarchive:month.201606]
WHERE type IN ('IssuesEvent')
AND repo.name IN ('kubernetes/kubernetes', 'docker/docker', 'tensorflow/tensorflow')
GROUP BY 1,2
ORDER BY 2 DESC
正如 Mikhail 指出的那样,还有另一个数据集包含 GitHub 的所有代码: