---
title: "DuckDB: analyze 50,000+ datasets stored on the Hugging Face Hub"
description: "Every public dataset on the Hugging Face Hub is now automatically converted to Parquet by the dataset viewer and can be queried with SQL through DuckDB."
url: "https://swe.quest/articles/duckdb-analyze-50-000-datasets-stored-on-the-hugging-face-hub-05ca0d0e06164c0a"
canonical: "https://huggingface.co/blog/hub-duckdb"
source: "Hugging Face"
published: "2023-06-07"
difficulty: "medium"
kind: "Announcement"
reading_minutes: 3
tags: ["analytics","sql","python"]
---

# DuckDB: analyze 50,000+ datasets stored on the Hugging Face Hub

A post on [Hugging Face](https://swe.quest/sources/hugging-face.md), published 2023-06-07, 3 min read, Announcement. Original: [https://huggingface.co/blog/hub-duckdb](https://huggingface.co/blog/hub-duckdb)

## Summary

Every public dataset on the Hugging Face Hub is now automatically converted to Parquet by the dataset viewer and can be queried with SQL through DuckDB. Parquet file URLs come from the datasets-server \`/parquet\` HTTP endpoint, and DuckDB's \`httpfs\` extension then runs analytical queries directly against those remote files. Large datasets are sharded into 500MB Parquet chunks, which DuckDB can query together as multiple files.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Analytics & OLAP](https://swe.quest/tags/analytics.md) (Data & databases)
- [SQL](https://swe.quest/tags/sql.md) (Languages)
- [Python](https://swe.quest/tags/python.md) (Languages)

## Prerequisites

- SQL basics ([easy posts on SQL](https://swe.quest/tags/sql.md?difficulty=easy))
- Python ([easy posts on Python](https://swe.quest/tags/python.md?difficulty=easy))

## Keywords

DuckDB, Hugging Face Hub, Parquet, httpfs, Dataset Viewer

## Related posts

- [Introducing the SQL Console on Datasets](https://swe.quest/articles/introducing-the-sql-console-on-datasets-89aa5e3e1204ae2f.md): Hugging Face · 2024-09-17 · Medium · 5 min read · SQL, Analytics & OLAP, WebAssembly, Model training
  Hugging Face Hub datasets now have a one-click SQL Console that runs DuckDB WASM entirely in the browser against each dataset's Parquet files, with views created per split and config.
- [Text2SQL using Hugging Face Dataset Viewer API and Motherduck DuckDB-NSQL-7B](https://swe.quest/articles/text2sql-using-hugging-face-dataset-viewer-api-and-motherduck-duckdb-nsql-7b-7024872a0cc79ab7.md): Hugging Face · 2024-04-04 · Medium · 7 min read · LLMs, SQL, Analytics & OLAP, Python
  DuckDB-NSQL-7B, a Llama-2-7B model fine-tuned on general SQL and then DuckDB text-to-SQL pairs, can turn plain-language questions into DuckDB SQL that runs directly against Hugging Face datasets.
- [Analyzing Hugging Face datasets with ClickHouse](https://swe.quest/articles/analyzing-hugging-face-datasets-with-clickhouse-12e5d1b0f22de93c.md): ClickHouse · 2023-08-29 · Medium · 28 min read · Analytics & OLAP, SQL, Machine learning
  Hugging Face's Datasets Server automatically converts every dataset to Parquet and exposes the file URLs through a REST endpoint, so clickhouse-local can query any dataset with plain SQL via the url function and URL table engine.
- [Ducks in a Column](https://swe.quest/articles/ducks-in-a-column-ce42623eb848a791.md): DuckDB · 2026-11-10 · Medium · 12 min read · SQL, Analytics & OLAP, Query engines
  DuckDB stores data by column and processes it in vectors of 2,048 values, which drives its compression, projection pushdown and aggregation speed.
- [From Spreadsheets to DuckLake: A Data Engineer's Road to DuckDB](https://swe.quest/articles/from-spreadsheets-to-ducklake-a-data-engineer-s-road-to-duckdb-befcab104cb9bbfa.md): DuckDB · 2026-10-29 · Medium · 6 min read · Analytics & OLAP, Data pipelines, Databases, SQL
  Data engineer Matt Martin traces his path from copy-pasting Excel reports through Teradata, BigQuery and heavyweight Spark clusters to DuckDB, which let him query local CSVs, S3 Parquet files and Iceberg tables in a few lines of SQL with no JVM or cluster.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
