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.
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
| Command | What it does |
|---|---|
run | Run a source and write its records, or run a job manifest |
validate | Check sources, jobs, a serve.yaml or a console.yaml without running them |
plan | Print a job's execution plan (no secrets needed) |
duckdb | Validate, plan and run DuckDBJob manifests, and manage their batches |
spark | Validate, plan, lock and run SparkJob manifests |
state | Create, upgrade and check the state tables in a database |
connectors | Show installed connectors; list, search and install connectors from the hub |
serve | Serve jobs over HTTP as a REST API |
worker | Run the jobs serve queued |
queue | Purge and migrate the run queue of serve |
systemd install | Install systemd units for serve, worker and a daily purge |
console | A web console over many clients' job state (it changes no batch) |
mcp | Run the StreamWright MCP server for AI assistants |
Most commands also take the shared logging options.
Exit status of run and the job commands:
| Status | Meaning |
|---|---|
0 | Success |
1 | Invalid job, or the run failed |
2 | Usage or input error: invalid source, inputs, stream names or options, or a missing or disallowed connector (nothing was fetched) |
75 | Busy: another run holds a lease this run needs (lock policy fail or wait); run it again later |
130 | Interrupted |
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.
| Option | What it does | Default |
|---|---|---|
SOURCE | A source folder (source.yaml plus streams/), a source file, or a job manifest | |
--job JOB, -j | A job manifest, as an option instead of SOURCE | |
--config FILE | A client's settings: config values and the streams (or exports) to run | |
--set NAME=VALUE | One spec.config value (repeatable; lists as a,b,c); overrides --config. For an input bound to a fan-out item it picks items | |
--secrets FILE | Values for spec.secrets; overrides STREAMWRIGHT_SECRET_<NAME> variables | |
--state FILE | State 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-migrations | Create or upgrade the tables of runtime.state's database before the run | |
--allow-lookup-exec | Let spec.lookups run commands and Python functions (lookups and transforms) | |
--log-dir DIR, --log-max-size, --log-retention | Keep 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 NAME | Run 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 TARGET | Where records go: singer, jsonl:DIR, csv:DIR, tsv:DIR, parquet:DIR, duckdb:PATH[:SCHEMA], ducklake:CATALOG[:SCHEMA]. See Outputs. | singer |
--file-name TEMPLATE | File 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 NAME | Allow 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).
| Option | What it does | Default |
|---|---|---|
PATH ... | Files or folders to check, recursively; a source folder is checked as one source | $STREAMWRIGHT_CONFIGS |
--strict | Exit with status 1 on warnings too | |
--format text|json|github | Output format; github prints GitHub Actions annotations | text |
--export-schema DIR | Write the JSON Schemas of sources and stream files (for editors and CI), then exit | |
--kind source | The kind to assume for files that do not declare kind | |
--allow-connector NAME | Sources: 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).
| Option | What it does | Default |
|---|---|---|
JOB | The job manifest: a YAML file, or its folder (job.yaml) | |
--job JOB, -j | The 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
| Option | What it does | Default |
|---|---|---|
--job JOB, -j | The job manifest, as an option instead of JOB | |
--config FILE · --set NAME=VALUE | spec.config values (--set is repeatable and overrides --config) | |
--overlay FILE | A YAML overlay merged onto the job (repeatable, in order; null deletes a key, a list replaces the job's) | |
--allow-connector NAME | Use only this connector (repeatable) | Any installed connector |
--secrets FILE | run: spec.secrets values (or STREAMWRIGHT_SECRET_<NAME> variables) | |
--input FILE | validate, run: rows for a job with spec.input, as a JSON array or NDJSON (- reads stdin); see Input payloads | |
--dry-run | run: 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 FILE | run: 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 | |
--strict | Treat warnings as errors | |
--graph | validate: 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.
| Option | What it does | Default |
|---|---|---|
--job-key KEY | A 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|block | What the run first does with a failed batch: give it up, resume it, or stop | abandon |
--max-job-attempts N | With retry: how many times a failed batch may start, the first run included | 3 |
--state-lock-policy fail|wait|prune | When a lock token is held: stop, wait, or run only the free items | fail |
--state-lock-timeout DURATION | With wait: how long to wait (30, 30s, 5m) | The manifest's runtime.state.lock.timeout |
--apply-state-migrations | Create or upgrade the state tables before the run; without it a pending migration fails the run | Off |
--fan-out-concurrency N | fan_out: how many items (accounts) of the outermost level run at once | The manifest's fan_out.each.concurrency |
--fan-out-on-failure continue|stop | fan_out: after an item fails, go on with the others or start no new item | continue |
--allow-lookup-exec | Let 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.
| Option | What it does | Default |
|---|---|---|
--once | One batch: unfinished batches resume, then one new batch runs | Yes |
--drain | Batches until a poll finds no message | |
--available-now | Batches until the messages there at the start are processed | |
--follow | Keep polling until interrupted, pausing --interval when a poll finds nothing | |
--interval DURATION | With --follow: the pause after an empty poll (30s, 5m, 1h) | 10s |
--max-messages N | The most messages one batch takes (the consume step's max_messages wins); 0 only resumes unfinished batches and relays the outbox | 500 |
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.
| Action | What it does |
|---|---|
list | The 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_ID | One 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_ID | A failed batch resumes, from the status it failed in, at the job's next run |
abandon JOB_ID | Give 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] KEY | Let 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 NAME | The 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 |
runs | The 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 |
migrations | List every migration, applied or pending |
migrate [--dry-run] | Apply the pending migrations (safe to repeat); --dry-run prints the SQL |
check | Exit 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 |
| Option | What it does | Default |
|---|---|---|
--url URL | The 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 SCHEMA | The tables' schema, overriding the URL's ?schema= (MySQL uses the URL's database; SQLite has no schema) | streamwright |
--job NAME | retry, abandon, resend, skip, show, ack, unack: the job, when two jobs share a job id | |
--note TEXT | ack: 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.
| Option | What it does | Default |
|---|---|---|
list, ls, -ls, --list | List the catalog and what is installed | |
find WORDS, search, -f, -s, --find, --search | Search the catalog by keyword | |
install KEY ..., i, -i, --install | Install connectors with one pip install; an unknown key installs nothing | |
--yes | install: skip the prompt for connectors that are not official | Prompt |
--hub-url URL | The 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).
| Option | What it does | Default |
|---|---|---|
SERVE_YAML | The service (a kind: serve file): its jobs, callers and limits | |
| Logging options | See 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.
| Option | What it does | Default |
|---|---|---|
SERVE_YAML | The service whose queued runs to run | |
--processes N | How many runs at once, each in its own process | 1 |
--log-dir DIR, --log-max-size, --log-retention | Each 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 option | What it does | Default |
|---|---|---|
purge | Delete ended runs older than --older-than; queued and running runs are kept | |
--older-than AGE | purge: days (30) or a duration (30d, 12h) | 30 days |
migrate | Create or upgrade the queue's tables (safe to repeat) | |
--dry-run | purge: 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.
| Option | What it does | Default |
|---|---|---|
--unit-dir DIR | Where systemd reads the units | /etc/systemd/system |
--config-dir DIR | The folder of serve.yaml and the environment files | /etc/streamwright |
--force | Replace units that exist and differ | |
--dry-run | Print the units; write nothing |
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.
| Option | What it does | Default |
|---|---|---|
--transport | stdio (no network), sse or streamable-http | stdio |
--allow-http | Required for the network transports; callers send the token in STREAMWRIGHT_MCP_TOKEN | |
--host HOST · --port PORT | Network transports: interface and port | 127.0.0.1 · 8000 |
--root DIR | A 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.
| Option | What it does | Default |
|---|---|---|
--log-level LEVEL | The level of StreamWright's loggers (DEBUG to CRITICAL) | INFO |
--log NAME=LEVEL | The level of any logger by name (repeatable; root is the root logger) | |
--log-format text|json | Plain lines, or one JSON object per line | text |
--log-config FILE | Your own Python logging configuration (dictConfig, YAML or JSON) | |
--log-max-chars N | Cut longer messages (0: never) | 20000 |
To log API calls:
- HTTP connectors:
--log streamwright.network=INFOlogs one line per call;DEBUGadds headers and bodies. Otherwisestreamwright.networkstays atWARNING. - SDK connectors: use the SDK's logger, such as
--log google.ads.googleads.client=DEBUG.sw connectorslists each connector's loggers.
To log SQL:
--log streamwright.sql=INFOlogs 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.DEBUGadds the complete SQL: templates rendered and parameter values written in, so you can copy a statement and run it.- Otherwise
streamwright.sqlstays atWARNING, even with--log-level DEBUG. - The state store's statements (leases, batches, outbox rows) log on
streamwright.sql.state. Add--log streamwright.sql.state=WARNINGto hide them and keep only your job's SQL. - Because parameter values are row data (payloads, identifiers),
streamwright servenever 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 aSETof a key, token, secret or password) logs only its head, such asCREATE TEMPORARY SECRET streamwright_pg, never its text. In other statements, credentials inname=valuepairs 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.
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.
| Option | What it does | Default |
|---|---|---|
--log-dir DIR | Write each run's log under DIR | $STREAMWRIGHT_LOG_DIR, else none |
--log-max-size SIZE | The 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 dropped | 100MB |
--log-retention AGE | When 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-formatstderr uses, and becomes.log.gzwhen 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 IDshows it. - Set
STREAMWRIGHT_LOG_DIRonce 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 withruntime.stateshow 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 }}"