In todayβs data pipelines, exporting data from SQL databases into flexible and efficient formats like Parquet or CSV is a frequent need β especially when integrating with tools like AWS Athena, Pandas, Spark, or Delta Lake.
Thatβs where sqlxport comes in.
π What is sqlxport?
sqlxport is a simple, powerful CLI tool that lets you:
Run a SQL query against PostgreSQL or Redshift
Export the results as Parquet or CSV
Optionally upload the result to S3 or MinIO
Itβs open source, Python-based, and available on PyPI.
π οΈ Use Cases
Export Redshift query results to S3 in a single command
Prepare Parquet files for data science in DuckDB or Pandas
Integrate your SQL results into Spark Delta Lake pipelines
Automate backups or snapshots from your production databases
β¨ Key Features
β
PostgreSQL and Redshift support
β
Parquet and CSV output
β
Supports partitioning
β
MinIO and AWS S3 support
β
CLI-friendly and scriptable
β
MIT licensed
π¦ Quickstart
pip install sqlxport
sqlxport run \
--db-url postgresql://user:pass@host:5432/dbname \
--query "SELECT * FROM sales" \
--format parquet \
--output-file sales.parquet
Want to upload it to MinIO or S3?
sqlxport run \
... \
--upload-s3 \
--s3-bucket my-bucket \
--s3-key sales.parquet \
--aws-access-key-id XXX \
--aws-secret-access-key YYY
π§ͺ Live Demo
We provide a full end-to-end demo using:
PostgreSQL
MinIO (S3-compatible)
Apache Spark with Delta Lake
DuckDB for preview
π See it on GitHub
π Where to Find It
π¦ PyPI: sqlxport
π» GitHub: sqlxport
π¦ Follow updates on Twitter/X
π Contributions Welcome
Weβre just getting started. Feel free to open issues, submit PRs, or suggest ideas for future features and integrations.
Top comments (0)