Search Shortcut cmd + k | ctrl + k

Experimental gh:// filesystem support

Maintainer(s): carlopi

Compatibility Matrix

This table covers all DuckDB releases that have not reached end-of-life, including LTS releases, and shows the 2 most recent patch releases of each. Older patch releases are not listed, but the extension may be available for them as well.

Platform 1.4.4 1.4.5 1.5.5 1.5.6 2.0.0
Linux AMD64
Linux ARM64
macOS AMD64
macOS ARM64
Windows AMD64
Windows ARM64
WebAssembly

Installing and Loading

INSTALL gh FROM community;
LOAD gh;

Example

-- Read a CSV straight from GitHub
SELECT * FROM read_csv('gh://duckdb/duckdb@main/data/csv/issue2934.csv') LIMIT 5;

-- Star counts for all DuckDB repos
SELECT name, stargazers_count, language
FROM gh_repo('duckdb/*')
ORDER BY stargazers_count DESC;

-- Open issues for a repo
SELECT number, title, labels
FROM gh_issues('duckdb/duckdb')
ORDER BY number DESC
LIMIT 20;

-- Recursively read all CSVs under a directory
SELECT count(*) FROM read_csv('gh://duckdb/duckdb@main/data/csv/glob/**/*.csv');

Added Functions

function_name function_type description comment examples
gh_issues table Fetches GitHub issues for a repository as a table, one row per issue. Pull requests are excluded. Paginates automatically. The optional 'state' parameter filters by issue state: 'open' (default), 'closed', or 'all'. NULL [SELECT number, title, user FROM gh_issues('duckdb/duckdb');, SELECT number, title FROM gh_issues('duckdb/duckdb', state := 'closed') ORDER BY closed_at DESC;, SELECT count(*) FROM gh_issues('duckdb/duckdb', state := 'all');]
gh_prs table Fetches GitHub pull requests for a repository as a table, one row per PR. Paginates automatically. The optional 'state' parameter filters by PR state: 'open' (default), 'closed', or 'all'. Includes 'author_association' (the same signal as the 'Member'/'Owner'/'Contributor' badge in the GitHub UI). NULL [SELECT number, title, user FROM gh_prs('duckdb/duckdb');, SELECT number, user FROM gh_prs('duckdb/community-extensions', state := 'all') WHERE author_association IN ('MEMBER', 'OWNER');, SELECT count(*) FROM gh_prs('duckdb/duckdb', state := 'all');]
gh_repo table Fetches GitHub repository metadata for a single repository or all repositories for an org/user. Pass 'owner/repo' for one repo, or 'owner/*' to expand to all repos belonging to that org or user. NULL [SELECT name, stargazers_count, language FROM gh_repo('duckdb/duckdb');, SELECT name, stargazers_count FROM gh_repo('my-org/*') ORDER BY stargazers_count DESC;]
gh_repos table Table in-out function that fetches GitHub repository metadata for each 'owner/repo' string in the input table. 'owner/*' rows are expanded to all repositories for that org or user. Accepts any subquery or VALUES list that returns a single VARCHAR column. NULL [SELECT name, stargazers_count FROM gh_repos((VALUES ('duckdb/duckdb'), ('duckdb/pg_duckdb')));, SELECT r.name, r.language FROM my_repos, gh_repos((SELECT repo_name FROM my_repos)) r;]

Overloaded Functions

This extension does not add any function overloads.

Added Types

This extension does not add any types.

Added Settings

This extension does not add any settings.