Skip to main content

flydelta on pypi Python test and package pre-commit Coverage Status AGPLv3+ License

flydelta

A Flight SQL proxy for Delta Lake. Query Delta tables via Apache Arrow Flight with efficient streaming and predicate pushdown.

flydelta is read-only on existing data and has no authentication logic to keep it very simple.

Why?

When a Delta Lake storage backend (on S3, disk, etc.) is queried by multiple client applications, having each client read Parquet files from the source storage directly is inefficient due to network traffic, even when using predicate pushdown.

flydelta solves this by acting as a query proxy deployed close to the data:

Architecture

Installation

pip install flydelta

Usage

Server

Start a flydelta server with Delta tables:

flydelta serve -t users=s3://bucket/users -t orders=/data/orders

Options:

flydelta serve \
  --host 0.0.0.0 \
  --port 8815 \
  --table users=s3://bucket/users \
  --table orders=/data/orders \
  --pool-size 20 \
  --batch-size 100000

Docker

docker build -t flydelta .
docker run -p 8815:8815 flydelta -t users=/data/users -t orders=/data/orders

Python Client

from flydelta import Client

with Client("grpc://localhost:8815") as client:
    # Query to Arrow table
    table = client.query("SELECT * FROM users WHERE active = true")

    # Convert to pandas DataFrame
    df = table.to_pandas()

    # List available tables
    tables = client.list_tables()

Streaming Large Results

For memory-efficient processing of large result sets:

from flydelta import Client

with Client("grpc://localhost:8815") as client:
    for batch in client.stream_query("SELECT * FROM huge_table"):
        # Process each batch (default 100k rows)
        for row in batch.to_pylist():
            process(row)

        # Or process columnar (faster)
        ids = batch.column('id')
        values = batch.column('value')

CLI Client

# Query with table output
flydelta query "SELECT * FROM users LIMIT 10"

# Query with JSON output
flydelta query "SELECT * FROM users" -o json

# Query with CSV output
flydelta query "SELECT * FROM users" -o csv

# List tables
flydelta tables

Architecture

flydelta uses:

  • delta-rs: Rust-based Delta Lake implementation (no Spark needed)
  • DuckDB: Fast SQL execution with predicate pushdown
  • Apache Arrow Flight: Efficient gRPC-based data transfer

On startup, flydelta:

  1. Loads Delta table metadata
  2. Creates a connection pool with tables pre-registered
  3. Caches schemas for fast query planning

Queries are executed via DuckDB and streamed back as Arrow record batches.

Development

This package uses poetry for packaging and dependencies management.

# Clone and install
git clone https://github.com/dataresearchcenter/flydelta.git
cd flydelta
poetry install --with dev

# Setup pre-commit hooks
poetry run pre-commit install

# Run tests
make test

# Run linting
make lint

Disclaimer

Despite the name suggesting otherwise, flydelta has no affiliation with Delta Air Lines. We cannot help you book flights, upgrade your SkyMiles status, or locate your lost luggage. Actually, please stop flying at all if possible. 🌱

License

flydelta is licensed under the AGPLv3 or later license. See LICENSE.

Metadata

Release files for flydelta 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flydelta 0.0.3
File Size Uploaded
flydelta-0.0.3.tar.gz 17.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for flydelta 0.0.3
File Interpreter ABI Platform
flydelta-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 37.4 kB

Release files / flydelta-0.0.3.tar.gz

Download URL flydelta-0.0.3.tar.gz
Size 17.5 kB
Tags Source
SHA-256 checksum
How to use checksums
6a54e85763427b43ecf02bff8f9d55b00d7a55e49266d8aa2babe86b80d60074
BLAKE2b-256 checksum
How to use checksums
3efca62179b4ed14285743478a5d7135a88f50a499187f51289f0059e71219c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.3.2 CPython/3.13.5 Linux/6.12.63+deb13-amd64

Release files / flydelta-0.0.3-py3-none-any.whl

Download URL flydelta-0.0.3-py3-none-any.whl
Size 19.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b13cafb49295296b60b8d56c8bec149e4d93d377d67cd988ca715146dd77b460
BLAKE2b-256 checksum
How to use checksums
e48ad063f15ebb3f5ef3fbcac1bbe4e08d5aab34b6edace0a6f9bbb18dd9097e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.3.2 CPython/3.13.5 Linux/6.12.63+deb13-amd64

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page