Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Hugging Face 5 min read Announcement mediumAdept

Introducing the SQL Console on Datasets

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. Non-Parquet datasets have their first 5GB auto-converted. A simple filter over a 12.6M-row dataset returns in under 3 seconds, but memory is capped at roughly 3GB and DuckDB WASM lacks some DuckDB features such as the hf:// protocol. A worked example uses struct_pack to convert an Alpaca dataset into conversational format for LLM fine-tuning and exports the results to Parquet.

Assumes: SQL basics

Related posts

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

    Hugging Face mediumAdept

    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.

  • Text2SQL using Hugging Face Dataset Viewer API and Motherduck DuckDB-NSQL-7B

    Hugging Face mediumAdept

    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. The pipeline fetches a dataset's auto-converted parquet URL from the Dataset Viewer API and derives a CREATE TABLE schema by loading one row into DuckDB. It then prompts the quantized GGUF model through llama.cpp with the schema and question, rewrites the table name to the parquet URL, and executes the query in DuckDB. On the world-cities-geo dataset the generated query matches the results of the Viewer's search and filter APIs.

  • Visualizing BlueSky data with Evidence.dev

    ClickHouse mediumAdept

    Evidence.dev builds dashboards from SQL and markdown, running queries at build time rather than at request time. Query results are stored as Parquet files and queried in the browser with DuckDB WASM, which gives up data freshness in exchange for fast page loads. The walkthrough installs a community ClickHouse connector, points it at the public BlueSky dataset, and writes one query per .sql file. It then runs `npm run sources`, renders a BarChart component in a markdown page, and deploys the result as a static site or to Evidence Cloud with scheduled refreshes.

  • From Spreadsheets to DuckLake: A Data Engineer's Road to DuckDB

    DuckDB mediumAdept

    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. He favours DuckLake over Iceberg because it keeps lakehouse metadata in a SQL database. In his experience, catalog operations that take seconds with Iceberg's metadata files resolve in under a millisecond, and the setup is two statements instead of a 20-plus-line Spark configuration. In DuckDB 2.0 alpha, asynchronous I/O cut his S3 read times for 1,000–10,000 files by 67–70%, and ATTACH now accepts expressions such as getenv. The Quack protocol can also serve a DuckLake over HTTP without handing out AWS credentials.

  • Analyzing Hugging Face datasets with ClickHouse

    ClickHouse mediumAdept

    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. The walkthrough uses a Spotify tracks dataset to show aggregations, varPop checks, and bar-function histograms, then moves to ClickHouse's statistical functions and a reusable UDF that queries a dataset by name alone. Practical gotchas include setting max_http_get_redirects = 1 to follow the CDN redirect and enable_url_encoding = 0 to preserve escaped paths. Slow reads caused by small Parquet row groups, each triggering a separate HTTP request, were fixed in ClickHouse issue 53069.

The quest for software engineering knowledge.

Look:
Layout: