Skip to main content

Metric object schema

The metric object allows you to query information about metrics.

Arguments

When querying for a metric, the following arguments are available.

Fetching data...

Below we show some illustrative example queries and outline the schema (all possible fields you can query) of the metric object.

Example query

The example query below outputs information about a metric. You can also add any field from the model endpoint (the example simply selects name). This includes schema, database, uniqueId, columns, and more. For details, refer to Model object schema.

{
job(id: 123) {
metric(uniqueId: "metric.jaffle_shop.new_customers") {
uniqueId
name
packageName
tags
label
runId
description
type
sql
timestamp
timeGrains
dimensions
meta
resourceType
filters {
field
operator
value
}
model {
name
}
}
}
}

Fields

When querying for a metric, the following fields are available:

Fetching data...

0