Skip to content

Web UI — Catalog Editor

The sql-extractor start command launches a web-based interface for managing the extraction catalog.

Prerequisites

Build with the ui feature enabled:

cargo build --locked --features mssql,delta,ui
# or install globally (`ui` includes ADBC runtime switching support)
cargo install --path . --locked --features mssql,delta,ui,adbc

Quick Start

# Launch with auto-open browser
sql-extractor start

# Custom port
sql-extractor start --port 3000

# Without auto-open
sql-extractor start --no-open

Navigate to http://localhost:8080 (or your custom port).

Features

Connection & Topology Management

  • Source Connection — Set, test, or clear the database connection string in the Topology view
  • Connector Backend — Switch at runtime between Auto (Tiberius for standard MSSQL strings, ADBC for adbc://), Tiberius (pure-Rust MSSQL, no external driver required), and ADBC (Apache Arrow streaming; requires a locally installed ADBC driver such as dbc install mssql or a .dll/.so path in ADBC Driver)
  • Test Connection — Validate credentials and latency before saving
  • Connection Status — Visual indicator in header (green = connected, red = disconnected)
  • Start Extraction — One-click metadata extraction from connected database

Catalog Browser

  • Sidebar — Searchable list of all catalog entries
  • Status indicators — Green dot = enabled, gray = disabled
  • Quick filtering — Type to search by schema or table name

Table Details

  • Strategy badge — Shows recommended extraction method (CDC, Change Tracking, Watermark, Full)
  • Inline editing:
  • Toggle enabled/disabled
  • Adjust priority (higher = extracted first)
  • Set custom SQL filter (WHERE clause)
  • Metadata display — Primary keys, recommendation summary, timestamps
  • Data Preview — Toggle between Source (SQL Server) and Target (extracted Delta table), inspect the [source]/[target] reference and executed query, and filter rows server-side with AST-validated WHERE predicates
  • Extractions Tab — View per-table run history (status, strategy, row counts, duration, and SQL query)
  • Run Options — Configure batch_size, concurrency, force_full, track_deletes, and auto_reseed_on_gap before triggering a run from the header

Actions

  • Refresh — Re-scan database and update catalog with latest metadata

Schedule Management

  • Schedules Modal — View, create, edit, and delete scheduled extraction jobs
  • Cron Presets — Quick buttons for common patterns (Daily 9am, Hourly, etc.)
  • Table Multi-Select — Pick which tables each schedule extracts (with search/filter)
  • Enable/Disable Toggle — Pause or resume a schedule without deleting it
  • Trigger Now — Manually run a schedule’s extraction immediately
  • Headless Mode — Schedules also run via sql-extractor schedule CLI (no browser needed)

See SCHEDULES.md for full cron syntax reference and REST API details.

API Endpoints

The UI exposes a REST API for programmatic access:

Method Endpoint Description
GET /api/health Health check
GET /api/catalog List all entries
GET /api/catalog/{schema}/{table} Get single entry
PATCH /api/catalog/{schema}/{table} Update entry
GET /api/catalog/{schema}/{table}/preview Preview source or target rows (side, filter, limit)
GET /api/catalog/{schema}/{table}/runs Per-table extraction run history
POST /api/catalog/refresh Refresh from database
GET /api/metadata/tables List all tables
GET /api/metadata/tables/{schema}/{table} Table details
GET /api/schedules List all schedules
POST /api/schedules Create a new schedule
GET /api/schedules/{id} Get single schedule
PATCH /api/schedules/{id} Update schedule
DELETE /api/schedules/{id} Delete schedule
POST /api/schedules/{id}/trigger Manually trigger schedule

Example API Usage

# Get all catalog entries
Invoke-RestMethod http://localhost:8080/api/catalog

# Disable a table
Invoke-RestMethod http://localhost:8080/api/catalog/SalesLT/Customer `
  -Method Patch `
  -ContentType "application/json" `
  -Body '{"enabled": false}'

# Refresh catalog
Invoke-RestMethod http://localhost:8080/api/catalog/refresh -Method Post

Command Options

Option Default Description
--port, -p 8080 Server port
--no-open false Don't open browser automatically
--connection $MSSQL_CONN Database connection string
--connector auto ($SQL_EXTRACTOR_CONNECTOR) Connector backend (auto, tiberius, adbc)
--adbc-driver $ADBC_DRIVER Explicit ADBC driver name or shared-library path
--catalog-dir ./catalog Catalog storage directory

Architecture

┌─────────────────────────────────────────────────────┐
│                sql-extractor start                   │
├──────────────────────┬──────────────────────────────┤
│     Static Files     │          REST API            │
│   (embedded HTML)    │   /api/catalog, /api/health  │
├──────────────────────┴──────────────────────────────┤
│                     Axum Server                      │
├─────────────────────────────────────────────────────┤
│              Catalog        TiberiusConnector        │
│              ScheduleStore  Cron Scheduler            │
└─────────────────────────────────────────────────────┘

The frontend is embedded directly in the binary via rust-embed, making the CLI fully self-contained with no external dependencies.