Package: parquet-inspector
Parquet-InspectorA command line tool for inspecting parquet files with PyArrow.Installationpipinstallparquet-inspectorUsageparquet-inspector: cli tool for inspecting parquet files.

positional arguments:
  {metadata,schema,head,tail,count,validate,to-jsonl,to-parquet}
    metadata            print file metadata
    schema              print data schema
    head                print first n rows (default is 10)
    tail                print last n rows (default is 10)
    count               print number of rows
    validate            validate file
    to-jsonl            convert parquet file to jsonl
    to-parquet          convert jsonl file to parquet

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit
  --threads, -t         use threads for reading
  --mmap, -m            use memory mapping for readingExamples# Print the metadata of a parquet file$pqimetadatamy_file.parquet
created_by:parquet-cpp-arrowversion6.0.1
num_columns:3num_rows:2num_row_groups:1format_version:1.0
serialized_size:818# Print the schema of a parquet file$pqischemamy_file.parquet
a:list<item:int64>child0,item:int64
b:struct<c:bool,d:timestamp[ms]>child0,c:boolchild1,d:timestamp[ms]# Print the first 5 rows of a parquet file (default is 10)$pqihead-n5my_file.parquet{"a":1,"b":{"c":true,"d":"1991-02-03 00:00:00"}}{"a":2,"b":{"c":false,"d":"2019-04-01 00:00:00"}}{"a":3,"b":{"c":true,"d":"2019-04-01 00:00:00"}}{"a":4,"b":{"c":false,"d":"2019-04-01 00:00:00"}}{"a":5,"b":{"c":true,"d":"2019-04-01 00:00:00"}}# Print the last 5 rows of a parquet file$pqitail-n5my_file.parquet{"a":3,"b":{"c":true,"d":"2019-04-01 00:00:00"}}{"a":4,"b":{"c":false,"d":"2019-04-01 00:00:00"}}{"a":5"b":{"c":true,"d":"2019-04-01 00:00:00"}}{"a":6"b":{"c":false,"d":"2019-04-01 00:00:00"}}{"a":7"b":{"c":true,"d":"2019-04-01 00:00:00"}}# Print the first 5 rows of a parquet file, only reading the column a$pqihead-n5-camy_file.parquet{'a':1}{'a':2}{'a':3}{'a':4}{'a':5}# Print the first 3 rows that satisfy the condition a > 3# (filters are defined in disjunctive normal form)$pqihead-n3-f"[('a', '>', 3)]"my_file.parquet{"a":4,"b":{"c":false,"d":"2019-04-01 00:00:00"}}{"a":5"b":{"c":true,"d":"2019-04-01 00:00:00"}}{"a":6"b":{"c":false,"d":"2019-04-01 00:00:00"}}# Print the number of rows in a parquet file$pqicountmy_file.parquet7# Validate a parquet file$pqivalidatemy_file.parquet
OK# Convert a parquet file to jsonl$pqito-jsonlmy_file.parquet
$catmy_file.jsonl{"a":1,"b":{"c":true,"d":"1991-02-03 00:00:00"}}{"a":2,"b":{"c":false,"d":"2019-04-01 00:00:00"}}{"a":3,"b":{"c":true,"d":"2019-04-01 00:00:00"}}{"a":4,"b":{"c":false,"d":"2019-04-01 00:00:00"}}{"a":5,"b":{"c":true,"d":"2019-04-01 00:00:00"}}{"a":6,"b":{"c":false,"d":"2019-04-01 00:00:00"}}{"a":7,"b":{"c":true,"d":"2019-04-01 00:00:00"}}# Convert a jsonl file to parquet$pqito-parquetmy_file.jsonl
$pqiheadmy_file.parquet{"a":1,"b":{"c":true,"d":"1991-02-03 00:00:00"}}{"a":2,"b":{"c":false,"d":"2019-04-01 00:00:00"}}{"a":3,"b":{"c":true,"d":"2019-04-01 00:00:00"}}{"a":4,"b":{"c":false,"d":"2019-04-01 00:00:00"}}{"a":5,"b":{"c":true,"d":"2019-04-01 00:00:00"}}{"a":6,"b":{"c":false,"d":"2019-04-01 00:00:00"}}{"a":7,"b":{"c":true,"d":"2019-04-01 00:00:00"}}LicenseMIT