Skip to main content

parquet-tool

Inspect Apache Parquet files from the command line — schema, row count, contents, compression statistics.
命令行查看 Apache Parquet 文件:schema、行数、内容、压缩统计。

English · 中文


English

parquet-tool is a command-line tool written in Rust for inspecting Apache Parquet files. It compiles into a single self-contained static executable with zero runtime dependencies and is distributed as both a native binary and a pip-installable package.

Features

Command Description
schema Print the schema (field names, physical/logical types, nullability, nesting)
rowcount Print the total number of rows
show Print contents as table / CSV / JSON, with row limit, offset and column filter
cat Print the entire contents (all rows)
head Print the first N rows (like Linux head)
distinct Count distinct (unique non-null) values per column, plus NULL counts
compression Print per-column and per-file compression statistics (sizes, codec, ratio)

Install

pip install parquet-tool

Quick start

# Print the schema
parquet-tool schema data.parquet

# Print the row count
parquet-tool rowcount data.parquet

# Print the first 5 rows
parquet-tool head data.parquet -n 5

# Print all rows as JSON
parquet-tool cat data.parquet --format json

# Count distinct values per column
parquet-tool distinct data.parquet

# Print compression statistics
parquet-tool compression data.parquet

Supported data types

All Parquet physical and logical types: INT32/INT64/INT96, FLOAT/DOUBLE, BOOLEAN, BYTE_ARRAY, FIXED_LEN_BYTE_ARRAY; logical String, Decimal, Date, Time, Timestamp (with IANA timezones), JSON, UUID; nested Struct/List; codecs Snappy, Gzip, Brotli, LZ4, Zstd.

Platforms

Platform Wheel Notes
Linux x86_64 musllinux_1_2_x86_64 statically linked musl — runs on any Linux
Windows x86_64 win_amd64 native MSVC build

License

MIT


中文

parquet-tool 是一个用 Rust 编写的 Apache Parquet 文件查看工具,编译为单个自包含的静态可执行文件,零运行时依赖。提供原生二进制与 pip 安装包两种分发方式。

功能

命令 说明
schema 查看 schema(字段名、物理/逻辑类型、是否可空、嵌套结构)
rowcount 查看总行数
show 以表格 / CSV / JSON 查看内容,支持行数限制、起始偏移、列筛选
cat 查看完整内容(全部行)
head 查看开头前 N 行(类似 Linux head)
distinct 查看每一列的 distinct(唯一非空)值数量,以及 NULL 数量
compression 查看逐列及文件级压缩统计(压缩前后大小、算法、压缩比)

安装

pip install parquet-tool

快速开始

# 查看 schema
parquet-tool schema data.parquet

# 查看行数
parquet-tool rowcount data.parquet

# 查看前 5 行
parquet-tool head data.parquet -n 5

# 以 JSON 输出全部内容
parquet-tool cat data.parquet --format json

# 查看每一列的 distinct 值数量
parquet-tool distinct data.parquet

# 查看压缩统计
parquet-tool compression data.parquet

支持的数据类型

全部 Parquet 物理与逻辑类型:INT32/INT64/INT96、FLOAT/DOUBLE、BOOLEAN、BYTE_ARRAY、FIXED_LEN_BYTE_ARRAY;逻辑类型 String、Decimal、Date、Time、Timestamp(支持 IANA 时区)、JSON、UUID;嵌套 Struct/List;压缩算法 Snappy、Gzip、Brotli、LZ4、Zstd。

支持平台

平台 Wheel 说明
Linux x86_64 musllinux_1_2_x86_64 静态 musl 链接 —— 任何 Linux 均可运行
Windows x86_64 win_amd64 原生 MSVC 构建

许可证

MIT

Metadata

Release files for parquet-tool 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for parquet-tool 1.1.0
File Interpreter ABI Platform
parquet_tool-1.1.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
parquet_tool-1.1.0-py3-none-musllinux_1_2_x86_64.whl Python 3 none Linux musl 1.2+ x86-64 Details

Total release size: 5.0 MB

Release files / parquet_tool-1.1.0-py3-none-win_amd64.whl

Download URL parquet_tool-1.1.0-py3-none-win_amd64.whl
Size 2.4 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
6148048d7cbfb39dee1c8e2a6253a0e7e78a6d2f4791a819eee39367725211a1
BLAKE2b-256 checksum
How to use checksums
10e5220698688bbb29ae022b340197dbab9703fd6737e54551080f40cfe207ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / parquet_tool-1.1.0-py3-none-musllinux_1_2_x86_64.whl

Download URL parquet_tool-1.1.0-py3-none-musllinux_1_2_x86_64.whl
Size 2.6 MB
Tags Linux musl 1.2+ x86-64 Python 3
SHA-256 checksum
How to use checksums
136946f6d8a888c4ef340507ad94fb25a18dadc6435adebe154e2af2e18e4feb
BLAKE2b-256 checksum
How to use checksums
48d92510e6fc663b5bca265292757255ed20fca8ebe8bf4226998e23c30b3c5e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page