Skip to main content

Model Historical Runs object schema

The model historical runs object allows you to query information about a model's run history.

The Example query illustrates a few fields you can query with the modelHistoricalRuns object. Refer to Fields to view the entire schema, which provides all possible fields you can query.

Arguments

When querying for modelHistoricalRuns, you can use the following arguments:

FieldTypeRequired?Description
identifierStringNoThe model identifier
lastRunCountIntNoNumber of last run results where this model was built to return (max of 20)
uniqueIdStringNoThe unique ID of this model
withCatalogBooleanNoIf true, return only runs that have catalog information for this model

Example query

You can use the environmentId and the model's uniqueId to return the model and its execution time for the last 20 times it was run, regardless of which job ran it.

query {
environment(id: 834) {
applied {
modelHistoricalRuns(
uniqueId: "model.marketing.customers" # Use this format for unique ID: RESOURCE_TYPE.PACKAGE_NAME.RESOURCE_NAME
lastRunCount: 20
) {
runId # Get historical results for a particular model
runGeneratedAt
executionTime # View build time across runs
status
tests {
name
status
executeCompletedAt
} # View test results across runs
}
}
}
}

Fields

When querying for modelHistoricalRuns, you can use the following fields:

Fetching data...

0