Gems of DuckDB 2.0.0
DuckDB 2.0.0 LTS includes a set of smaller features beyond its headline items. The Python client gains an appender for buffered row inserts, though INSERT INTO ... SELECT remains faster for DataFrames and Arrow tables. The CLI adds pretty-printed .schema, a .manual function reference, calculator-style expressions and queryable command history via shell_history(). New SQL features include SHOW for settings, CREATE SECURE VIEW to hide statistics and plans, regexp_extract options, setval for sequences, session variables as prepared-statement defaults, custom PARTITION_PATH and ORDER_BY in COPY, GeoJSON writing, and extension-defined window functions.
Related posts
- Even Friendlier SQL with DuckDB
DuckDB mediumAdeptDuckDB extends SQL syntax with features that simplify everyday queries and enable dynamic analysis. Additions include reusable column aliases within a SELECT, COLUMNS() for selecting and transforming columns by regex, EXCLUDE/REPLACE or lambda, automatic JSON-to-nested-type conversion with dot notation, FROM-first queries, dot-operator function chaining, UNION/INSERT BY NAME, and dynamic PIVOT/UNPIVOT that need no hardcoded column values. Each feature is shown next to the verbose standard-SQL equivalent it replaces.
- Ducks in a Column
DuckDB mediumAdeptDuckDB stores data by column and processes it in vectors of 2,048 values, which drives its compression, projection pushdown and aggregation speed. A tour built on a duck-sightings dataset shows querying CSV, Parquet, S3 and Hive-partitioned files in place (with zonemap row-group skipping and CSV type sniffing), column-level friendly SQL (EXCLUDE, REPLACE, COLUMNS() with regex or lambdas, FROM-first, STRUCT unpacking, SUMMARIZE), and aggregation shortcuts such as GROUP BY ALL, FILTER, arg_max, PIVOT/UNPIVOT and approximate aggregates. Window functions, QUALIFY, ASOF joins for aligning mismatched time series, and list aggregation round out the examples.
- DuckDB: analyze 50,000+ datasets stored on the Hugging Face Hub
Hugging Face mediumAdeptEvery 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.
- From Spreadsheets to DuckLake: A Data Engineer's Road to DuckDB
DuckDB mediumAdeptData 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.
- Announcing DuckDB 2.0.1 LTS
DuckDB mediumAdeptDuckDB 2.0.1, the first patch release of the 2.0 LTS line, fixes several behaviors that may need action before upgrading. SECRET scopes now match only exact hosts or buckets or paths continuing with '/', and UPDATE ... FROM and MERGE again apply every matching source row, reverting a 2.0.0 change that serialized large updates. Extension repositories can now be registered by host through a .well-known redirect that pins signing keys without a central registry, and the new Sirius core extension runs queries on NVIDIA GPUs with CPU fallback. Fixes include avoiding MADV_FREE data loss on buggy Linux kernels by setting jemalloc muzzy_decay_ms to 0, NULL-filtering bugs on 1.x database files, a path traversal issue and a Brotli CVE.