Connectors / Files & object stores
Azure Blob Storage
sinkAzure Blob Storage / ADLS Gen2 sink — JSONL files
Install
cargo install faucet-cli --features sink-azure-blob faucet init --sink azure-blob
# Cargo.toml — use it as a library cargo add faucet-sink-azure-blob
Starter config
sink:
type: azure-blob
config:
container: "" # REQUIRED — Blob container / ADLS Gen2 filesystem name.
# account: "" # Storage-account name.
# auth: { type: account_key } # one of: account_key, sas_token, connection_string, managed_identity, service_principal, default
# --- Alternative variants — replace the block above with one of these ---
# type: sas_token
# config:
# sas_token: "" # REQUIRED
#
# type: connection_string
# config:
# connection_string: "" # REQUIRED
#
# type: managed_identity
# config:
# client_id: ""
#
# type: service_principal
# config:
# client_id: "" # REQUIRED
# client_secret: "" # REQUIRED
# tenant_id: "" # REQUIRED
# authority_host: ""
#
# type: default
# endpoint: "" # Custom blob endpoint (e.g.
# allow_http: false # Permit plaintext HTTP (required for a local Azurite emulator).
# use_emulator: false # Target the Azurite storage emulator with its well-known `devstoreaccount1` credentials.
# timeout_secs: 0 # Seconds one request (including reading its body) may take.
# connect_timeout_secs: 10 # Seconds to wait for a connection to the storage endpoint.
# max_retries: 10 # Retries of a failed request, including resuming an interrupted body read.
# retry_timeout_secs: 600 # Seconds after a request first went out during which it may still be retried or its body resumed.
# prefix: "" # Object-name prefix for written objects.
# path: "" # Object key template inside the container, after `prefix` — the file sink's `path` (#777).
# if_exists: null # What happens when a file this run writes already exists (`if_exists`).
# write_mode: null # Pipeline-level write mode (`write_mode`).
# format: null # On-the-wire format of objects written by the Azure Blob sink (#604).
# file_extension: ".jsonl" # File extension for written objects (default `.jsonl`).
# max_records_per_file: 0 # Hard cap on records per uploaded object.
# max_bytes_per_file: 0 # Maximum **bytes** per object before rolling to a new one (#618).
# concurrency: 10 # Maximum number of uploads in flight (default 10): a page that rolls into several objects uploads them concurrently while the next object is encoded, and a large blob's blocks go up this many at a time.
# batch_size: 1000 # Records per object when `max_records_per_file` is not set (without `path`).
# compression: null # User-facing compression config.
# csv: { ... } # CSV dialect.
# excel: { ... } # Excel worksheet selection.
# xml: { ... } # XML record framing.
# avro: { ... } # Avro read/write options.
# parquet: { ... } # Parquet write options.
# json_lines: { ... } # JSON Lines write options.
# encryption: null # Encrypt blobs at rest (#777; the `encryption` feature).
# scratch_dir: "" # Directory the sink builds each blob in before uploading it (default: the system temporary directory).
Capabilities
| Delivery | At-least-once |
|---|---|
| Write modes | append, overwrite |
| Exactly-once writes | No |
| Schema evolution | No |
| Scoped cleanup | No |
| Staged bulk load | No |
| Run rollback | No |
| Compression | Yes |
Config fields
| Field | Type | Default | Description |
|---|---|---|---|
containerrequired | string | — | Blob container / ADLS Gen2 filesystem name. Required. |
account | string | — | Storage-account name. Optional when a connection string or the emulator supplies it, otherwise required. |
auth | object | type: default | Credential source. Defaults to the environment / managed-identity credential chain. |
endpoint | string | — | Custom blob endpoint (e.g. an Azurite emulator or a sovereign cloud). |
allow_http | boolean | false | Permit plaintext HTTP (required for a local Azurite emulator). |
use_emulator | boolean | false | Target the Azurite storage emulator with its well-known devstoreaccount1 credentials. |
timeout_secs | integer | — | Seconds one request (including reading its body) may take. Unset (the default) means no limit, since a blob body is read at the pace of the sink and a total deadline would cut long reads off mid-body. |
connect_timeout_secs | integer | 10 | Seconds to wait for a connection to the storage endpoint. Defaults to 10. |
max_retries | integer | 10 | Retries of a failed request, including resuming an interrupted body read. Defaults to 10. |
retry_timeout_secs | integer | 600 | Seconds after a request first went out during which it may still be retried or its body resumed. Defaults to 600. Keep it within the lifetime of the credential (a SAS token or bearer token), since a retry reuses the original request's credentials. |
prefix | string | "" | Object-name prefix for written objects. |
path | string | — | Object key template inside the container, after prefix — the file sink's path (#777). May contain {part} (numbered objects) and ${now.*} tokens; a trailing / is a directory of part-{part}<extension> objects. When set, file_extension is not used. Unset: every run writes new objects named <prefix><run id>-<part><file_extension> (<run id> is a fresh time-ordered UUID, <part> is 00001, 00002, …). |
if_exists | object | replace | What to do when a blob of the same name already exists (if_exists): replace it (default), append to it (JSON Lines, CSV, raw text) or fail with error (#777). Needs path. mode is accepted as another name for this key, and overwrite / error_if_exists for its values. |
write_mode | object | append | append (default) or overwrite: write the run's blobs into a hidden swap area and move them into place only after a successful run, then remove blobs of an earlier run that match path and were not rewritten (#777). The move is one blob at a time, so a reader listing the destination while it runs can see new blobs beside old ones; a move that was interrupted is finished by the next run. Needs path. |
format | object | json_lines | Object format (default json_lines) (#604). |
file_extension | string | .jsonl | File extension for written objects (default .jsonl). |
max_records_per_file | integer | — | Hard cap on records per uploaded object. None means a single object per write_batch call (still subject to batch_size). |
max_bytes_per_file | integer | — | Maximum **bytes** per object before rolling to a new one (#618). |
concurrency | integer | 10 | Maximum number of uploads in flight (default 10): a page that rolls into several objects uploads them concurrently while the next object is encoded, and a large blob's blocks go up this many at a time. flush returns only after every upload has landed. |
batch_size | integer | 1000 | Records per object when max_records_per_file is not set (without path). Records accumulate across write_batch calls and an object closes once it holds this many records, or at flush. batch_size = 0 is the "no re-chunking" sentinel: no record cap, so JSON Lines and the whole-object formats write one object per flush, and Parquet one object per write_batch call. Ignored when path is set. |
compression | string | object | auto | Compression codec applied to each uploaded object body. Defaults to CompressionConfig::Auto — resolves against the object name (path's, else file_extension, so .jsonl.gz triggers gzip). Requires the crate-local compression feature. Note: this sink does **not** set any Content-Encoding metadata, so consumers must decompress explicitly. |
csv | object | delimiter: ","has_headers: truequote: "on_unknown_field: widen | CSV dialect, used when format: csv (#604). |
excel | object | header_row: 0 | Worksheet name, used when format: xlsx (#604). |
xml | object | record_element: recordroot_element: records | Record framing, used when format: xml (#604). |
avro | object | codec: null | Writer schema and block codec, used when format: avro (#719). |
parquet | object | row_group_size: 1048576 | Parquet writer options, used when format: parquet (#777): compression (default zstd), row_group_size, explicit schema. |
json_lines | object | pretty: false | JSON Lines writer options (pretty), used when format: json_lines. |
encryption | object | — | Encrypt blobs at rest (#777; the encryption feature). Scratch files are not encrypted while the run is in progress; those holding plaintext are kept in a private directory. |
scratch_dir | string | — | Directory the sink builds each blob in before uploading it (default: the system temporary directory). JSON Lines and raw text go up in parts as they are written and need no scratch space; every other format needs room for each blob being built (up to concurrency of them while uploads are in flight). A private subdirectory is created in it for each sink. |
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