Skip to content
DuckDB community extension

zarr

Query Zarr array stores (v2 and v3) with SQL — read xarray-convention datasets as tables

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 zarr FROM community;
LOAD zarr FROM community;

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

02 / QUERY

Usage example

Read a local Zarr store as a table

SQL
-- Read a local Zarr store as a table
SELECT time, lat, lon, temperature
FROM read_zarr('path/to/store.zarr')
LIMIT 10;

-- Inspect and query a multiscale OME-Zarr bioimage
SELECT name, dims, shape
FROM read_zarr_metadata('image.ome.zarr');

SELECT c, AVG("0") AS mean_intensity
FROM read_zarr('image.ome.zarr', array_path = '0')
GROUP BY c;

Provided by xqlsystems. Not yet verified on Haybarn 2.0.0.

Sample data & setup

About this extension

The duckdb-zarr extension exposes Zarr array stores as SQL tables, following the xarray dimension convention used by climate science, geospatial, and bioimaging datasets.

Any path ending in .zarr is automatically routed to read_zarr:

Project overview from the community descriptor.

Documentation and resources

Project and build details
Repository
xqlsystems/duckdb-zarr
License
MIT
Maintainers
alxmrs, d33bs
Written in
Rust
Build source
473cb3b203ff
Build definition
Community descriptor