client.read_parquet

client.read_parquet(con, values, filter_by, **path_kwargs)

Relation over the polygons of some values in a consolidated GeoParquet.

The file holds a whole level and the filter is a WHERE clause: DuckDB only downloads the row groups holding the requested values, thanks to the sorting of the file, its statistics and bloom filters.

Parameters

Name Type Description Default
con duckdb.DuckDBPyConnection See connect. required
values list Values of filter_by to retrieve. required
filter_by str Level used to select the polygons (e.g. “REGION”). required
**path_kwargs Other arguments of create_path_consolidated, except layout, deduced from filter_by. {}

Returns

Name Type Description
duckdb.DuckDBPyRelation

Raises

Name Type Description
OSError If there is no GeoParquet file for these parameters (e.g. a year before 2025 only published in GeoJSON).
ValueError If the file cannot be filtered by filter_by, or if some values are not found.
Retour au sommet