Apply and run a pipeline
Apply a validated workspace and control the tapstate preview pipeline lifecycle
Apply turns local drafts into server-held resources. Lifecycle commands then write the desired state that the runtime converges toward.
Before you begin
- Validate the workspace locally.
- Register the required connector JARs.
- Apply and test source and target connections from the server environment.
- Use a non-production data set for the preview.
See Register and test connectors for the preceding sequence.
Apply the workspace
Start an authenticated session in the workspace:
tapstate -w workconnect http://127.0.0.1:8080
login admin
applyWith no operand, apply sends the workspace as one batch. To apply one file or directory:
apply source/orders_source.tap.ymlThe server reparses and validates each draft. The result reports:
CREATEDfor a new artifact;UPDATEDwhen canonical content changed;UNCHANGEDwhen the stored content hash already matches.
Some checks require the source's discovered schema and therefore run only on
the server. If apply returns dsl.upsert-needs-key, every selected source table
written with the default upsert mode needs a discovered primary key. Discover
the source again and select keyed tables, or use append only when the delivery
is insert-only. A unique index or tables[].pk does not satisfy this runtime
check.
Confirm the server-held resources:
ls
get orders_source
get orders_to_operational_stateLocal files remain authoring input; connected get and ls show the server's current truth.
Start the pipeline
start orders_to_operational_state
status orders_to_operational_state --watchstart writes a RUNNING intent at the latest applied pipeline revision. status --watch reports observed runtime state, which can lag the command briefly.
Verify data at the destination. A lifecycle command succeeding proves that the intent was accepted, not that rows arrived.
Lifecycle transitions
| Command | Legal starting state | Target state | Progress behavior |
|---|---|---|---|
start | NEW, STOPPED, COMPLETED | RUNNING | Starts at the latest applied revision. |
pause | RUNNING | PAUSED | Retains the current revision and in-run progress. |
resume | PAUSED | RUNNING | Requires the paused revision to remain current. |
stop | RUNNING, PAUSED, FAILED | STOPPED | Clears the run so the next start begins a fresh run. |
An illegal transition returns lifecycle.illegal-transition. If a paused pipeline was reapplied, resume can return lifecycle.incompatible-revision; stop it, review the change, then start a fresh run.
Recover a failed pipeline deliberately:
logs orders_to_operational_state
stop orders_to_operational_state
start orders_to_operational_stateDo not start directly from FAILED.
Verify the outcome
Use all three evidence types:
statusreaches the expected state;metricsandlogsshow active work without unresolved errors;- source and destination queries show the expected snapshot and later insert, update, and delete behavior.
The preview is single-node and does not persist a resumable runtime offset across a server restart. A process restart can replay from the source even when pause/resume worked within the running deployment.