Skip to main content

CLI

The streamwright command runs sources and jobs, checks them, installs connectors and serves jobs over HTTP. The short alias sw works everywhere (sw run, sw validate). Run sw <command> --help for the full help of any command.

In short

sw validate checks, sw plan shows the order, sw run runs. The manifest's kind picks the engine, so the same three commands work for sources and jobs.

Commands at a glance​

CommandWhat it does
runRun a source and write its records, or run a job manifest
validateCheck sources, jobs, a serve.yaml or a console.yaml without running them
planPrint a job's execution plan (no secrets needed)
duckdbValidate, plan and run DuckDBJob manifests, and manage their batches
sparkValidate, plan, lock and run SparkJob manifests
stateCreate, upgrade and check the state tables in a database
connectorsShow installed connectors; list, search and install connectors from the hub
serveServe jobs over HTTP as a REST API
workerRun the jobs serve queued
queuePurge and migrate the run queue of serve
systemd installInstall systemd units for serve, worker and a daily purge
consoleA web console over many clients' job state (it changes no batch)
mcpRun the StreamWright MCP server for AI assistants

Most commands also take the shared logging options.

Exit status of run and the job commands:

StatusMeaning
0Success
1Invalid job, or the run failed
2Usage or input error: invalid source, inputs, stream names or options, or a missing or disallowed connector (nothing was fetched)
75Busy: another run holds a lease this run needs (lock policy fail or wait); run it again later
130Interrupted

Run and check​

streamwright run​

streamwright run SOURCE [options]
streamwright run JOB.yaml [job options] # or: streamwright run --job JOB.yaml

Runs a source and writes its records: by default Singer messages on stdout, with logs on stderr. Given a job manifest, it runs the job on its engine (duckdb or spark) with that engine's options. Options for sources only (--output, --stream, --state, ...) are refused for a job.

