parquet-tools-0.2.9
توضیحات
Easy install parquet-tools
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | parquet-tools-0.2.9 |
| نام | parquet-tools |
| نسخه کتابخانه | 0.2.9 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Kentaro Ueda |
| ایمیل نویسنده | kentaro.ueda.kentaro@gmail.com |
| آدرس صفحه اصلی | https://github.com/ktrueda/parquet-tools |
| آدرس اینترنتی | https://pypi.org/project/parquet-tools/ |
| مجوز | MIT |
# parquet-tools


This is a pip installable [parquet-tools](https://github.com/apache/parquet-mr).
In other words, parquet-tools is a CLI tools of [Apache Arrow](https://github.com/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
```bash
$ pip install parquet-tools
```
## Usage
```bash
$ 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
```bash
$ parquet-tools show test.parquet
+-------+-------+---------+
| one | two | three |
|-------+-------+---------|
| -1 | foo | True |
| nan | bar | False |
| 2.5 | baz | True |
+-------+-------+---------+
```
#### Show parquet file on S3
```bash
$ parquet-tools show s3://bucket-name/prefix/*
+-------+-------+---------+
| one | two | three |
|-------+-------+---------|
| -1 | foo | True |
| nan | bar | False |
| 2.5 | baz | True |
+-------+-------+---------+
```
#### Inspect parquet file schema
```bash
$ parquet-tools inspect /path/to/parquet
```
<details>
<summary>Inspect output</summary>
```
############ 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
```
</details>
#### Cat CSV parquet and transform [csvq](https://github.com/mithrandie/csvq)
```bash
$ parquet-tools csv s3://bucket-name/test.parquet |csvq "select one, three where three"
+-------+-------+
| one | three |
+-------+-------+
| -1.0 | True |
| 2.5 | True |
+-------+-------+
```
نیازمندی
| مقدار | نام |
|---|---|
| >=1.34.11,<2.0.0 | boto3 |
| >=0.4.6,<0.5.0 | colorama |
| >=0.0.31,<0.0.32 | halo |
| >=2.1.4,<3.0.0 | pandas |
| - | pyarrow |
| >=0.9.0,<0.10.0 | tabulate |
| >=0.16.0,<0.17.0 | thrift |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.9 | Python |
نحوه نصب
نصب پکیج whl parquet-tools-0.2.9:
pip install parquet-tools-0.2.9.whl
نصب پکیج tar.gz parquet-tools-0.2.9:
pip install parquet-tools-0.2.9.tar.gz