Datascience team
Apache Parquet is a columnar storage file format widely used in big data analytics (e.g. Spark, Flink, Hive, Dask, DuckDB, etc.).
Apache Parquet was launched by Cloudera and Twitter in 2012, top level apache project since 2015. Two major versions(v1 and v2) have been released.
Projection pushdown is an optimization where the query engine only reads the columns that are actually requested, instead of scanning all columns from a Parquet file.
Predicate pushdown is an optimization where filtering conditions are applied directly while reading Parquet files, rather than loading all the data into memory and then filtering.
Partitioning is a data organization technique where a large dataset is split into multiple Parquet files based on the values of one or more columns. Instead of storing all rows in a single file, rows are grouped into folders (directories) according to partition column values.
Encoding is a technique for representing column values in a more compact way to reduce storage size and improve scan performance. Parquet supports: Dictionary Encoding, Run-Length Encoding (RLE), Bit-Packing (BIT_PACKED), Delta Encoding, etc.
Compression in Parquet is applied on data pages (after encoding) to further reduce storage size and speed up I/O. Each Parquet column chunk can use a different compression codec, independent of others.
GeoParquet is an extension of Apache Parquet designed for storing geospatial vector data` (points, lines, polygons) in a columnar, compressed, metadata rich format.
It's already supported by many tools(e.g. Sedona, GeoPandas, QGIS, DuckDB, Kepler GL, etc.) You can visit the GeoParquet official website to learn more.
GeoParquet adds geo-encoding (WKB) and geo-metadata (CRS, Geometry types, Bounding box, etc) to Parquet.
{
"version": "1.0.0",
"primary_column": "geometry",
"columns": {
"col1": {
"encoding": "WKB",
"geometry_types": ["Polygon", "MultiPolygon"],
"crs": "EPSG:4326"
},
"col2": {
"encoding": "WKB",
"geometry_types": ["Point"],
"crs": "EPSG:3857"
}
}
}
The bounding box (bbox) metadata specifies the area covered by geometric shapes in a given file. Sedona can skip that entire file/partition when executing the query because it’s known that it does not cover any relevant data.