Skip to main content
How-to guideApplies to: Unified engine deployments
Wait for an external condition before starting dependent work. A sensor saves its deadline, check history summary, next check time, and last observation. It does not hold a SQL compute worker between checks.

Choose a condition

A sensor is an ordering step. It does not load an object’s data or pass the HTTP response as rows. Give dependent tasks their own SQL and storage access. In the task editor, choose Wait to configure a sensor. Select its condition under External wait, set its timeout and check interval, then connect dependent tasks with ordering-only dependencies.

1. Wait for a known run

First create and run Your first workload. Record that workload’s ID and its successful run ID. Open this example and replace both placeholder IDs in wait_for_orders before saving. They refer to the earlier workload, not the new workload being created.
Validate, save as Manual, and start the new workload. The sensor should observe the earlier run’s success, then allow summarize to execute. Expect six orders and sales of 140. Repeat using an active upstream run to observe waiting. The sensor checks that exact run, not whichever run becomes latest later. A failed, skipped, or cancelled upstream run fails the condition. A sensor cannot wait for its own run.

2. Wait for an object

Choose Object exists and provide a configured storage URL. A task’s control can contain:
Replace the URL with a location your instance is configured to read. The sensor checks the named object. It does not prove that every file in the directory is complete. Use a producer’s completion marker when that is the contract. A missing object is pending. An unconfigured storage location or unresolved access fails the check. Creating a credential alone does not authorize an arbitrary storage root.

3. Wait for an HTTP job state

Choose HTTP job status. Check status 200 and the /status field in a JSON response:
Use a real endpoint and a saved bearer-token secret. With only an expected status, a matching status is enough. With a JSON pointer, the selected value must also match. JSON state responses are bounded to 64 KiB. The native host must permit external HTTP. It uses bounded HTTP checks and does not follow redirects. Authentication rejection fails the check. A nonmatching status or unfinished state remains pending until the deadline.

Understand time and failure

Timeout is 1 second to 31 days. Poll interval must be positive and no greater than timeout; its omitted API default is 30 seconds. The timeout starts when the sensor begins waiting after its predecessors succeed. A restart does not reset the deadline. A pending observation schedules another check. An invalid configuration or failed condition can end the sensor early. Expiry fails the task and prevents dependent tasks from proceeding normally. Inspect deadline, next check, number of checks, and last observation in task workflow details. Use Notifications for sensor_timeout events.
Last modified on November 4, 2026