Crates.io | cc2p |
lib.rs | cc2p |
version | 0.5.1 |
created_at | 2024-03-21 10:02:01.168432+00 |
updated_at | 2025-09-14 10:03:58.14923+00 |
description | Convert a CSV to parquet file format |
homepage | https://rayyildiz.com/projects/cc2p |
repository | https://github.com/rayyildiz/cc2p |
max_upload_size | |
id | 1181437 |
size | 167,974 |
CC2P (Convert CSV To Parquet) is a high-performance command-line tool written in Rust that efficiently converts CSV files to the Apache Parquet format. Parquet is a columnar storage file format that offers efficient data compression and encoding schemes, making it ideal for big data processing.
If you have Rust installed, you can install CC2P directly from crates.io:
cargo install cc2p
You can download pre-built binaries from the GitHub Releases page.
To build from source:
# Clone the repository
git clone https://github.com/rayyildiz/cc2p.git
cd cc2p
# Build in release mode
cargo build --release
# The binary will be in target/release/cc2p
Basic usage:
cc2p [OPTIONS] [PATH]
Where PATH
is the path to a CSV file or a glob pattern (default: *.csv
).
Convert a single CSV file:
cc2p data.csv
Convert all CSV files in the current directory:
cc2p
Convert CSV files with semicolon delimiter:
cc2p --delimiter ";" *.csv
Convert CSV files without headers:
cc2p --no-header data_files/*.csv
Use 4 worker threads for faster processing:
cc2p --worker 4 large_data.csv
,
)false
)1
)2048
)$ cc2p --help
Convert a CSV to parquet file format
Usage: cc2p [OPTIONS] [PATH]
Arguments:
[PATH] Represents the folder path for CSV search [default: *.csv]
Options:
-d, --delimiter <DELIMITER> Represents the delimiter used in CSV files [default: ,]
-n, --no-header Represents whether to include the header in the CSV search column
-w, --worker <WORKER> Number of worker threads to use for performing the task [default: 1]
-s, --sampling <SAMPLING> Number of rows to sample for inferring the schema. [default: 100]
-h, --help Print help
-V, --version Print version
NOTE for macOS Users: Our Apple signing/notarization is not entirely done yet, thus you have to run the following command once to run the application. Download the app and run this command:
xattr -c cc2p
On Linux, you can also install CC2P via Snap:
sudo snap install cc2p
If you wish to contribute, please feel free to fork the repository, make your changes, and submit a pull request. All contributions are welcome!
cargo build
to build the projectcargo test
to run the testsThis project is licensed under MIT, see the LICENSE file for details.