Any good ways to run a data warehouse query across all public github issues? Like…
- User
Any good ways to run a data warehouse query across all public github issues? Like bigquery or clickhouse or something? I want to know how many public issue comments have been posted by a user
Assistant
There are several good options for querying GitHub data at scale: GitHub Archive + BigQuery (Recommended) The easiest approach is using GitHub's public dataset on Google BigQuery. GitHub Archive automatically exports all public GitHub events to BigQuery, including issues and comments. You can query it like this: sql SELECT actor.login as username, COUNT() as comment_count FROM
githubarchive.day.20*WHERE type = 'IssueCommentEvent' AND actor.login = 'username_here' GROUP BY actor.login For a broader time range or more recent data: sql SELECT actor.login as username, COUNT() as comment_count FROMgithubarchive.month.*WHERE type = 'IssueCommentEvent' AND actor.login = 'username_here' AND _TABLE_SUFFIX >= '202301' -- From Jan 2023 GROUP BY actor.login GH Archive + ClickHouse ClickHouse also has GitHub data available. You can use their public playground or set up your own instance with the GitHub dataset. GitHub GraphQL API For smaller-scale queries or more recent data, you can use GitHub's GraphQL API: graphql { user(login: "username") { issueComments(first: 100) { totalCount nodes { createdAt issue { title repository { name } } } } } } Other Options GitHub REST API: More limited but works for smaller datasets GHTorrent: Academic dataset with GitHub data, but less frequently updated Custom scraping: Not recommended due to rate limits and ToS considerations with GitHub Archive is probably your best bet for comprehensive historical data analysis. It's free up to 1TB of queries per month and has all public GitHub activity going back years.