Worker invariants
Design every worker around the following rules:- Treat the trigger and committed table data as the complete input to a run.
- Keep no durable process state between runs.
- Use the cron event’s half-open interval
[intervalStart, intervalEnd)for incremental pulls. - Read output table names from deployment configuration instead of hard-coding them.
- Make every commit idempotent so a replay does not duplicate data.
- Read secrets from the runtime environment and never write them to logs.
Worker lifecycle
Current trigger surfaces
The SDK contract defines the following trigger events:
The portable CLI manifest currently registers
cron and manual cloud workers. It also registers local-only follow workers. The SDK types the broader trigger contract used by the platform runtime.
Create a portable worker
The current manifest supports JSON and TOML. This filled TOML example packages a Python entrypoint and a referenced secret:metrics-worker.toml
Inspect and operate workers
--json before workers when a script needs a stable machine-readable response.
Backfill with logical time
The TypeScript worker contract supportsstartDate and catchup on cron trigger definitions:
Use idempotency keys
Use a stable input identifier as the commit idempotency key. Adata_change worker can use the input snapshot ID: