Skip to main content

Easy install parquet-tools

Project description

parquet-tools

Run Unittest Run CLI test

This is a pip installable parquet-tools. In other words, parquet-tools is a CLI tools of Apache Arrow. You can show parquet file content/schema on local disk or on Amazon S3.

Features

  • Read Parquet data (local file or file on S3)
  • Read Parquet metadata/schema (local file or file on S3)

Installation

$ pip install parquet-tools

Usage

$ parquet-tools --help
usage: parquet-tools [-h] {show,csv,inspect} ...

parquet CLI tools

positional arguments:
  {show,csv,inspect}
    show              Show human readble format. see `show -h`
    csv               Cat csv style. see `csv -h`
    inspect           Inspect parquet file. see `inspect -h`

optional arguments:
  -h, --help          show this help message and exit

Usage Examples

Show local parquet file

$ parquet-tools show test.parquet
+-------+-------+---------+
|   one | two   | three   |
|-------+-------+---------|
|  -1   | foo   | True    |
| nan   | bar   | False   |
|   2.5 | baz   | True    |
+-------+-------+---------+

Show parquet file on S3

$ parquet-tools show s3://bucket-name/prefix/*
+-------+-------+---------+
|   one | two   | three   |
|-------+-------+---------|
|  -1   | foo   | True    |
| nan   | bar   | False   |
|   2.5 | baz   | True    |
+-------+-------+---------+

Inspect parquet file schema

FileMetaData
■■■■version = 1
■■■■schema = list
...
■■■■column_orders = list
■■■■■■■■ColumnOrder
■■■■■■■■■■■■TYPE_ORDER = TypeDefinedOrder
■■■■■■■■ColumnOrder
■■■■■■■■■■■■TYPE_ORDER = TypeDefinedOrder
■■■■■■■■ColumnOrder
■■■■■■■■■■■■TYPE_ORDER = TypeDefinedOrder
■■■■■■■■ColumnOrder
■■■■■■■■■■■■TYPE_ORDER = TypeDefinedOrder

Cat CSV parquet and transform csvq

$ parquet-tools csv s3://bucket-name/test.parquet |csvq "select one, three where three"
+-------+-------+
|  one  | three |
+-------+-------+
| -1.0  | True  |
| 2.5   | True  |
+-------+-------+

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

parquet_tools-0.2.3.tar.gz (36.8 kB view details)

Uploaded Source

Built Distribution

parquet_tools-0.2.3-py3-none-any.whl (40.4 kB view details)

Uploaded Python 3

File details

Details for the file parquet_tools-0.2.3.tar.gz.

File metadata

  • Download URL: parquet_tools-0.2.3.tar.gz
  • Upload date:
  • Size: 36.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

File hashes

Hashes for parquet_tools-0.2.3.tar.gz
Algorithm Hash digest
SHA256 cb784006c140219b2890bef1765f81c8f0f7bc69aeac6ff440f7baccd51d0660
MD5 0db2b7d0d42db2d991822002fde880a5
BLAKE2b-256 2bfe9e1112126e4423255f74e35d48943d6c26039f00bd7a056f7c77ea1a25ee

See more details on using hashes here.

File details

Details for the file parquet_tools-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: parquet_tools-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 40.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

File hashes

Hashes for parquet_tools-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4cd23ef0910cbd72b6eb56c5c49ab611fdf3953e8b315c44fbdecf8fb9dfa266
MD5 b2597a424b92831054c4ca0fbbb6328a
BLAKE2b-256 70222c83bde2699597c1b5af4ba9f02569ea3c8ad4ff887c843bc123189b9b6a

See more details on using hashes here.

Supported by

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