Skip to main content

MD_LIST_FLIGHT_VERSIONS

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

Returns every FlightVersion for a single Flight, newest first. Use this to browse the history of source, requirements, config, token, and secrets changes.

Syntax

SELECT * FROM MD_LIST_FLIGHT_VERSIONS(
flight_id := '<flight_id>',
"LIMIT" := <n>,
"OFFSET" := <n>
);

Parameters

ParameterTypeRequiredDescription
flight_idUUIDYesIdentifier of the Flight.
LIMITBIGINTNoMaximum number of versions to return.
OFFSETBIGINTNoSkip this many versions before returning.

LIMIT and OFFSET are SQL keywords and must be quoted when used as named arguments.

Return columns

ColumnTypeDescription
flight_versionINTEGERVersion number, newest first.
source_codeVARCHARPython source for this version.
requirements_txtVARCHARrequirements.txt contents for this version.
access_token_nameVARCHARAccess token label for this version.
flight_secret_namesLIST(VARCHAR)Secret names list for this version.
configMAP(VARCHAR, VARCHAR)Config map for this version.
created_atTIMESTAMP WITH TIME ZONEWhen this version was created.

Examples

Get the full version history:

SELECT flight_version, source_code, requirements_txt
FROM MD_LIST_FLIGHT_VERSIONS(flight_id := '<flight_id>');

Just the latest version:

SELECT flight_version, source_code
FROM MD_LIST_FLIGHT_VERSIONS(flight_id := '<flight_id>', "LIMIT" := 1);

Skip the latest, get the rest:

SELECT flight_version, source_code
FROM MD_LIST_FLIGHT_VERSIONS(flight_id := '<flight_id>', "OFFSET" := 1);