Skip to content

Document native hf://buckets/ support in DuckDB (2.0+) - #2768

Draft
davanstrien wants to merge 2 commits into
huggingface:mainfrom
davanstrien:duckdb-native-buckets
Draft

Document native hf://buckets/ support in DuckDB (2.0+)#2768
davanstrien wants to merge 2 commits into
huggingface:mainfrom
davanstrien:duckdb-native-buckets

Conversation

@davanstrien

Copy link
Copy Markdown
Member

DuckDB's httpfs extension now parses hf://buckets/ paths directly (duckdb/duckdb-httpfs#293, merged 2026-09-07). It ships with DuckDB 2.0, which is not released yet, so this PR stays a draft until it is.

Changes

  • storage-buckets-access: new "Query with DuckDB" section with the native route first, and the DuckDB 1.x fallbacks (HfFileSystem from Python, S3 gateway elsewhere) in a note. The overview table gets a DuckDB row, and the DuckDB snippet leaves "Python Data Tools", which is now pandas-only.
  • storage-buckets-integrations: DuckDB entry next to the other libraries; removed from "Coming soon".
  • datasets-duckdb: the Storage Buckets tip leads with the native query.
  • storage-buckets-s3: one-sentence pointer to the native route. The gateway recipe stays, since it is still the CLI route on 1.x and the only way to write.

Verified

Ran on an HF Job against a CI build of DuckDB c38d7e0739 (v2.0.0-dev) with the matching httpfs binary from the #293 pipeline:

  • public bucket read with **/*.parquet glob
  • private bucket read via CREATE SECRET (TYPE huggingface, PROVIDER credential_chain) with HF_TOKEN
  • private bucket without a secret fails
  • @revision on a bucket path is rejected ("buckets do not support revisions")
  • COPY ... TO 'hf://buckets/...' is not supported yet (DirectoryExists is not implemented), so the docs say read-only for now

Before marking ready

  • DuckDB 2.0 released; confirm the version number in the text
  • re-run the checks above on the released build
  • rebase if [Datasets] Add pyiceberg docs #2212 (pyiceberg, touches datasets-duckdb.md) has merged

cc @cfahlgren1 @lhoestq

🤖 Generated with Claude Code

duckdb-httpfs now parses hf://buckets/ paths directly
(duckdb/duckdb-httpfs#293, merged 2026-09-07, ships with DuckDB 2.0).

- storage-buckets-access: new "Query with DuckDB" section (native
  route first, DuckDB 1.x HfFileSystem / S3 fallback in a note); split
  the overview table row; DuckDB snippet leaves "Python Data Tools"
- storage-buckets-integrations: DuckDB entry; drop it from "Coming soon"
- datasets-duckdb: bucket tip leads with the native query
- storage-buckets-s3: pointer to the native route

Verified against a CI build of DuckDB c38d7e0739 (v2.0.0-dev) with the
matching httpfs binary: public read, private read via the huggingface
credential_chain secret, globs, @revision rejection on buckets. COPY TO
a bucket is not supported yet, so the section says read-only for now.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Comment thread docs/hub/storage-buckets-s3.md Outdated
### Query a bucket with DuckDB

With the `httpfs` extension, [DuckDB](https://duckdb.org/) can read Parquet (and other formats) straight from a bucket:
With the `httpfs` extension, [DuckDB](https://duckdb.org/) can read Parquet (and other formats) straight from a bucket over the S3 gateway. If you are on DuckDB 2.0 or later, `httpfs` also reads `hf://buckets/` paths directly with your Hugging Face token and no S3 secret, see [Query with DuckDB](./storage-buckets-access#query-with-duckdb).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe reverse the two sentences

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated to put the native path first

Per review: reverse the two sentences and state only what each route
needs.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Comment thread docs/hub/storage-buckets-s3.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants