Install
cargo install faucet-cli --features source-mssql faucet init --source mssql
# Cargo.toml — use it as a library cargo add faucet-source-mssql
Starter config
source:
type: mssql
config:
# connection_url: "" # `mssql://user:pass@host:1433/database` URL form.
# connection_string: "" # ADO.NET-style connection string handed straight to `tiberius`, e.g.
# tls: { ... } # TLS configuration for an MSSQL connection.
query: "" # REQUIRED — SQL query to run.
# params: [] # Positional bind parameters for the query (`@P1`…`@Pn`).
# max_connections: 10 # Maximum pooled connections.
# batch_size: 1000 # Records per emitted `StreamPage`.
# statement_timeout_secs: 300 # Per-query timeout in seconds (`0` disables).
# replication: { type: full } # one of: full, incremental
# --- Alternative variants — replace the block above with one of these ---
# type: incremental
# column: "" # REQUIRED
# initial_value: null # REQUIRED
# state_key: "" # Explicit state-store key for the bookmark.
# shard: null # Optional primary-key range sharding for clustered (Mode B) execution.
Capabilities
| Replay | Non-deterministic replay |
|---|---|
| Exactly-once replay | No |
| Incremental | Yes |
| Dataset discovery | Yes |
| Reports lag | No |
| Compression | No |
Config fields
| Field | Type | Default | Description |
|---|---|---|---|
queryrequired | string | — | SQL query to run. Use @P1, @P2, … for params, and the literal @bookmark token to bind the incremental cursor server-side. |
connection_url | string | — | mssql://user:pass@host:1433/database URL form. Mutually exclusive with connection_string. |
connection_string | string | — | ADO.NET-style connection string handed straight to tiberius, e.g. Server=tcp:host,1433;Database=db;User Id=sa;Password=...;. Mutually exclusive with connection_url. |
tls | object | type: prefer | TLS / encryption settings. Defaults to MssqlTlsMode::Prefer. |
params | array | [] | Positional bind parameters for the query (@P1…@Pn). Defaults to empty. |
max_connections | integer | 10 | Maximum pooled connections. Defaults to 10. |
batch_size | integer | 1000 | Records per emitted StreamPage. 0 emits the whole result set as a single page. Defaults to DEFAULT_BATCH_SIZE. |
statement_timeout_secs | integer | 300 | Per-query timeout in seconds (0 disables). Defaults to 300. |
replication | object | type: full | Replication mode. Defaults to MssqlReplication::Full. |
state_key | string | — | Explicit state-store key for the bookmark. When unset, a key is derived from the server's host, port and database and a query fingerprint. |
shard | object | — | Optional primary-key range sharding for clustered (Mode B) execution. |
Get started
Your first pipeline runs in five minutes.
Install the CLI, scaffold a config, and move real data — nothing external to stand up.
curl -LsSf https://github.com/faucet-hq/faucet-stream/releases/latest/download/faucet-cli-installer.sh | sh brew install faucet-hq/faucet-stream/faucet-cli