OptionWhat it doesDefault
SOURCEA source folder (source.yaml plus streams/), a source file, or a job manifest
--job JOB, -jA job manifest, as an option instead of SOURCE
--config FILEA client's settings: config values and the streams (or exports) to run
--set NAME=VALUEOne spec.config value (repeatable; lists as a,b,c); overrides --config. For an input bound to a fan-out item it picks items
--secrets FILEValues for spec.secrets; overrides STREAMWRIGHT_SECRET_<NAME> variables
--state FILEState from a previous run (JSON, or a Singer STATE message), for incremental streams. With runtime.state, its streams' bookmarks replace the store's; the other streams keep theirs.
--apply-state-migrationsCreate or upgrade the tables of runtime.state's database before the run
--allow-lookup-execLet spec.lookups run commands and Python functions (lookups and transforms)
--log-dir DIR, --log-max-size, --log-retentionKeep the run's log in a file of its own, which starts with the command and ends with its exit code and duration$STREAMWRIGHT_LOG_DIR
--stream NAMERun only this stream, or the stream of this export (repeatable; replaces the --config file's streams). The streams its from_stream partitions come from run too.All streams
--output TARGETWhere records go: singer, jsonl:DIR, csv:DIR, tsv:DIR, parquet:DIR, duckdb:PATH[:SCHEMA], ducklake:CATALOG[:SCHEMA]. See Outputs.singer
--file-name TEMPLATEFile outputs only: each export's path inside DIR. Uses {{ export }}, {{ source }}, {{ today }}, {{ timestamp }}, {{ format }}, {{ config.NAME }}.The YAML's file_name, else <export>.<date>.<time>.<unique>.<ext>
--allow-connector NAMEAllow only this connector (repeatable)Any installed connector
--summary [FILE]Also write the run summary as JSON to FILE, whatever the outcome. Bare --summary logs it as one INFO line (event: run_summary).
sw run sources/google_ads --config clients/example.yaml --secrets secrets.yaml \
--output parquet:out --file-name "{{ config.client }}/{{ export }}_{{ today }}.{{ format }}"

streamwright validate​

streamwright validate [PATH ...] [--strict] [--format text|json|github] [--export-schema DIR]

Checks sources (schema, references, SQL) without fetching anything. It walks folders recursively. It also checks job manifests (as the path, or with --job), a serve.yaml (kind: serve) with its jobs and a console.yaml (kind: console) with its client files, without needing secrets. Each file is told by its kind; a folder's files that a serve.yaml or console.yaml includes are checked through it. A job is checked by its engine, with that engine's options (sw duckdb validate -h, sw spark validate -h).

OptionWhat it doesDefault
PATH ...Files or folders to check, recursively; a source folder is checked as one source$STREAMWRIGHT_CONFIGS
--strictExit with status 1 on warnings too
--format text|json|githubOutput format; github prints GitHub Actions annotationstext
--export-schema DIRWrite the JSON Schemas of sources and stream files (for editors and CI), then exit
--kind sourceThe kind to assume for files that do not declare kind
--allow-connector NAMESources: only allow these connectors in auth.provider (repeatable)
sw validate sources/ --strict --format github

streamwright plan​

streamwright plan JOB.yaml # or: streamwright plan --job JOB.yaml

Prints a job's steps, outputs and the order they run in. It runs nothing and needs no secrets. The manifest's kind picks the engine, and its options are that engine's (sw duckdb plan -h, sw spark plan -h).

OptionWhat it doesDefault
JOBThe job manifest: a YAML file, or its folder (job.yaml)
--job JOB, -jThe job manifest, as an option instead of JOB

Jobs and state​

streamwright duckdb​

streamwright duckdb validate JOB.yaml [--strict] [--graph] [--input FILE|-]
streamwright duckdb plan JOB.yaml
streamwright duckdb run JOB.yaml [--dry-run] [--secrets FILE] [--input FILE|-]
streamwright duckdb run JOB.yaml [--once | --drain | --available-now | --follow [--interval 10s]] [--max-messages N]

Runs kind: DuckDBJob manifests in an in-process DuckDB (see DuckDB jobs). streamwright validate | plan | run JOB send a DuckDBJob here automatically. JOB is a YAML file, or a folder that holds job.yaml.

Job options​

OptionWhat it doesDefault
--job JOB, -jThe job manifest, as an option instead of JOB
--config FILE · --set NAME=VALUEspec.config values (--set is repeatable and overrides --config)
--overlay FILEA YAML overlay merged onto the job (repeatable, in order; null deletes a key, a list replaces the job's)
--allow-connector NAMEUse only this connector (repeatable)Any installed connector
--secrets FILErun: spec.secrets values (or STREAMWRIGHT_SECRET_<NAME> variables)
--input FILEvalidate, run: rows for a job with spec.input, as a JSON array or NDJSON (- reads stdin); see Input payloads
--dry-runrun: validate, resolve the inputs and print the plan; connect to nothing, write nothing
--summary [FILE]run: also write the run's summary as JSON, whatever the outcome; bare: one INFO log line
--response FILErun: write the rows of the job's response outputs as JSON lines, {"output": NAME, "row": {...}} (-: stdout). Whether each is complete (complete, truncated, reason) is in --summary
--strictTreat warnings as errors
--graphvalidate: also print the plan of a valid job

Run overrides​

These run options override runtime keys for one run. See Runtime and state and Lookups and fan-out.

OptionWhat it doesDefault
--job-key KEYA batch with this key runs once per scope; a later run with it does nothing (needs a persistent runtime.state)The manifest's runtime.state.job_key
--failed-job-policy abandon|retry|blockWhat the run first does with a failed batch: give it up, resume it, or stopabandon
--max-job-attempts NWith retry: how many times a failed batch may start, the first run included3
--state-lock-policy fail|wait|pruneWhen a lock token is held: stop, wait, or run only the free itemsfail
--state-lock-timeout DURATIONWith wait: how long to wait (30, 30s, 5m)The manifest's runtime.state.lock.timeout
--apply-state-migrationsCreate or upgrade the state tables before the run; without it a pending migration fails the runOff
--fan-out-concurrency Nfan_out: how many items (accounts) of the outermost level run at onceThe manifest's fan_out.each.concurrency
--fan-out-on-failure continue|stopfan_out: after an item fails, go on with the others or start no new itemcontinue
--allow-lookup-execLet spec.lookups run their commands and Python functions; without it such a lookup stops the run (exit 2)Off

--log-dir, --log-max-size and --log-retention keep each run's log in a file of its own.

Broker modes​

For jobs that consume a broker. See Brokers: batch modes.

OptionWhat it doesDefault
--onceOne batch: unfinished batches resume, then one new batch runsYes
--drainBatches until a poll finds no message
--available-nowBatches until the messages there at the start are processed
--followKeep polling until interrupted, pausing --interval when a poll finds nothing
--interval DURATIONWith --follow: the pause after an empty poll (30s, 5m, 1h)10s
--max-messages NThe most messages one batch takes (the consume step's max_messages wins); 0 only resumes unfinished batches and relays the outbox500
sw duckdb run jobs/orders.yaml --secrets secrets.yaml --set client=example
sw duckdb run jobs/order_events.yaml --drain --max-messages 1000 --summary

Managing batches​

Unfinished batches resume on the next run. To look at a job's batches and fix stuck ones, use streamwright state: it reads the job's state database alone, so it needs no job manifest and no config.

streamwright spark​

streamwright spark validate JOB.yaml [--strict] [--analyze]
streamwright spark plan JOB.yaml
streamwright spark run JOB.yaml [--once | --drain | --available-now | --follow]
streamwright spark lock JOB.yaml --spark 3.5.3 # or --check

Validates, plans and runs kind: SparkJob manifests on Apache Spark (local, standalone or AWS EMR on EC2); their batches are managed with streamwright state. Requires pip install streamwright-spark. See the Spark CLI reference for every option.

streamwright state​

streamwright state list [--url URL] [--job NAME] [--scope TEXT] [--status STATUS] [--request-id ID] [--limit N] [--json]
streamwright state show [--url URL] (JOB_ID | --request-id ID) [--job NAME]
streamwright state retry|abandon [--url URL] JOB_ID [--job NAME]
streamwright state resend|skip [--url URL] JOB_ID [--job NAME] [--output NAME]
streamwright state forget-key [--url URL] --job NAME [--scope TEXT] KEY
streamwright state ack [--url URL] (JOB_ID | RUN_ID | --job NAME) [--note TEXT]
streamwright state unack [--url URL] (JOB_ID | RUN_ID | --job NAME)
streamwright state acks [--url URL] [--job NAME] [--json]
streamwright state cache list [--url URL] [--job NAME] [--json]
streamwright state cache clear [--url URL] --job NAME [--step NAME]
streamwright state leases [--url URL] --job NAME [--json]
streamwright state runs [--url URL] [--job NAME] [--status STATUS] [--since 7d] [--limit N] [--json]
streamwright state runs [--url URL] --run-id ID [--job NAME]
streamwright state purge [--url URL] --job NAME [--older-than 30d] [--scope TEXT]
streamwright state migrations|check [--url URL] [--schema SCHEMA]
streamwright state migrate [--url URL] [--schema SCHEMA] [--dry-run]

Looks after the batches of every job - DuckDB and Spark alike - and the state tables (sw_*), in the job's state database, named by URL. It needs no job manifest and no config: point --url (or $STREAMWRIGHT_STATE_URL) at the database of runtime.state. A job run fails while a migration is pending, unless it runs with --apply-state-migrations. Only migrate creates a SQLite or DuckDB file: every other action exits 2 when the file is not there.

ActionWhat it does
listThe newest batches (default 20): job, job id, status, attempts, scope, the run's request id, last update, the rows written to tables and files (WRITTEN), the outbox rows by status - apply rows and events, e.g. 2 applied, 2 failed (OUTBOX) - and the error. --job, --scope, --status, --request-id filter it (--request-id: the batches the run made or resumed); --job NAME --scope S --limit 1 is a scope's newest batch
show JOB_IDOne batch as JSON: its pinned inputs, lock tokens, metrics, output receipts and every row's status, attempts, result or error. --request-id ID: the batches that run made or resumed, as a JSON list
retry JOB_IDA failed batch resumes, from the status it failed in, at the job's next run
abandon JOB_IDGive a batch up: its scope runs new batches again; what it wrote stays
resend JOB_ID [--output NAME]Send an apply output's held rows again at the next run (check the vendor first)
skip JOB_ID [--output NAME]Mark an apply output's held rows failed (UNKNOWN_OUTCOME)
forget-key --job NAME [--scope TEXT] KEYLet a job key run again (its history stays). --scope: where the key is unique (none for a key unique in the whole job). Refused while a batch with the key is unfinished
ack (JOB_ID | RUN_ID) [--note TEXT]Acknowledge a problem: the console lists it under Acknowledged, not Needs attention, with who (the OS user and host; after sudo or su, the person who logged in too), when and the note. Nothing else changes. It holds while the problem is the same (a retry, resend or skip of the batch drops it). Refused for a batch or run that needs no one
ack --job NAME [--note TEXT]Acknowledge every item of the job the console lists now (scopes whose newest batch failed or has rejected rows, its failed run), but held rows: each needs resend or skip
unack (JOB_ID | RUN_ID | --job NAME)Undo an acknowledgement (--job: every one of the job)
acks [--job NAME]The acknowledgements, newest first: job, batch or run, the problem, scope, who, when, the note
keys --job NAME [--scope TEXT]The job's keys, newest first: key, held or done, the batch that claimed it, where it is unique, until when it is kept
leases --job NAMEThe job's leases a run holds now: owner (<run id>/<host>:<pid>:<random>), epoch, expiry. An expired row is a run that died; the next run takes it over
runsThe run history, newest first (default 20): job, run id, status (succeeded, failed, skipped, busy), start, duration, batches, fan-out passes, the failures no batch holds (UNBATCHED) and the error. --job, --status and --since filter it. --run-id ID: one run as JSON, with what failed in it (each pass or outer item, its batches and its error) and where its log file is
purge --job NAME [--older-than 30d] [--scope TEXT]Delete completed, abandoned and skipped batches older than the age (default 30 days; a scope's latest completed batch stays while it carries bookmarks), and, without --scope, the job's cached call answers expired before it, its runs that ended before it, its job keys past keep_job_keys and the lease rows of runs that died before it
cache list [--job NAME]Call steps' cached answers: job, step, key (as the cache log lines name it), fresh or expired, records, parts, size, expiry
cache clear --job NAME [--step NAME]Delete a job's (or a step's) cached answers: the next call fetches again
migrationsList every migration, applied or pending
migrate [--dry-run]Apply the pending migrations (safe to repeat); --dry-run prints the SQL
checkExit 0 when up to date, 1 when a migration is pending, 2 when the URL is missing or invalid or its SQLite or DuckDB file is not there
OptionWhat it doesDefault
--url URLThe database, such as sqlite:///state.db (relative to where you run the command), duckdb:///state.duckdb, postgresql://...?schema=NAME or mysql://...$STREAMWRIGHT_STATE_URL
--schema SCHEMAThe tables' schema, overriding the URL's ?schema= (MySQL uses the URL's database; SQLite has no schema)streamwright
--job NAMEretry, abandon, resend, skip, show, ack, unack: the job, when two jobs share a job id
--note TEXTack: why, as the console shows it (at most 500 characters)

retry, abandon, resend, skip and forget-key take the batch's lock tokens, so they fail while a run of its scope holds them. Find a run by the request id on its log lines (req=sw_...):

sw state check --url "$STREAMWRIGHT_STATE_URL" || exit 1
sw state list --url sqlite:///state.db --status failed
sw state show --url sqlite:///state.db --request-id sw_EUAhwN44TIOdBkCwdQ2MbA # a run's batches and rows
sw state retry --url sqlite:///state.db orders-00000007 && sw run orders.yaml # resume it now

Connectors​

streamwright connectors​

streamwright connectors [NAME ...] # installed connectors (or only these), like pip show
streamwright connectors ls # the hub's catalog, with install status
streamwright connectors find WORDS # search the catalog
streamwright connectors -i KEY [KEY ...] [--yes] # install from the hub

With no arguments it shows each installed connector like pip show: its package and version, the libraries and DuckDB extensions it uses, and the logger names to pass to --log.

OptionWhat it doesDefault
list, ls, -ls, --listList the catalog and what is installed
find WORDS, search, -f, -s, --find, --searchSearch the catalog by keyword
install KEY ..., i, -i, --installInstall connectors with one pip install; an unknown key installs nothing
--yesinstall: skip the prompt for connectors that are not officialPrompt
--hub-url URLThe catalog to read for list, find and install$STREAMWRIGHT_HUB_URL, else the live hub

The catalog comes from the StreamWright hub, or a cached copy when the hub cannot be reached.

Serve jobs over HTTP​

streamwright serve​

streamwright serve SERVE_YAML [logging options]

Serves the jobs in SERVE_YAML as a REST API. Each request is checked and queued; a worker runs it. Exit status 2 means serve.yaml or one of its jobs cannot be served (each problem is logged).

OptionWhat it doesDefault
SERVE_YAMLThe service (a kind: serve file): its jobs, callers and limits
Logging optionsSee Logging options
streamwright serve serve.yaml
curl -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
-d '{"set": {"client_id": "1001"}}' http://127.0.0.1:8080/v1/jobs/client_feed_upload/runs

Requires pip install "streamwright[serve]". See Serving jobs over HTTP.

streamwright worker​

streamwright worker SERVE_YAML [--processes N] [--log-dir DIR] [logging options]

Runs the runs serve queued, until stopped. SIGTERM or Ctrl-C lets runs under way finish first. See Workers.

OptionWhat it doesDefault
SERVE_YAMLThe service whose queued runs to run
--processes NHow many runs at once, each in its own process1
--log-dir DIR, --log-max-size, --log-retentionEach run's own log file$STREAMWRIGHT_LOG_DIR

streamwright queue​

streamwright queue purge SERVE_YAML [--older-than AGE] [--dry-run]
streamwright queue migrate SERVE_YAML [--dry-run]
Action or optionWhat it doesDefault
purgeDelete ended runs older than --older-than; queued and running runs are kept
--older-than AGEpurge: days (30) or a duration (30d, 12h)30 days
migrateCreate or upgrade the queue's tables (safe to repeat)
--dry-runpurge: count the runs; migrate: print the SQL. Changes nothing.

streamwright systemd install​

sudo /opt/streamwright/venv/bin/streamwright systemd install [--unit-dir DIR] [--config-dir DIR] [--force] [--dry-run]

Writes the systemd units for serve, worker and a daily queue purge. Run it as root. The environment files in --config-dir are created with mode 0600 when missing, and never replaced.

OptionWhat it doesDefault
--unit-dir DIRWhere systemd reads the units/etc/systemd/system
--config-dir DIRThe folder of serve.yaml and the environment files/etc/streamwright
--forceReplace units that exist and differ
--dry-runPrint the units; write nothing

See Deploying with systemd.

The console​

streamwright console​

A web console over many clients' job state, from pip install streamwright-console: streamwright console CONSOLE_YAML serves it, and migrate and users look after its own database. See the console's CLI.

AI assistants​

streamwright mcp​

streamwright mcp [--root DIR ...] [--transport stdio|sse|streamable-http [--allow-http] [--host HOST] [--port PORT]]

Runs the StreamWright Model Context Protocol (MCP) server. AI coding assistants use it to discover connectors, read their contracts and validate sources and jobs.

OptionWhat it doesDefault
--transportstdio (no network), sse or streamable-httpstdio
--allow-httpRequired for the network transports; callers send the token in STREAMWRIGHT_MCP_TOKEN
--host HOST · --port PORTNetwork transports: interface and port127.0.0.1 · 8000
--root DIRA folder the tools may read manifests from (repeatable)$STREAMWRIGHT_MCP_ROOTS, else the working directory

Requires pip install streamwright-mcp. See the MCP guide.

Logging options​

run, validate, serve, worker, the duckdb commands and sw spark run take these options. Logs go to stderr; a job run can also keep its own log file.

OptionWhat it doesDefault
--log-level LEVELThe level of StreamWright's loggers (DEBUG to CRITICAL)INFO
--log NAME=LEVELThe level of any logger by name (repeatable; root is the root logger)
--log-format text|jsonPlain lines, or one JSON object per linetext
--log-config FILEYour own Python logging configuration (dictConfig, YAML or JSON)
--log-max-chars NCut longer messages (0: never)20000

To log API calls:

  • HTTP connectors: --log streamwright.network=INFO logs one line per call; DEBUG adds headers and bodies. Otherwise streamwright.network stays at WARNING.
  • SDK connectors: use the SDK's logger, such as --log google.ads.googleads.client=DEBUG. sw connectors lists each connector's loggers.

To log SQL:

  • --log streamwright.sql=INFO logs one line per SQL statement StreamWright runs, with what it does and how long it took. That covers job steps and outputs, source transforms, connectors that read through DuckDB, and the state store. DEBUG adds the complete SQL: templates rendered and parameter values written in, so you can copy a statement and run it.
  • Otherwise streamwright.sql stays at WARNING, even with --log-level DEBUG.
  • The state store's statements (leases, batches, outbox rows) log on streamwright.sql.state. Add --log streamwright.sql.state=WARNING to hide them and keep only your job's SQL.
  • Because parameter values are row data (payloads, identifiers), streamwright serve never writes them in. Its lines keep the ? placeholders and give only how many there are. Secret values are redacted from every line.
  • A statement that sets credentials (CREATE SECRET, or a SET of a key, token, secret or password) logs only its head, such as CREATE TEMPORARY SECRET streamwright_pg, never its text. In other statements, credentials in name=value pairs and URLs are masked (password=***).
  • On Spark, the time is how long Spark took to plan the query. Spark runs it later.
[...] INFO streamwright.sql [files_orders_sync step=harmonized_orders]: job: CREATE OR REPLACE TEMP TABLE harmonized_orders, 2.5 ms
[...] INFO streamwright.sql [files_orders_sync output=warehouse_fact_orders]: job: MERGE INTO analytics_warehouse.main.fact_orders, 1.1 ms
[...] INFO streamwright.sql.state [files_orders_sync]: state: UPDATE sw_jobs, 0.9 ms, 9 parameters
[...] DEBUG streamwright.sql [files_orders_sync step=high_value_orders]: job: CREATE OR REPLACE TEMP VIEW high_value_orders, 0.2 ms: CREATE OR REPLACE TEMP VIEW "high_value_orders" AS SELECT * FROM harmonized_orders WHERE amount_usd >= 50.0
[...] DEBUG streamwright.sql.state [ads_conversions output=upload]: state: UPDATE sw_events, 0.9 ms, 7 parameters: UPDATE sw_events SET status = 'in_flight', attempts = attempts + 1, updated_at = ... WHERE job_name = 'ads_conversions' AND job_id = 'ads_conversions-00000003' AND target = 'upload' AND sequence IN (0, 1, 2, 3)

In text lines, the SQL's whitespace is collapsed onto one line. JSON lines also keep the statement as it was sent, with its placeholders, in their sql field.

note

Secret values are redacted from every log line, including SDK lines and your own --log-config handlers.

Run log files​

A run (run of a source or a job, duckdb run, sw spark run, each run of worker) can also write its log to a file of its own, besides stderr, for you to read later and for the console to show.

OptionWhat it doesDefault
--log-dir DIRWrite each run's log under DIR$STREAMWRIGHT_LOG_DIR, else none
--log-max-size SIZEThe most a run's file keeps (0: no cap). Past it, its first tenth and its last lines stay, with a line saying what was dropped100MB
--log-retention AGEWhen a run starts, delete the day folders older than this (30, 30d, 12h; 0 keeps them)30d
  • The file is DIR/YYYY/MM/DD/<job>.<run_id>.<time>.log (a source's name for a source run): the day and time the run started, in UTC. It holds the run's lines as JSON lines, whatever --log-format stderr uses, and becomes .log.gz when the run ends.
  • The run's state database (runtime.state) records where it is (sw_run_logs: the host and the file's path) from the start of the run, so the log of a run that died is found too. sw state runs --run-id ID shows it.
  • Set STREAMWRIGHT_LOG_DIR once for every run on a host (a systemd unit, cron, the worker). Hosts can share one folder (NFS, EFS): names never collide.
  • A file that cannot be written never fails the run; stderr says why.
  • The file starts and ends the same way every time: when the run started (the host's time), the process id and the command (credential values masked), then the run's lines, then the exit code and how it went. The command's own lines about the run, its recap and its errors, are in the file too.
  • The console shows it on the run's page (Log tab: filter by level, search, download) once the console's store has logs.dir. Source runs with runtime.state show there too.
Starting at Tue Dec 1 21:22:46 2026
Process PID is 48213
Running command sw duckdb run orders.yaml --set client=acme
...
Exit code 0
Succeeded.
Finished at Tue Dec 1 21:24:28 2026
Execution time was 102 seconds (00:00:01:42)

Job log tags and labels​

Inside a job run, each text line is tagged with the job, its labels, the fan-out item and the step or output at work. JSON lines carry the same as keys (job, labels, item, scope, job_id, step, output, lookup), and the run's request_id.

[...] INFO streamwright.duckdb [ads_campaigns tenant=t1 region=eu account=a1 output=save]: ...

Add labels in the job manifest (at most 8; lowercase names; values use {{ config.* }} only, never secrets):

runtime:
log:
labels:
tenant: "{{ config.tenant_id }}"
region: "{{ config.region }}"