Skip to content
DuckDB community extension

huggingface

Discover, query, profile, and estimate the storage of Hugging Face datasets

01 / SETUP

Install and load

Run these commands in a Haybarn SQL session. The extension is available from the community repository.

Haybarn 2.0.0 · SQL
INSTALL huggingface FROM community;
LOAD huggingface FROM community;

Using upstream DuckDB? Follow the maintainer’s installation instructions.

02 / QUERY

Usage example

SQL
FROM hf_files(
    'ibm/duorc',
    config = 'ParaphraseRC',
    split = 'train'
);

Provided by dentiny. Not yet verified on Haybarn 2.0.0.

Sample data & setup

About this extension

The huggingface extension works with Parquet datasets hosted on the Hugging Face Hub. It can discover Parquet files, scan records with projection and filter pushdown, profile Parquet metadata, and estimate external-blob storage from a bounded sample.

The extension uses cache_httpfs for cached access to hf:// paths and supports Hugging Face credentials through DuckDB's secret manager. Lance datasets are not currently supported.

Project overview from the community descriptor.

Documentation and resources

Project and build details
Repository
dentiny/duckdb-huggingface
License
MIT
Maintainers
dentiny
Written in
C++
Build source
72d8fec79ea4
Build definition
Community descriptor