Easy install parquet-tools
Project description
parquet-tools
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. It is incompatible with original parquet-tools.
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
$ parquet-tools inspect /path/to/parquet
Inspect output
############ file meta data ############
created_by: parquet-cpp version 1.5.1-SNAPSHOT
num_columns: 3
num_rows: 3
num_row_groups: 1
format_version: 1.0
serialized_size: 2226
############ Columns ############
one
two
three
############ Column(one) ############
name: one
path: one
max_definition_level: 1
max_repetition_level: 0
physical_type: DOUBLE
logical_type: None
converted_type (legacy): NONE
############ Column(two) ############
name: two
path: two
max_definition_level: 1
max_repetition_level: 0
physical_type: BYTE_ARRAY
logical_type: String
converted_type (legacy): UTF8
############ Column(three) ############
name: three
path: three
max_definition_level: 1
max_repetition_level: 0
physical_type: BOOLEAN
logical_type: None
converted_type (legacy): NONE
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
Release history Release notifications | RSS feed
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.8.tar.gz
(28.7 kB
view details)
Built Distribution
File details
Details for the file parquet_tools-0.2.8.tar.gz
.
File metadata
- Download URL: parquet_tools-0.2.8.tar.gz
- Upload date:
- Size: 28.7 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | c99d6dbf53936baaa06f38bcc50ca8402523656dc4beb26dc1d62be3d10e5ff7 |
|
MD5 | 48a71f1e0d50136f4a0f8e6cfb67b333 |
|
BLAKE2b-256 | 3e7f7f432825cfaa5320c48d11553060b2aa0e3e060181be5ae9bd4b55f9adde |
File details
Details for the file parquet_tools-0.2.8-py3-none-any.whl
.
File metadata
- Download URL: parquet_tools-0.2.8-py3-none-any.whl
- Upload date:
- Size: 31.5 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 845f564bab8af67577559996553f02d04bef5a8e020780a54b1f2f4d5e621d29 |
|
MD5 | f7b906be9185b9f0a3e83d2e5ebc576d |
|
BLAKE2b-256 | 55fb3e42c0d932000015a0315b4314143dac8592f8b383f504b23b8d129ce484 |