Skip to content

Latest commit

 

History

History
74 lines (60 loc) · 1.82 KB

README.md

File metadata and controls

74 lines (60 loc) · 1.82 KB

PyParquet

CLI tool to work with Parquet files

Installation

Dependency manager: poetry

Installing dependencies:

poetry install

Create a CLI command:

poetry shell

pip install --editable .

This allows you to use pyparquet as a regular CLI command.

Dependencies:

  • click: Command Line Interface Creation Kit
  • duckdb: Fast in-process analytical Database

Usage

pyparquet [OPTIONS] COMMAND [ARGS]...

Available Commands

USAGE: pyparquet [OPTIONS] COMMAND [ARGS]...

OPTIONS
  -- version Show the version and exit.
  --help     Show this message and exit.

COMMANDS:
  cat
        Description:
            Print the table
        Usage:
            pyparquet cat FILE
        Options:
            -s, --shape                   Display the shape of the table
            -r, --rows   INTEGER          Max number of rows to display
            -o, --offset INTEGER          Offset the starting point
  head
        Description:
            Print the first 'r' rows of the table
        Usage:
            pyparquet head [OPTIONS] FILE
        Options:
            -r, --rows   INTEGER          Number of rows to print [default: 10]
  tail
        Description:
            Print the last 'r' rows of the table
        Usage:
            pyparquet tail [OPTIONS] FILE
        Options:
            -r, --rows   INTEGER          Number of rows to print [default: 10]
  transform
        Description:
            Transform the Parquet file to [csv|excel|json] format
        Usage:
            pyparquet transform [OPTIONS] FILE
        Options:
            -n, --fname TEXT              Filename for the transformed file
            -d, --delete                  Delete the original Parquet file