MD_LIST_FLIGHTS
Preview
This feature is in preview and is subject to change.
Returns the summary metadata for every Flight owned by the caller. Use the optional LIMIT and OFFSET parameters to page through large result sets.
Syntax
SELECT * FROM MD_LIST_FLIGHTS(
"LIMIT" := <n>,
"OFFSET" := <n>
);
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
LIMIT | BIGINT | No | Maximum number of Flights to return. |
OFFSET | BIGINT | No | Skip this many Flights before returning. |
LIMIT and OFFSET collide with SQL keywords and must be quoted with double quotes when passed as named arguments.
Return columns
| Column | Type | Description |
|---|---|---|
flight_id | UUID | Flight identifier. |
flight_name | VARCHAR | The Flight name. |
schedule_cron | VARCHAR | Cron expression, or NULL for on-demand. |
status | VARCHAR | Schedule status (for example, JOB_STATUS_ACTIVE). |
current_version | INTEGER | Latest version number. |
created_at | TIMESTAMP WITH TIME ZONE | Creation timestamp. |
updated_at | TIMESTAMP WITH TIME ZONE | Last update timestamp. |
Version-specific content (source_code, requirements_txt, config) is not on this row; query MD_GET_FLIGHT_VERSION when you need it.
note
The name column is flight_name, not name. Filter and project with flight_name (for example, WHERE flight_name = 'hourly_metrics').
Examples
List all Flights:
SELECT flight_id, flight_name, schedule_cron, current_version
FROM MD_LIST_FLIGHTS();
Page through results:
SELECT flight_name
FROM MD_LIST_FLIGHTS("LIMIT" := 50, "OFFSET" := 100);
Find Flights with active schedules:
SELECT flight_name, schedule_cron
FROM MD_LIST_FLIGHTS()
WHERE schedule_cron IS NOT NULL;
Related
MD_GET_FLIGHT— Fetch a single Flight's summary.MD_LIST_FLIGHT_RUNS— List a Flight's runs.list_flightsMCP tool — AI-agent equivalent (supports akeywordsfilter).