After reading this blog, I began to wonder which Parquet version and compression methods the everyday tools we rely on actually use, only to find that there’s no straightforward way to determine this. That curiosity and the difficulty of quickly discovering such details motivated me to create iparq (Information Parquet). My goal with iparq is to help users easily identify the specifics of the Parquet files generated by different engines, making it clear which features—like newer encodings or certain compression algorithms—the creator of the parquet is using.
-
Install the package using pip:
pip install iparq
-
Verify the installation by running:
iparq --help
-
Make sure to have Astral’s UV installed by following the steps here:
-
Execute the following command:
uv pip install iparq
-
Verify the installation by running:
iparq --help
-
Run the following:
brew tap MiguelElGallo/tap https://github.com/MiguelElGallo//homebrew-iparq.git brew install MiguelElGallo/tap/iparq iparq —help
Run
iparq <filename>
Replace <filename>
with the path to your .parquet file. The utility will read the metadata of the file and print the compression codecs used in the parquet file.
ParquetMetaModel(
created_by='parquet-cpp-arrow version 14.0.2',
num_columns=19,
num_rows=2964624,
num_row_groups=3,
format_version='2.6',
serialized_size=6357
)
Column Compression Info:
Row Group 0:
Column 'VendorID' (Index 0): ZSTD
Column 'tpep_pickup_datetime' (Index 1): ZSTD
Column 'tpep_dropoff_datetime' (Index 2): ZSTD
Column 'passenger_count' (Index 3): ZSTD
Column 'trip_distance' (Index 4): ZSTD
Column 'RatecodeID' (Index 5): ZSTD
Column 'store_and_fwd_flag' (Index 6): ZSTD
Column 'PULocationID' (Index 7): ZSTD
Column 'DOLocationID' (Index 8): ZSTD
Column 'payment_type' (Index 9): ZSTD
Column 'fare_amount' (Index 10): ZSTD
Column 'extra' (Index 11): ZSTD
Column 'mta_tax' (Index 12): ZSTD
Column 'tip_amount' (Index 13): ZSTD
Column 'tolls_amount' (Index 14): ZSTD
Column 'improvement_surcharge' (Index 15): ZSTD
Column 'total_amount' (Index 16): ZSTD
Column 'congestion_surcharge' (Index 17): ZSTD
Column 'Airport_fee' (Index 18): ZSTD
Row Group 1:
Column 'VendorID' (Index 0): ZSTD
Column 'tpep_pickup_datetime' (Index 1): ZSTD
Column 'tpep_dropoff_datetime' (Index 2): ZSTD
Column 'passenger_count' (Index 3): ZSTD
Column 'trip_distance' (Index 4): ZSTD
Column 'RatecodeID' (Index 5): ZSTD
Column 'store_and_fwd_flag' (Index 6): ZSTD
Column 'PULocationID' (Index 7): ZSTD
Column 'DOLocationID' (Index 8): ZSTD
Column 'payment_type' (Index 9): ZSTD
Column 'fare_amount' (Index 10): ZSTD
Column 'extra' (Index 11): ZSTD
Column 'mta_tax' (Index 12): ZSTD
Column 'tip_amount' (Index 13): ZSTD
Column 'tolls_amount' (Index 14): ZSTD
Column 'improvement_surcharge' (Index 15): ZSTD
Column 'total_amount' (Index 16): ZSTD
Column 'congestion_surcharge' (Index 17): ZSTD
Column 'Airport_fee' (Index 18): ZSTD
Row Group 2:
Column 'VendorID' (Index 0): ZSTD
Column 'tpep_pickup_datetime' (Index 1): ZSTD
Column 'tpep_dropoff_datetime' (Index 2): ZSTD
Column 'passenger_count' (Index 3): ZSTD
Column 'trip_distance' (Index 4): ZSTD
Column 'RatecodeID' (Index 5): ZSTD
Column 'store_and_fwd_flag' (Index 6): ZSTD
Column 'PULocationID' (Index 7): ZSTD
Column 'DOLocationID' (Index 8): ZSTD
Column 'payment_type' (Index 9): ZSTD
Column 'fare_amount' (Index 10): ZSTD
Column 'extra' (Index 11): ZSTD
Column 'mta_tax' (Index 12): ZSTD
Column 'tip_amount' (Index 13): ZSTD
Column 'tolls_amount' (Index 14): ZSTD
Column 'improvement_surcharge' (Index 15): ZSTD
Column 'total_amount' (Index 16): ZSTD
Column 'congestion_surcharge' (Index 17): ZSTD
Column 'Airport_fee' (Index 18): ZSTD
Compression codecs: {'ZSTD'}