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

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.

New Bloom filters information: Displays if there are bloom filters. Read more about bloom filters in this great article.

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

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

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 ouput - Bloom Filters

ParquetMetaModel(
    created_by='DuckDB version v1.2.1 (build 8e52ec4395)',
    num_columns=1,
    num_rows=100000000,
    num_row_groups=10,
    format_version='1.0',
    serialized_size=1196
)
                   Parquet Column Information                   
┏━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┓
┃ Row Group ┃ Column Name ┃ Index ┃ Compression ┃ Bloom Filter ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━┩
│     0     │ r           │   0   │ SNAPPY      │      ✅      │
│     1     │ r           │   0   │ SNAPPY      │      ✅      │
│     2     │ r           │   0   │ SNAPPY      │      ✅      │
│     3     │ r           │   0   │ SNAPPY      │      ✅      │
│     4     │ r           │   0   │ SNAPPY      │      ✅      │
│     5     │ r           │   0   │ SNAPPY      │      ✅      │
│     6     │ r           │   0   │ SNAPPY      │      ✅      │
│     7     │ r           │   0   │ SNAPPY      │      ✅      │
│     8     │ r           │   0   │ SNAPPY      │      ✅      │
│     9     │ r           │   0   │ SNAPPY      │      ✅      │
└───────────┴─────────────┴───────┴─────────────┴──────────────┘
Compression codecs: {'SNAPPY'}

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.3.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.3.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for iparq-0.3.0.tar.gz
Algorithm Hash digest
SHA256 07d443d7fd22da6fc0d7d7bd800fd2ef9935d737635c70fb3084b7a906e8f417
MD5 6278eeafe2c5dfcf2294956921c412d2
BLAKE2b-256 dbc4d5806c9a31f3d7f54618878876b7f167a2e7215183154d627f1777d6dece

See more details on using hashes here.

Provenance

The following attestation bundles were made for iparq-0.3.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.3.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for iparq-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9ea2ad31af9e2cf7775a3a4dd4cf69ca750627c73d71529056938df6073101f8
MD5 6b83aaf6f707ab5803ebcfc98e090dc8
BLAKE2b-256 2e98488306e6c3b45f372df956b5113826dc73a1008df0bb43202c1a693616e7

See more details on using hashes here.

Provenance

The following attestation bundles were made for iparq-0.3.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