Run and Wait
run_and_waitStart a Coalesce refresh run and poll until completion or timeout. Returns status and results, including any errors or timeout information.
Instructions
Start a Coalesce refresh run and poll until completion or timeout. Returns a task that can be polled for status.
Requires Snowflake auth via environment variables (Key Pair or PAT). Provide exactly one of runDetails.environmentID or runDetails.workspaceID. If the user provides a job name instead of an ID, look it up with find_jobs_by_name (or list_environment_jobs) first.
Args:
runDetails.environmentID (string, optional): Target deployed environment (numeric ID as string)
runDetails.workspaceID (string, optional): Target workspace for a development run (numeric ID as string)
runDetails.jobID (string, optional): Specific job to run
runDetails.includeNodesSelector (string, optional): Node filter
runDetails.excludeNodesSelector (string, optional): Node exclusion
runDetails.parallelism (number, optional): Max parallel nodes
runDetails.forceIgnoreWorkspaceStatus (boolean, optional): Force run
confirmRunAllNodes (boolean): Required when no job/node scope
parameters (object, optional): Runtime parameters
pollInterval (number, optional): Seconds between checks (default: 10, range: 5–300)
timeout (number, optional): Max wait seconds (default: 1800, range: 30–3600)
Returns: { status, results, resultsError?, incomplete?, timedOut? }
Inspect timedOut, incomplete, and resultsError fields before continuing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| timeout | No | Max seconds to wait (default: 1800, min: 30, max: 3600) | |
| parameters | No | Arbitrary key-value parameters to pass to the run | |
| runDetails | Yes | ||
| pollInterval | No | Seconds between status checks (default: 10, min: 5, max: 300) | |
| confirmRunAllNodes | No | Must be set to true when no jobID, includeNodesSelector, or excludeNodesSelector is provided. This confirms you intend to run ALL nodes in the target. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | No | ||
| results | No | ||
| timedOut | No | ||
| incomplete | No | ||
| resultsError | No |