Skip to main content

run_flight

Preview
This feature is in preview and is subject to change.

Trigger an on-demand execution of a Flight. Returns a Run record immediately; the run is asynchronous and starts in PENDING or RUNNING. Use list_flight_runs to poll for completion and get_flight_run_logs to read the output.

The SQL equivalent is MD_RUN_FLIGHT.

Description

run_flight locks the new run to the Flight's current version. Subsequent updates to the Flight do not affect this run; only the next run picks up the updated source.

Pass config to override stored config values for a single run. You can override only keys the Flight already defines; the override applies to that run alone and leaves the stored config and version untouched.

Input parameters

ParameterTypeRequiredDescription
idstring (UUID)YesThe Flight UUID.
configobjectNoPer-run config overrides as a JSON object of string key-value pairs. Only keys already defined on the Flight can be set.

Output schema

{
"success": boolean,
"run": {
"run_id": string,
"flight_id": string,
"flight_name": string,
"flight_version": number,
"config": object, // effective config for this run, including per-run overrides
"run_number": number,
"is_scheduled": boolean, // false for on-demand
"status": string, // PENDING | RUNNING
"created_at": string,
"started_at": null, // timing fields are still null when run_flight returns
"ended_at": null,
"scheduled_at": string,
"cancelled_at": null,
"exit_code": null
},
"error": string
}

Example usage

{ "id": "80000000-0000-0000-0000-000000000001" }

With a per-run config override:

{ "id": "80000000-0000-0000-0000-000000000001", "config": { "REGION": "eu-central-1" } }