Read Delta Lake tables, transform with SQL, and load into SQL Server
Project description
Delta Funnel
Move Delta Lake data into SQL Server without Spark or ODBC.
A lightweight Rust and Python toolkit for reading Delta Lake tables,
transforming them with SQL, and bulk-loading through a native TDS driver.
Built in Rust. Python API included.
[!NOTE] Delta Funnel is early project code. The Rust crate is available on crates.io, and the Python package is available on PyPI.
When To Use It
Use Delta Funnel when you need to:
- Read Delta Lake tables from local paths or object-store URIs.
- Transform rows with DataFusion SQL.
- Load one or more results into Microsoft SQL Server.
- Use native TDS bulk writes designed to be significantly faster than ODBC-based loads.
- Run the workflow from Rust or from a PyO3 native extension module in Python.
- Avoid standing up Spark for a focused Delta Lake to SQL Server pipeline.
Install Or Build
For Rust, add the delta-funnel crate:
cargo add delta-funnel
For Python, add the deltafunnel package:
uv add deltafunnel
Python Quickstart
from deltafunnel import Session
connection_string = (
"server=tcp:localhost,1433;"
"database=warehouse;"
"user id=etl_user;"
"password=REPLACE_ME;"
"encrypt=true;"
"TrustServerCertificate=yes"
)
session = Session(default_mssql_connection_string=connection_string)
orders = session.delta_lake("file:///path/to/orders-delta", name="orders")
daily_orders = session.table_from_sql("""
select customer_id, order_date, total_amount
from orders
where order_date >= date '2026-01-01'
""")
report = daily_orders.write_to_mssql(
schema="dbo",
table="daily_orders",
load_mode="create_and_load",
)
session.delta_lake(..., name="orders") registers a Delta source immediately.
session.delta_lake(...) without name returns a pending source; call
.alias("orders") before SQL references it.
Reports are plain Python dict values converted from Rust report types. Report
formatting is designed to avoid exposing connection strings, credentials, and
raw row values. See
docs/failure-reports-and-tracing.md
for the failure-report and tracing rules.
Dry Runs
Use dry_run=True on the same write methods to validate the plan without
writing rows:
dry_run_report = daily_orders.write_to_mssql(
schema="dbo",
table="daily_orders",
load_mode="create_and_load",
dry_run=True,
)
There are no public Python dry_run_* methods.
Multi-output Writes
Table.to_mssql(...) creates an output spec without writing. Session.write_all
writes the specs in one workflow.
active_orders = session.table_from_sql("""
select *
from orders
where status = 'active'
""").alias("active_orders")
west = session.table_from_sql("""
select * from active_orders where region = 'west'
""")
east = session.table_from_sql("""
select * from active_orders where region = 'east'
""")
outputs = [
west.to_mssql(
schema="dbo",
table="active_orders_west",
load_mode="append_existing",
name="west_active_orders",
),
east.to_mssql(
schema="dbo",
table="active_orders_east",
load_mode="append_existing",
name="east_active_orders",
),
]
dry_run_report = session.write_all(outputs, dry_run=True)
report = session.write_all(outputs, options={"cache_mode": "disabled"})
options={"cache_mode": "auto"} is the default execute behavior. It may cache
shared lazy SQL aliases during one write_all call. Use
options={"cache_mode": "disabled"} to force the baseline path.
[!IMPORTANT]
optionsis only accepted for executewrite_allcalls, not dry runs.
The first Python surface does not include persistent cache, persist,
or materialize APIs.
Rust API
The Rust crate owns the workflow implementation and public report types. A
minimal dry-run example is available at
crates/delta-funnel/examples/query_load_dry_run.rs.
Run it with a local Delta table path:
DELTA_FUNNEL_EXAMPLE_ORDERS_DELTA=/path/to/orders \
cargo run -p delta-funnel --example query_load_dry_run
Core Rust entry points include:
DeltaFunnelSessionfor source registration and session state.DeltaFunnelRuntimefor lazy SQL planning, dry runs, and writes.OutputWritePlanandMssqlOutputTargetfor output planning.WriteAllOptionsandWriteAllCacheModefor multi-output execution.
Build And Test
cargo fmt --all --check
cargo check --workspace
cargo test --workspace
cargo clippy --workspace --all-targets --all-features -- -D warnings
SQL Server integration tests are opt-in:
cargo xtask sqlserver-test
The xtask runner can start a local SQL Server container, run Rust and Python
write tests, and remove the container when it exits. See
docs/mssql-integration-tests.md.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file deltafunnel-0.1.0-cp310-abi3-win_amd64.whl.
File metadata
- Download URL: deltafunnel-0.1.0-cp310-abi3-win_amd64.whl
- Upload date:
- Size: 41.1 MB
- Tags: CPython 3.10+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f41dd19d812c7927aca101b970ef18e9bf1d04bc3a6552072c3ac5615435d81
|
|
| MD5 |
466e0096d532e4397b646bb1f1d834ee
|
|
| BLAKE2b-256 |
d2755c23414838baa94e62693d764d58bbd8a898c5d456ab45aa6f6361b69028
|
Provenance
The following attestation bundles were made for deltafunnel-0.1.0-cp310-abi3-win_amd64.whl:
Publisher:
pypi.yml on mag1cfrog/delta-funnel
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
deltafunnel-0.1.0-cp310-abi3-win_amd64.whl -
Subject digest:
8f41dd19d812c7927aca101b970ef18e9bf1d04bc3a6552072c3ac5615435d81 - Sigstore transparency entry: 2041307154
- Sigstore integration time:
-
Permalink:
mag1cfrog/delta-funnel@6359ad2ea8af2fdfa30c4fdef42662876af94389 -
Branch / Tag:
refs/tags/delta-funnel-v0.1.0 - Owner: https://github.com/mag1cfrog
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@6359ad2ea8af2fdfa30c4fdef42662876af94389 -
Trigger Event:
release
-
Statement type:
File details
Details for the file deltafunnel-0.1.0-cp310-abi3-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: deltafunnel-0.1.0-cp310-abi3-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 48.7 MB
- Tags: CPython 3.10+, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2720d0f8c6064ef6950d8f493f609f60e4e1a9e743e9e64e20ae528a6cf731b
|
|
| MD5 |
f9a4a3d5981c1505d4756795c46bbb7a
|
|
| BLAKE2b-256 |
509ff29a6bfd3c19e7674e087673f7d2566784948417af7c3d424a3c0f1948e7
|
Provenance
The following attestation bundles were made for deltafunnel-0.1.0-cp310-abi3-manylinux_2_28_x86_64.whl:
Publisher:
pypi.yml on mag1cfrog/delta-funnel
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
deltafunnel-0.1.0-cp310-abi3-manylinux_2_28_x86_64.whl -
Subject digest:
b2720d0f8c6064ef6950d8f493f609f60e4e1a9e743e9e64e20ae528a6cf731b - Sigstore transparency entry: 2041307421
- Sigstore integration time:
-
Permalink:
mag1cfrog/delta-funnel@6359ad2ea8af2fdfa30c4fdef42662876af94389 -
Branch / Tag:
refs/tags/delta-funnel-v0.1.0 - Owner: https://github.com/mag1cfrog
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@6359ad2ea8af2fdfa30c4fdef42662876af94389 -
Trigger Event:
release
-
Statement type:
File details
Details for the file deltafunnel-0.1.0-cp310-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: deltafunnel-0.1.0-cp310-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 41.7 MB
- Tags: CPython 3.10+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b783ae167dc3b87efd49e0085e280274a4fafb0d50bda5b837bf4d0facb2cce
|
|
| MD5 |
dfdc2fe925af54931c45b543c6b963e5
|
|
| BLAKE2b-256 |
f2221d0efc98b99075f9700dbc8416c9c051870b81d7c41194684bddff69aee4
|
Provenance
The following attestation bundles were made for deltafunnel-0.1.0-cp310-abi3-macosx_11_0_arm64.whl:
Publisher:
pypi.yml on mag1cfrog/delta-funnel
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
deltafunnel-0.1.0-cp310-abi3-macosx_11_0_arm64.whl -
Subject digest:
3b783ae167dc3b87efd49e0085e280274a4fafb0d50bda5b837bf4d0facb2cce - Sigstore transparency entry: 2041307272
- Sigstore integration time:
-
Permalink:
mag1cfrog/delta-funnel@6359ad2ea8af2fdfa30c4fdef42662876af94389 -
Branch / Tag:
refs/tags/delta-funnel-v0.1.0 - Owner: https://github.com/mag1cfrog
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@6359ad2ea8af2fdfa30c4fdef42662876af94389 -
Trigger Event:
release
-
Statement type:
File details
Details for the file deltafunnel-0.1.0-cp310-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: deltafunnel-0.1.0-cp310-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 43.9 MB
- Tags: CPython 3.10+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f6ba74a9bbd1730704d7e046bf7b83181ce2cbd19c8156b74b172d0a42a74987
|
|
| MD5 |
85a3e36e700e2d787c1f04c708ad43cd
|
|
| BLAKE2b-256 |
d21f46c0f715414bd1ed37cd8ba6dff8f2cf9cf5859b56f494510c0d1b1cd7a2
|
Provenance
The following attestation bundles were made for deltafunnel-0.1.0-cp310-abi3-macosx_10_12_x86_64.whl:
Publisher:
pypi.yml on mag1cfrog/delta-funnel
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
deltafunnel-0.1.0-cp310-abi3-macosx_10_12_x86_64.whl -
Subject digest:
f6ba74a9bbd1730704d7e046bf7b83181ce2cbd19c8156b74b172d0a42a74987 - Sigstore transparency entry: 2041307031
- Sigstore integration time:
-
Permalink:
mag1cfrog/delta-funnel@6359ad2ea8af2fdfa30c4fdef42662876af94389 -
Branch / Tag:
refs/tags/delta-funnel-v0.1.0 - Owner: https://github.com/mag1cfrog
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@6359ad2ea8af2fdfa30c4fdef42662876af94389 -
Trigger Event:
release
-
Statement type: