Thanks to visit codestin.com
Credit goes to lib.rs

#dataframe #clickhouse #polars-dataframe #insertion

inserter-x

Copy or insert dataframes into databases (currently only Clickhouse)

3 releases

Uses new Rust 2024

0.1.2 Jun 11, 2025
0.1.1 Jun 9, 2025
0.1.0 Jun 8, 2025

#10 in #insertion

MIT license

32KB
534 lines

inserter-x

(Documentation WIP) A simple (and fast) polars dataframe to database insertion utility.

Currently only supports Clickhouse. Implementing other databases will be prioritized if there is a need and there is a client that supports fast insertion.

Run benchmark examples

cargo run --release --example insert-bench -- -f <filepath> -h <host> -o <comma-separated-order_by-keys> -p <comma-separated-primary_keys> [--not-null <comma-separated-not_null_keys>]

# example
cargo run --release --example insert-bench -- -f ~/Downloads/train.csv -h http://default:password@localhost:8123/ -o GPA \

Clickhouse

The ClickhouseInserter provides an interface to table creation and insertion queries. Insertion is supported via the ArrowStream format. See tests/mod.rs for examples.

Acknowledgements

Name and concept inspired by connector-x.

Dependencies

~35–48MB
~733K SLoC