Skip to main content

Display version compression and bloom filter information about a parquet file

Project description

iparq

Python package

Dependabot Updates

Upload Python Package

codecov

alt text 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.

Features

  • Bloom filters: Displays if columns have bloom filters. Read more in this great article.
  • Encryption detection: Shows if columns are encrypted (๐Ÿ”’)
  • Statistics exactness: Indicates if min/max statistics are exact or approximate (PyArrow 22+)
  • Compression ratios: Optional display of column sizes and compression efficiency

Installation

Zero installation - Recommended

  1. Make sure to have Astral's UV installed by following the steps here:

    https://docs.astral.sh/uv/getting-started/installation/

  2. Execute the following command:

    uvx --refresh iparq inspect yourparquet.parquet
    

Using pip

  1. Install the package using pip:

    pip install iparq
    
  2. Verify the installation by running:

    iparq --help
    

Using uv

  1. Make sure to have Astral's UV installed by following the steps here:

    https://docs.astral.sh/uv/getting-started/installation/

  2. Execute the following command:

    uv pip install iparq
    
  3. Verify the installation by running:

    iparq --help
    

Using Homebrew in a MAC

  1. Run the following:

    brew tap MiguelElGallo/tap https://github.com/MiguelElGallo//homebrew-iparq.git
    brew install MiguelElGallo/tap/iparq
    iparq --help
    

Usage

iparq supports inspecting single files, multiple files, and glob patterns:

iparq inspect <filename(s)> [OPTIONS]

Options include:

  • --format, -f: Output format, either rich (default) or json
  • --metadata-only, -m: Show only file metadata without column details
  • --column, -c: Filter results to show only a specific column
  • --sizes, -s: Show column sizes and compression ratios

Single File Examples:

# Basic inspection .
iparq inspect yourfile.parquet

# Output in JSON format
iparq inspect yourfile.parquet --format json

# Show only metadata
iparq inspect yourfile.parquet --metadata-only

# Filter to show only a specific column
iparq inspect yourfile.parquet --column column_name

# Show column sizes and compression ratios
iparq inspect yourfile.parquet --sizes

Multiple Files and Glob Patterns:

# Inspect multiple specific files
iparq inspect file1.parquet file2.parquet file3.parquet

# Use glob patterns to inspect all parquet files
iparq inspect *.parquet

# Use specific patterns
iparq inspect yellow*.parquet data_*.parquet

# Combine patterns and specific files
iparq inspect important.parquet temp_*.parquet

When inspecting multiple files, each file's results are displayed with a header showing the filename. The utility will read the metadata of each file and print the compression codecs used in the parquet files.

Example output

ParquetMetaModel(
    created_by='parquet-cpp-arrow version 14.0.2',
    num_columns=3,
    num_rows=3,
    num_row_groups=1,
    format_version='2.6',
    serialized_size=2223
)
                                     Parquet Column Information                                      
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”“
โ”ƒ Row Group โ”ƒ Column Name โ”ƒ Index โ”ƒ Compression โ”ƒ Bloom โ”ƒ Encrypted โ”ƒ Min Value โ”ƒ Max Value โ”ƒ Exact โ”ƒ
โ”กโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”ฉ
โ”‚     0     โ”‚ one         โ”‚   0   โ”‚ SNAPPY      โ”‚  โœ…   โ”‚     โ€”     โ”‚ -1.0      โ”‚ 2.5       โ”‚  N/A  โ”‚
โ”‚     0     โ”‚ two         โ”‚   1   โ”‚ SNAPPY      โ”‚  โœ…   โ”‚     โ€”     โ”‚ bar       โ”‚ foo       โ”‚  N/A  โ”‚
โ”‚     0     โ”‚ three       โ”‚   2   โ”‚ SNAPPY      โ”‚  โœ…   โ”‚     โ€”     โ”‚ False     โ”‚ True      โ”‚  N/A  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
Compression codecs: {'SNAPPY'}

With --sizes flag

iparq inspect yourfile.parquet --sizes

                                         Parquet Column Information                                         
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”“
โ”ƒ  Row   โ”ƒ Column  โ”ƒ       โ”ƒ        โ”ƒ       โ”ƒ         โ”ƒ Min    โ”ƒ Max     โ”ƒ       โ”ƒ        โ”ƒ        โ”ƒ       โ”ƒ
โ”ƒ Group  โ”ƒ Name    โ”ƒ Index โ”ƒ Comprโ€ฆ โ”ƒ Bloom โ”ƒ Encrypโ€ฆ โ”ƒ Value  โ”ƒ Value   โ”ƒ Exact โ”ƒ Values โ”ƒ Comprโ€ฆ โ”ƒ Ratio โ”ƒ
โ”กโ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”ฉ
โ”‚   0    โ”‚ one     โ”‚   0   โ”‚ SNAPPY โ”‚  โœ…   โ”‚    โ€”    โ”‚ -1.0   โ”‚ 2.5     โ”‚  N/A  โ”‚      3 โ”‚ 104.0B โ”‚  1.0x โ”‚
โ”‚   0    โ”‚ two     โ”‚   1   โ”‚ SNAPPY โ”‚  โœ…   โ”‚    โ€”    โ”‚ bar    โ”‚ foo     โ”‚  N/A  โ”‚      3 โ”‚  80.0B โ”‚  0.9x โ”‚
โ”‚   0    โ”‚ three   โ”‚   2   โ”‚ SNAPPY โ”‚  โœ…   โ”‚    โ€”    โ”‚ False  โ”‚ True    โ”‚  N/A  โ”‚      3 โ”‚  42.0B โ”‚  1.0x โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iparq-0.5.0.tar.gz (4.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

iparq-0.5.0-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file iparq-0.5.0.tar.gz.

File metadata

  • Download URL: iparq-0.5.0.tar.gz
  • Upload date:
  • Size: 4.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for iparq-0.5.0.tar.gz
Algorithm Hash digest
SHA256 de20dd083092c4b40b767541614b5286cfcb255b7fbdd3b891b84a9ff4d142c6
MD5 e4c92dcabea9fb70860996fa398306b6
BLAKE2b-256 80885bdd4e20957c7be06295f8784b42487b77e58192178151eb223289790c5e

See more details on using hashes here.

Provenance

The following attestation bundles were made for iparq-0.5.0.tar.gz:

Publisher: python-publish.yml on MiguelElGallo/iparq

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file iparq-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: iparq-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for iparq-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2ba71baaa81dece6d300344256c3c998bf509c5a6171a1ce38e6f6476e12a645
MD5 59881d3d26993d9b86236e710895be10
BLAKE2b-256 582bd8800e7b12f67d944dad3c344b437e838975343c0884a888219dfead3f07

See more details on using hashes here.

Provenance

The following attestation bundles were made for iparq-0.5.0-py3-none-any.whl:

Publisher: python-publish.yml on MiguelElGallo/iparq

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page