Expand description
§faucet-stream
A declarative, config-driven data pipeline with pluggable source and sink connectors.
📖 Guide, tutorials & cookbook: https://pawansikawat.github.io/faucet-stream/
§Feature flags
| Feature | Description |
|---|---|
source-rest (default) | REST API source with pagination, auth, transforms |
source-graphql | GraphQL API source with cursor pagination |
source-xml | XML/SOAP API source with XML-to-JSON conversion |
source-grpc | gRPC source with dynamic protobuf messages |
source-postgres | PostgreSQL query source |
source-postgres-cdc | PostgreSQL CDC source (logical replication) |
source-mysql | MySQL query source |
source-mssql | Microsoft SQL Server query source |
source-sqlite | SQLite query source |
source-s3 | AWS S3 file source |
source-mongodb | MongoDB query source |
source-mongodb-cdc | MongoDB CDC source (Change Streams) |
source-mysql-cdc | MySQL CDC source (binlog replication) |
source-redis | Redis source (streams, lists, keys) |
source-webhook | Webhook HTTP receiver source |
source-websocket | WebSocket streaming source |
source-csv | CSV file source |
source-elasticsearch | Elasticsearch search/scroll source |
source-kafka | Apache Kafka consumer source |
source-kinesis | AWS Kinesis Data Streams source |
source-spanner | Google Cloud Spanner query source |
source-parquet | Apache Parquet file source (local, glob, S3) |
source-delta | Apache Delta Lake source (local FS or S3/Azure/GCS, time travel) |
source-databricks | Databricks SQL query source (Statement Execution API) |
sink-bigquery | Google BigQuery streaming insert sink |
sink-iceberg | Apache Iceberg sink (append-only, REST/Glue/SQL/HMS catalogs) |
sink-postgres | PostgreSQL sink (jsonb or auto-mapped columns) |
sink-jsonl | JSON Lines file sink |
sink-snowflake | Snowflake SQL REST API sink |
sink-mysql | MySQL sink |
sink-mssql | Microsoft SQL Server sink |
sink-sqlite | SQLite sink |
sink-s3 | AWS S3 file sink |
sink-mongodb | MongoDB insert sink |
sink-redis | Redis sink (streams, lists, key-value) |
sink-csv | CSV file sink |
sink-elasticsearch | Elasticsearch bulk index sink |
sink-http | HTTP POST sink |
sink-kafka | Apache Kafka producer sink |
sink-kinesis | AWS Kinesis Data Streams sink |
sink-spanner | Google Cloud Spanner mutation sink |
sink-parquet | Apache Parquet file sink (local, S3) |
encryption | AES-256-GCM at-rest sealing for file state-store bookmarks and per-line JSONL/DLQ output |
sink-delta | Apache Delta Lake sink (append-only; local FS or S3/Azure/GCS) |
kafka-schema-registry | Schema Registry support for Kafka connectors |
source | All source connectors |
sink | All sink connectors |
full | Every connector |
Re-exports§
pub use faucet_lineage as lineage;lineagepub use faucet_transform_sql as transform_sql;transform-sql
Modules§
- adaptive
- Adaptive batch sizing — an AIMD controller that auto-tunes the effective
write batch size per pipeline row from observed sink latency + error rate.
Pure logic (no I/O);
run_streamfeeds it observations and emits metrics. Seedocs/superpowers/specs/2026-05-31-adaptive-batch-sizing-design.md. - async_
stream - Asynchronous stream of elements.
- auth
auth - Single-flight OAuth2 / token-endpoint auth providers (enable the
authfeature). Share one across connectors viawith_auth_provideror the CLIauth: { ref }catalog. - check
- Preflight check types for
faucet doctor(#126). - common_
gcs sink-gcsorsource-gcs - common_
kafka sink-kafkaorsource-kafka - common_
kinesis sink-kinesisorsource-kinesis - Shared AWS Kinesis types (credentials enum, client builder), re-exported for library callers when either Kinesis connector is enabled.
- common_
spanner sink-spannerorsource-spanner - Shared Cloud Spanner types (credentials enum, connection block, value conversion), re-exported for library callers when either Spanner connector is enabled.
- compression
compression - Transparent gzip / zstd compression wrappers for file-shaped connectors.
- config
- Configuration loading utilities.
- contract
contract - Data contracts (issue #204): a declarative, versioned schema + semantic
contract for a pipeline’s output — required fields, types, nullability,
enum sets, regex patterns, numeric/length bounds — enforced per page after
transforms and quality checks and before the sink write. Breaches
fail,quarantine(via the DLQ), orwarnper the contract-level policy. - discover
- Live source introspection (
faucet discover, #211). - dlq
- Dead-letter queue (DLQ) wiring shared by the pipeline runner.
- drift
- Schema-drift detection + policy types (issue #194).
- encryption
encryption - Encryption at rest for faucet-managed local files (#207).
- error
- Error types for faucet-stream.
- futures_
core - Core traits and types for asynchronous operations in Rust.
- idempotency
- Exactly-once / idempotent delivery primitives.
- masking
masking - PII detection + column-level masking policies (issue #206): a declarative,
destination-scoped policy that classifies sensitive fields — by field-name
pattern, by value detector (email / card-with-Luhn / SSN / phone / IPv4), or
by explicit field list — and rewrites them per action (
redact/hash/tokenize/partial). - observability
- Pipeline-internal observability: tracing spans and
metricscounters/ histograms wired automatically around every source, sink, transform, and state-store operation. Seedocs/superpowers/specs/2026-05-23-observability-otel-prometheus-design.md. - pipeline
- Source-to-sink pipeline orchestration.
- quality
quality - Data-quality checks: declarative per-record and per-batch assertions that
quarantine violating records to the DLQ or abort the run. Pure evaluation;
the pipeline wires the DLQ routing in
run_stream. - replication
- Incremental replication support.
- resilience
- Unified resilience policy: retry, backoff classification, circuit breaker,
and poison-pill row handling. See
docs/superpowers/specs/2026-06-17-resilience-policy-design.md. - retry
- Shared exponential-backoff retry executor for HTTP-style sources.
- schema
- JSON Schema inference from record samples.
- schemars
- Schemars
- shard
- Source sharding for clustered (Mode B) execution.
- sink
- source
source-rest - stage
- Pipeline-level transform stages. A
TransformStagewraps one of six shapes: - state
- traits
- Shared traits for faucet sources and sinks.
- transform
- Record transformation pipeline.
- transforming_
source - Wrap any
Sourcewith a fixed list ofTransformStages applied to every emitted record. The canonical way for library callers to attach stages (transforms wrapped viaTransformStage::Map, plusFilter/Explode/Custom); the CLI uses this same type internally. - util
- Shared utilities used across faucet source and sink crates.
- verify
- Read-time integrity verification for streaming object bodies.
- write_
mode - Unified write-mode types + planner shared by every upsert-capable sink.
Macros§
- json
- Construct a
serde_json::Valuefrom a JSON literal. - schema_
for - Generates a
Schemafor the given type using default settings. The default settings currently conform to JSON Schema 2020-12, but this is liable to change in a future version of Schemars if support for other JSON Schema versions is added.
Structs§
- Adaptive
Batch Config - Configuration for the adaptive batch-size controller. Lives under
execution.adaptive_batch_size. Defaultenabled = false(opt-in); when disabled the pipeline writes each page exactly as before. - Adjustment
- A size change the controller decided on.
- Aimd
Controller - Additive-increase / multiplicative-decrease controller. Pure + deterministic.
- Auth
Reference - A
{ ref: <name> }pointer to a named provider in the top-levelauth:catalog. The only permitted key isref. - Cancellation
Token - A token which can be used to signal a cancellation request to one or more tasks.
- CdcUnwrap
Spec transform-cdc-unwrap - Spec for
TransformStage::CdcUnwrap. Normalizes a CDC change-event envelope ({op, before, after, …}) into a flat row plus a marker field, so a downstream upsert sink never needs to understand CDC. A 1→0|1 stage: DDL/truncate events (and non-delete events with noafterimage) are dropped. - Check
Context - Inputs a probe may need. The doctor command enforces
timeouton the wholecheck()call; connectors may also use it to bound their own client calls. - Check
Report - A connector’s full preflight report.
- Check
Tally - Per-check counters + elapsed time, keyed by check name. Emitted as metrics by the observability wrapper.
- Circuit
Breaker - Tracks consecutive failures; opens when
thresholdis reached. - Circuit
Breaker Config - Circuit-breaker tuning. Counts consecutive page-level write failures.
- Column
Change - One column’s drift, expressed in JSON-Schema type-fragment terms
(e.g.
{"type":"integer"}or{"type":["string","null"]}). - Compiled
Contract - A fully compiled contract. Built once via
CompiledContract::compile. - Compiled
Encryption - A compiled, validated encryption policy: the derived write key plus every derived read key (write key first).
- Compiled
Masking - A masking policy compiled and ready to apply to pages.
- Compiled
Quality - A fully compiled quality spec. Built once via
CompiledQuality::compile. - Contract
Outcome - Result of applying the contract pass to one page.
- Contract
Spec - The
contract:config block: a declarative, versioned schema + semantic contract for a pipeline’s output, enforced per page after transforms and quality checks and before the sink write. - Contract
Violation - One observed contract breach.
- Dataset
Descriptor - One dataset discovered behind a source’s connection.
- Delete
Marker - Identifies a record as a delete (vs. an upsert) by a marker field’s value.
e.g.
{ field: "__op", values: ["d", "delete"] }. - DlqConfig
- Pipeline-level DLQ wiring.
- DlqStats
- Counters returned alongside
PipelineResultwhen a DLQ is wired. - Duration
Guard - On
Drop, records the elapsed time since construction into the named histogram with the supplied labels. Recording on drop guarantees a sample even if the surrounding future is cancelled or panics. - Encryption
Spec - The user-facing
encryption:config block (state store / jsonl sink). - Explode
Spec transform-explode - Spec for
TransformStage::Explode. Fans one record out into N records based on the array atpath. Compiled into aCompiledExplodeat pipeline-build time; per-record work is one path resolve + N clones + N merges. - Field
Contract - One promised top-level field: its type plus optional semantic constraints.
- File
State Store - File-backed
StateStore. Each key maps to a JSON file at{root}/{safe_filename(key)}.json, written via atomic rename. The filename stem percent-encodes:as%3Aso keys using thepipeline:rest:issuesconvention are valid on Windows. - Filter
Spec transform-filter - Predicate spec for
TransformStage::Filter. Compiled into aCompiledFilterat pipeline-build time; per-record work is a single path resolve + comparison. - Guarantee
Inputs - Inputs to
derive_delivery_guarantee— the facts about a concrete source × sink × config combination the derivation keys off. - Install
Report - Report from
install_observabilityso callers can log what actually happened (recorder installed vs. already-installed vs. disabled). - Instrumented
Sink - Wraps a
&dyn Sink(or any&S: Sink) and emits spans + metrics aroundwrite_batchandflush. Constructed byPipeline::run. - Instrumented
Source - Wraps a
&dyn Source(or any&S: Source) and emits spans + metrics around every call. Constructed byPipeline::runand never exposed to end users; the wrapped source remains the user-facing object. - Instrumented
State Store - Wraps an
Arc<dyn StateStore>and emits faucet.state.* spans + metrics around every operation. - KeyTuple
- Ordered key column → value pairs, in
keydeclaration order. - Labels
- Common labels carried by every span and metric.
- Length
Check - Built-in
IntegrityCheckthat fails when the number of bytes read does not match the length advertised by the object store (Content-Lengthfor S3, objectsizefor GCS). Catches a cleanly-truncated transfer that would otherwise be accepted as a complete object. - MaskHit
- One field-masking event, for metrics/observability.
- Mask
Rule - One masking rule: a matcher + the action to apply to matching fields, optionally scoped to a subset of destination sinks.
- Masking
Outcome - Result of masking one page.
- Masking
Spec - The
masking:config block: a declarative, destination-scoped policy that classifies sensitive fields (by field-name pattern, by value detector, or by explicit field list) and applies a masking action per page. The masking pass runs first — before the quality, contract, and schema-drift passes and before every sink write — so PII never reaches a sink, the DLQ, or a lineage sample unmasked. - Match
Spec - How a rule classifies a field as sensitive. Any combination is allowed; a field matches the rule if any configured criterion matches (name pattern OR value detector OR explicit field name).
- Memory
State Store - In-memory
StateStorefor tests and ephemeral pipelines. - Observability
Config - Configuration for
install_observability. Either or both sections may beNone; unset sections install nothing. - Observation
- One observed sub-batch write outcome fed to the controller.
- Otel
Config - Pure-data OTLP export configuration. Contains no opentelemetry types.
- Pipeline
- A pipeline that moves data from a
Sourceto aSink. - Pipeline
Result - Result of a pipeline run.
- Poison
Policy - Poison-pill (per-row) policy.
- Probe
- One named probe within a
CheckReport(e.g."read","auth","network","permissions","schema","io","sentinel"). - Prometheus
Config - Quality
Outcome - Result of applying the quality pass to one page.
- Quality
Spec - The
quality:config block. Per-record checks run first (partitioning the page into survivors + quarantined); per-batch checks then run over the survivors. - Quarantined
Record - A record removed from the page by a quality check, destined for the DLQ.
- Resilience
Policy - The umbrella policy attached to a run.
- Response
Validator source-rest - Optional callback to decide whether the token endpoint response is successful.
- Rest
Stream source-rest - A configured REST API stream that handles pagination, auth, and extraction.
- Rest
Stream Config source-rest - Configuration for a RestStream.
- Retry
Class Set - The set of classes the user has opted into retrying. Backed by a fixed-size
bool array (only four variants), so it is
Copyand allocation-free. - Retry
Metrics - Per-op labels for the metered runner. Identifies which pipeline / matrix row
/ I/O operation a retry belongs to so the resilience metrics
(
faucet_resilience_retries_total/_retry_sleep_seconds/_giveup_total) carry the spec’s{pipeline, row, op}label set.opis a closed set (sink_write/flush/state_put/source). - Retry
Policy - Retry configuration shared by the pipeline loop and source connectors.
- RunStream
Options - Schema
Diff - Result of diffing a page’s inferred shape against the destination schema.
- Schema
Drift Policy - Compiled, ready-to-run drift policy. Cheap to clone.
- Schema
Drift Spec - User-facing
schema:config block (pipeline level). - Schema
Evolution - The applyable subset of a
SchemaDiffhanded tocrate::Sink::evolve_schema. Never carriesincompatiblecolumns — those are routed by the policy. - Shard
Spec - One independently-processable slice of a shardable source.
- Stream
Page - One page emitted by
Source::stream_pages. - Tracing
Config - Transforming
Source - Source decorator that applies a fixed list of compiled stages to every
record. Emits
faucet_transform_*metrics per page viainstrumented_apply_stages. - Unwrapped
Envelope - A DLQ envelope parsed back into its original payload plus the metadata
needed to inspect and replay it. Produced by
unwrap_envelope. - Verifying
Reader - An
AsyncReadadapter that observes every byte read frominnerand runs the configuredIntegrityChecks at EOF. Wrap the raw network reader before anyBufReader/ decompression layer. - Violating
Record - A record removed from the page by a
quarantinebreach, destined for the DLQ. - Write
Plan - The partition of a page by write mode. Infallible to build — per-row
failures (missing/null key) land in
failedwith their original page index so the caller can route them to a DLQ or abort. - Write
Spec - Shared write-mode config, embedded in each upsert-capable sink config via
#[serde(flatten)]sowrite_mode/key/delete_markerappear at the sink-config top level.
Enums§
- Adjust
Direction - Direction of a batch-size adjustment (metric label).
- Adjust
Reason - Why an adjustment happened (metric label).
- Auth
source-rest - Supported authentication methods.
- Auth
Spec - A connector’s
auth:field: either an inline auth definitionA(the{ type, config }shape), or a{ ref: <name> }reference to a shared provider defined in the top-levelauth:catalog. - Backoff
Kind - How the inter-attempt delay grows.
- Batch
Check - A per-batch check, evaluated per page over the survivors of the per-record pass.
- Cast
OnError transform-cast - Failure policy for
RecordTransform::Cast. Default:Error. - Cast
Type transform-cast - Target type for
RecordTransform::Cast. - Compare
Op - Ordering / equality operator for the
comparecheck. - Compression
- Internal post-resolution codec. No
Autovariant — callCompressionConfig::resolve. - Compression
Config - User-facing compression config. Defaults to
Auto. - Contract
Field Type - Declared type of a contract field.
- Credential
- A resolved credential produced by an
AuthProvideror built from inline auth config. Connectors map this onto their wire protocol (HTTP header, gRPC metadata, …). - Delivery
Guarantee - The end-to-end guarantee a pipeline provides for a given source × sink × config combination.
- Delivery
Mode - Delivery guarantee for a pipeline run.
- Detector
- Built-in value detectors. All are conservative (anchored full-string matches; the card detector additionally requires a valid Luhn checksum) so false positives stay rare — masking silently rewrites data, so a false positive is a data-quality bug, not just noise.
- DlqReason
- Reason a page produced DLQ traffic. Used as a metric label and span attribute; closed-set enum so cardinality stays bounded.
- Effectively
Once Mechanism - The mechanism through which a pipeline achieves effectively-once delivery.
- Encryption
Algorithm - Supported AEAD algorithms. A single variant today; the format byte in the on-disk header leaves room for more without breaking old files.
- Envelope
Error - Error returned by
unwrap_envelopewhen a value is not a usable DLQ envelope. Only the payload is mandatory — every other field is optional so envelopes written by older versions still replay. - Faucet
Error - All possible errors returned by faucet-stream.
- Filter
Op transform-filter - Comparison operator for
FilterSpec. - Install
Error - Json
Type - Expected JSON type for the
type_ischeck. - KeyCase
Mode transform-keys-case - Output convention for
RecordTransform::KeysCase. - Mask
Action - What to do with a value once a rule matches it.
- OnBatch
Error - Policy applied when a sink reports an outer failure (the whole batch failed, no per-row info).
- OnBreach
- What to do when a record breaches the contract. Contract-level (not per-field): a contract is a single versioned promise, so one policy governs every rule in it.
- OnDrift
- What to do when drift is detected.
- OnFailure
- What to do when a check fails. The allowed subset is validated per check
at compile time (see
compile.rs). - OnIncompatible
evolve-only: what to do with a narrowing/incompatible change that can’t be auto-applied.- OnMissing
transform-explode - Behaviour when an
ExplodeSpec’spathdoesn’t yield a non-empty array. The default isPassthroughbecause silently dropping records is the worst failure mode for ETL pipelines — surfacing the record unchanged lets downstream stages decide. - Otel
Protocol - OTLP transport protocol.
- Otel
Signal - A telemetry signal that can be exported over OTLP.
- Pagination
Style source-rest - Supported pagination strategies.
- Poison
Action - What to do with a row that keeps failing after
max_row_attempts. - Probe
Status - Outcome of a single probe.
- Record
Check - A per-record check. Addressed field accepts the filter/explode path subset
(bare key,
dot.path,$['bracketed']). - Record
Transform - A transformation applied to every record fetched by a source (e.g. the REST
source’s
RestStream). - Replay
Guarantee - How faithfully a
Sourcereplays its record stream when resumed from a bookmark. - Replication
Method - Determines how records are replicated from the source.
- Retry
Class - The transient-failure class an error belongs to. Closed set so it can be a
bounded metric label and a
retry_onconfig value. - Sink
Guarantee - The strongest delivery guarantee a
Sinkcan uphold. - SqlBase
Type - Backend-neutral base column type inferred from a JSON-Schema fragment. Each SQL sink maps these to its concrete keyword.
- Transform
Stage - One stage in a transform pipeline.
- Value
- Represents any valid JSON value.
- Value
Case Mode transform-value-case - String-value casing mode for
RecordTransform::ValueCase. - Write
Mode - Write semantics for a sink. Serialized snake_case. Default
Append.
Constants§
- DEFAULT_
BATCH_ SIZE - Default page size used when a caller does not specify one.
- DEFAULT_
EXPIRY_ RATIO source-rest - Default fraction of
expires_inafter which the token is refreshed. - DEFAULT_
TOKEN_ ENDPOINT_ EXPIRY_ RATIO source-rest - Default fraction of
expires_inafter which the token is refreshed. - MAX_
BATCH_ SIZE - Hard upper bound on
batch_size. Values above this (other than the special0“no batching” sentinel) are rejected at config validation time to prevent accidental O(total) buffering in the default implementation ofSource::stream_pages.
Traits§
- Auth
Provider - A live, shareable source of credentials.
- Integrity
Check - A check fed the raw bytes of an object body as they stream past, and asked to validate once the underlying reader reaches EOF.
- Json
Schema - A type which can be described as a JSON Schema document.
- Sink
- A sink writes records to an external system.
- Source
- A source fetches records from an external system.
- State
Store - Persistent key/value store for replication bookmarks and pipeline checkpoints.
- Stream
- A stream of values produced asynchronously.
Functions§
- adds_
null - True when
topermits null butfromdoes not — the column needs itsNOT NULLconstraint relaxed. - apply_
contract - Apply the contract to one page. Pure: no metrics, no DLQ I/O.
- apply_
masking - Apply the masking policy to one page. Pure: no metrics, no I/O, infallible.
- apply_
quality - Apply the full per-page quality pass. Pure: no metrics, no DLQ I/O.
- base_
widened - True when the non-null base type family changes from
fromtoto(after the integer→number collapse) — i.e. the column needs anALTER TYPE. - build_
envelope - Build a single DLQ envelope.
- classify
- Map a
FaucetErrorto itsRetryClass, orNoneif it is not a transient failure. The single source of truth for retriability — both the policy runner andFaucetError::is_retriabledefer to this. - columns_
to_ schema - Assemble an
infer_schema-shaped object schema from(column_name, type_fragment)pairs, preserving input order semantics (serde_jsonmap ordering applies). - compile_
stage - Compile a
TransformStageinto itsCompiledStageform. - compress_
buf - One-shot in-memory compression. Used by S3 and GCS sinks that build a full
Vec<u8>body before upload. - derive_
delivery_ guarantee - Derive the end-to-end
DeliveryGuaranteea pipeline actually provides. - execute_
with_ policy - Execute
opunderpolicy. Retries retriable errors (perRetryPolicy::is_retriable) up tomax_attemptstotal attempts, sleeping the backoff delay between attempts. Ifcancelis provided, a cancellation during a backoff sleep stops waiting and returns the last error immediately (the caller observes the token and flushes).Okreturns at once. - execute_
with_ policy_ metered - Like
execute_with_policy, but emits the resilience metrics (faucet_resilience_retries_total{op,class},faucet_resilience_retry_sleep_seconds{op}, andfaucet_resilience_giveup_total{op}when retries are exhausted) using the labels inmetrics. Behavior (retry/give-up/cancel outcomes) is identical toexecute_with_policy— only the metric emission differs. - execute_
with_ retry - Execute
operationwith up tomax_retriesretries on retriable errors, using exponential backoff (base_backoff * 2^attempt) with random jitter. Non-retriable errors return immediately;Okreturns immediately. - fetch_
oauth2_ token source-rest - Fetch an OAuth2 token using the client credentials grant.
- fetch_
token_ from_ endpoint source-rest - Fetch a token from the given endpoint and extract it using JSONPath.
- format_
token - Render a page sequence as a fixed-width, lexicographically-ordered token.
- format_
token_ with_ bookmark - Render a commit token that carries the page’s resume bookmark alongside
the sequence:
"{seq:020}#{bookmark-json}". - install_
observability Non- observability-install - Non-
observability-installstub. Returns an empty report, never panics. - instrumented_
apply_ contract - Apply the contract pass and emit metrics. Returns the same outcome as
apply_contract; on afail-policy breach, incrementsfaucet_contract_aborts_totalbefore propagating the error. - instrumented_
apply_ masking - Apply the masking pass and emit metrics. Infallible — masking rewrites
matching fields in place and never fails a run. Increments
faucet_masking_fields_total{pipeline,row,rule,action,detector}once per masked field (detectoris""for name-based matches). - instrumented_
apply_ quality - Apply the quality pass and emit metrics. Returns the same outcome as
apply_quality; on abort, incrementsfaucet_quality_aborts_totalbefore propagating the error. - instrumented_
apply_ stages - Apply a sequence of compiled stages to
records(a full page). Per-record stages flat-map over each record;PageFnstages transform the whole page at once. Emits onefaucet.transform.applyspan and countersfaucet_transform_records_in_total/_records_out_totalper call (per page). - json_gt
- Total-order “greater than” over JSON values, using the same comparison
filter_incrementalapplies to replication keys (numbers numerically, strings lexicographically — so RFC3339 timestamps order correctly). Public so callers bounding a replay window (e.g.faucet backfill --to-bookmark) compare exactly like the incremental filter does. - json_
schema_ base_ type - Map a top-level JSON-Schema type fragment to a base SQL type, or
Nonefor a pure-null fragment (caller falls back to TEXT/NVARCHAR for an added column whose only observed value was null). - key_
to_ doc_ id - Render a key tuple into a single document id (Elasticsearch
_id). - key_
to_ filter - Build a Mongo/ES filter document
{ col: value, … }from a key tuple. - nullable_
type - Wrap a type fragment as nullable (
{"type": ["T", "null"]}), matching the nullable shapeinfer_schemaemits. - parse_
token - Parse the numeric sequence from a token produced by
format_tokenorformat_token_with_bookmark. ReturnsNoneon garbage. - parse_
token_ parts - Parse a stored commit token into
(seq, embedded_bookmark). - plan_
writes - Partition
pageinto upserts + deletes perspec. The single place all six sinks share.WriteMode::Appendshould never reach here (callers route append separately); if it does, every row is treated as an upsert. - redact_
uri_ credentials - Strip credentials from a connection string so it can be used as a lineage dataset URI without leaking secrets. Handles two shapes, best-effort:
- register_
build_ info - Register the
faucet_build_info{version}gauge (set to 1) under the currently-installedmetricsrecorder. Safe to call from any code path that wants to ensure the gauge is set;install_observabilityinvokes this automatically. Gauges are naturally idempotent under themetricsmodel — repeat calls just re-set the same value. - run_
stream - Run a streaming pipeline, writing each
StreamPageto the sink as it arrives and persisting bookmarks per page. - shutdown_
otel Non- otel - No-op
shutdown_otelwhen theotelfeature is disabled, so CLI call sites compile in every build. - sql_
type_ to_ json_ schema - Map a SQL catalog type name (as reported by
information_schema.columnsor an equivalent) to a JSON-Schema type fragment matching the shapeinfer_schemaproduces. - to_
json_ schema - Render the contract as a standalone JSON Schema (draft 2020-12) document.
- to_
openlineage_ facet - Render the contract as an OpenLineage
SchemaDatasetFacet— the same facet shapefaucet-lineageattaches to dataset events, so downstream OpenLineage consumers can ingest the contract as a schema promise. - unwrap_
envelope - Parse a DLQ envelope produced by
build_envelopeback into its original payload plus metadata. - unwrap_
state - Unwrap a stored state value into
(bookmark, seq). - update_
bookmark_ lag - Update the bookmark-lag gauges if the bookmark is a parseable RFC3339
timestamp. Returns
trueif the gauges were updated,falseotherwise. - validate_
batch_ size - Validate a
batch_sizevalue against the global constraints. - warn_
mismatch - Log a one-shot warning when the explicit codec disagrees with the
filename’s detected codec. Deduplicates per
(path, declared)pair across the whole process so a million-object scan does not flood logs. - wrap_
state - Wrap a bookmark + sequence into the exactly-once state value.
Type Aliases§
- RowOutcome
- Per-row outcome from
Sink::write_batch_partial. - Shared
Auth Provider - A shared
AuthProviderhandle. Cloning it shares the one live provider (and its single token cache) across connectors.
Attribute Macros§
Derive Macros§
- Json
Schema - Derive macro for
JsonSchematrait.