Side Quests
•By Arthur Steijn

Introducing rust-sql-extractor: A Lightweight Rust Agent for SQL Server to Delta Lake

In my current projects, I often see teams spin up a heavy Spark cluster or a full orchestrator just to copy a handful of SQL Server tables into Delta Lake or Microsoft Fabric OneLake. That works, but it feels overkill when all you want is a predictable, incremental extract that runs anywhere.

So I started a side quest: can I pack metadata discovery, incremental SQL extraction, Delta Lake writes, cron scheduling, and a management UI into one lightweight Rust binary?

Here is how rust-sql-extractor is put together, how runtime switching between Tiberius and ADBC works, and how you can grab the prebuilt .exe and docs to try it yourself.

Why Build Another SQL Extractor?

Most lightweight scripts start with a quick SELECT * to CSV or Parquet and quickly break once tables grow or schemas evolve. You end up re-implementing watermarks, Change Data Capture (CDC), retries, and state tracking over and over again.

I wanted something with:

  • Zero runtime dependencies for standard SQL Server / Azure SQL extractions.
  • Smart incremental defaults (CDC, Change Tracking, Watermark, or Full with hash merge).
  • Direct Delta Lake output — either locally or straight to OneLake (abfss:// / Fabric HTTPS URLs).
  • One binary (sql-extractor.exe on Windows or sql-extractor on Linux) that works equally well in CI/CD, headless cron mode, or interactively in a browser.

High-Level Architecture

At its core, rust-sql-extractor separates Connectors (how we query source rows), Metadata & Advisor (how we pick an extraction strategy), Catalog & Scheduler (what state we persist), and Writers (where rows land):

High-level architecture of rust-sql-extractor

A few design choices keep it simple to operate:

  1. Discover and advise before extracting: The metadata extractor inspects primary keys, column types, CDC capture instances, and SQL Server Change Tracking. From that, the advisor recommends an extraction strategy per table and stores it in a local ./catalog folder.
  2. Atomic Delta checkpoints: Each table extract tracks its cursor (LSN, Change Tracking version, or watermark value) alongside the Delta commit so interrupted runs resume cleanly.
  3. Embedded React Web UI: Building with the ui feature bundles the React frontend directly into the binary via rust-embed and serves it over axum. Running sql-extractor start opens a local studio for testing connections, previewing source vs. target data, and managing cron schedules — no Node.js or separate web server needed.

Runtime Connector Switching: Tiberius vs. ADBC

One nice addition in v0.1.0 is support for two connector backends behind the same Connector trait, switchable at runtime without recompiling:

  • Tiberius (default for standard MSSQL strings): A pure-Rust TDS client compiled right into the binary. You do not need to install any ODBC or native database drivers on the machine.
  • ADBC (Apache Arrow Database Connectivity): Loads an ADBC driver dynamically at runtime and streams Apache Arrow RecordBatch data directly into the DeltaWriter — skipping intermediate JSON row conversion completely.

Please note: While Tiberius works completely out of the box, using the ADBC backend requires installing the native ADBC driver once on your host (for example via Columnar’s dbc install mssql, or by pointing --adbc-driver to a .dll / .so path).

The funny thing is that my first auto detection rule broke standard ODBC-style connection strings when built without the adbc feature: anything containing Driver={ODBC Driver 18 for SQL Server} matched driver= and tried to load ADBC! Tightening auto detection so brace-wrapped {...} ODBC driver names stay on Tiberius — and adding a Connector Backend selector right inside the Web UI Topology view — fixed that cleanly.

You can switch backends at runtime via:

  • CLI flag / env var: --connector tiberius or --connector adbc --adbc-driver mssql (SQL_EXTRACTOR_CONNECTOR / ADBC_DRIVER)
  • Connection URI: adbc://mssql?uri=...
  • Web UI: Topology → Connector Backend (Auto, Tiberius, or ADBC)

Try It Out (Including the Prebuilt .exe)

You do not need Rust installed to test it. I published prebuilt binaries for Windows (sql-extractor.exe) and Linux (sql-extractor) with mssql, delta, ui, and adbc all compiled in on the v0.1.0 GitHub Release.

Download sql-extractor-v0.1.0-x86_64-pc-windows-msvc.zip, extract sql-extractor.exe, and launch the embedded Web UI:

# Launch the embedded Web UI on http://localhost:8080
.\sql-extractor.exe start

# Or run a direct CLI extraction to Delta Lake
$env:MSSQL_CONN = "Server=localhost;Database=AdventureWorks;User Id=sa;Password=<your-password>;TrustServerCertificate=true"
.\sql-extractor.exe metadata
.\sql-extractor.exe extract --tables "SalesLT.Customer" --format delta

If you prefer building from source:

git clone https://github.com/ArthurSteijn/rust-sql-extractor.git
cd rust-sql-extractor
cargo install --path . --locked --features mssql,delta,ui,adbc

Full guides on extraction strategies, schedules, and API endpoints live on the GitHub Pages documentation site.

What’s Next?

v0.1.0 gives us a solid baseline for SQL Server and ADBC-backed extractions into Delta Lake and OneLake. Next up, I want to expand live integration coverage for ADBC drivers and keep refining the Web UI based on real workloads.

If you take the .exe for a spin and have feedback, feature ideas, or spot an edge case, let me know!

References

AS

Arthur Steijn

AI & Data Engineer • Focused on Foundry, DevOps, cloud infrastructure, and AI & data platform automation.