Search Shortcut cmd + k | ctrl + k

Cloud-Optimized ZIP reader for DuckDB

Maintainer(s): csaybar, ryali93

Installing and Loading

INSTALL cozip FROM community;
LOAD cozip;

Example

INSTALL cozip FROM community;
LOAD cozip;

-- One row per sample, one column per file, ready for a dataloader.
SELECT * FROM read_taco('https://example.org/cloudsen12.zip') LIMIT 10;

-- A Flat-profile archive is a plain manifest instead.
SELECT * FROM read_flat('https://example.org/dataset.zip') LIMIT 10;

About cozip

cozip puts an index at byte 0 of a ZIP archive, so a reader reaches any file inside it in one range request instead of scanning the Central Directory. This extension reads both cozip profiles without downloading the archive, over HTTPS, S3, GCS, Azure or HuggingFace.

read_flat(path) returns the Flat-profile manifest: one row per entry with name, offset, size and whatever columns the writer added.

read_taco(path) returns one row per sample with one column per file in the contract. Pass pivoted := false for one row per file. It reads .zip, FOLDER, and TACOCAT datasets.

Every data column holds a GDAL /vsisubfile/ path that opens the referenced file in GDAL, rasterio or terra without extracting the archive.

Added Functions

function_name function_type description comment examples
cozip_offset_size scalar NULL NULL  
cozip_profile scalar NULL NULL  
cozip_vsi_base scalar NULL NULL  
read_cozip table_macro NULL NULL  
read_flat table_macro NULL NULL  
read_taco table_macro NULL NULL  
taco_collection scalar NULL NULL  
taco_contract table_macro NULL NULL  
taco_derived scalar NULL NULL  
taco_levels scalar NULL NULL  
taco_sql scalar NULL NULL  
taco_structure scalar NULL NULL  

Overloaded Functions

This extension does not add any function overloads.

Added Types

This extension does not add any types.

Added Settings

This extension does not add any settings.