Skip to content

Reference

Transforms

Transforms that reshape query results in the browser before a panel draws them.

merge

Field Type Description
type (required) "merge"
queries transformQueries The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query.

seriesToRows

Field Type Description
type (required) "seriesToRows"
queries transformQueries The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query.

organize

Field Type Description
type (required) "organize"
exclude array of string At most 100 items.
rename object
order array of string At most 100 items.
include array of string Keep only the fields with these names; exclude then removes from them. At most 100 items.
queries transformQueries The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query.

reduce

Field Type Description
type (required) "reduce"
reducers (required) array of anyReducer At most 10 items.
mode "seriesToRows", "reduceFields"
includeTime boolean Reduce the time field too.
labelsToFields boolean Add one text field per label key: a column in seriesToRows mode, a one-row field in reduceFields mode.
fields array of fieldName Reduce only the number fields with these names; absent reduces every number field. At most 100 items.
fieldsRegex string Reduce only the number fields whose name matches this pattern, anchored unless written /re/flags.
queries transformQueries The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query.

joinByField

Field Type Description
type (required) "joinByField"
field string
mode "outer", "inner" or "outerTabular"
queries transformQueries The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query.

filterFieldsByName

Field Type Description
type (required) "filterFieldsByName"
include array of string At most 100 items.
includeRegex string
exclude array of string Drop the fields with these names, after include. At most 100 items.
excludeRegex string
variable variableName Also include the fields named by the selected values of this variable; All, or no selection, adds nothing.
queries transformQueries The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query.

calculateField

Field Type Description
type (required) "calculateField"
alias (required) string
expr string field_or_number op field_or_number, op one of + - * / % ^; put spaces around op when a field name contains spaces.
reduceRow reducer
include array of fieldName With reduceRow, reduce only the number fields with these names; names the frame lacks are skipped. At most 50 items.
unary object Apply fn to a number field; absent field means the first number field, absent fn means abs.
index object The row number from 0, or with percentile its place from 0 to 1.
cumulative object A running total or running mean of a number field; absent field means the first number field, absent fn means sum.
window object A moving mean, standard deviation or variance of a number field over size rows or a share of the rows (0.1 when neither is written); trailing windows end at the row, centered ones surround it, and windows at the edges shrink.
replace boolean Keep only the time field and the new field.
queries transformQueries The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query.

sortBy

Field Type Description
type (required) "sortBy"
field (required) string
desc boolean
then array of object Further sort keys, applied in order to rows that tie on field. At most 10 items.
queries transformQueries The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query.

limit

Field Type Description
type (required) "limit"
count (required) integer or string
queries transformQueries The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query.

convertFieldType

Field Type Description
type (required) "convertFieldType"
conversions (required) array of object At most 50 items.
queries transformQueries The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query.

formatString

Field Type Description
type (required) "formatString"
field (required) fieldName A field name or series name in the panel’s frames.
format (required) "upper", "lower", "title", "trim", "substring" or "sentence", "pascal", "camel", "snake", "kebab"
start integer Between 0 and 10000.
end integer Between 0 and 10000.
queries transformQueries The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query.

formatTime

Field Type Description
type (required) "formatTime"
field (required) fieldName A field name or series name in the panel’s frames.
format (required) string
utc boolean
queries transformQueries The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query.

renameByRegex

Field Type Description
type (required) "renameByRegex"
regex (required) string
renameTo (required) string
queries transformQueries The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query.

filterByValue

Field Type Description
type (required) "filterByValue"
keep "include", "exclude"
match "any", "all"
filters (required) array of object At most 20 items.
queries transformQueries The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query.

filterByRefId

Field Type Description
type (required) "filterByRefId"
include (required) array of queryRef At most 26 items.
queries transformQueries The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query.

extractFields

Field Type Description
type (required) "extractFields"
field (required) fieldName A field name or series name in the panel’s frames.
format "auto", "json", "kvp" or "delimiter", "regexp"
replace boolean
keepTime boolean
paths array of object At most 50 items.
delimiter string
regex string
queries transformQueries The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query.

labelsToFields

Field Type Description
type (required) "labelsToFields"
mode "columns", "rows"
include array of fieldName At most 100 items.
valueLabel string
queries transformQueries The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query.

joinByLabels

Field Type Description
type (required) "joinByLabels"
value (required) fieldName A field name or series name in the panel’s frames.
on array of fieldName At most 20 items.
queries transformQueries The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query.

partitionByValues

Field Type Description
type (required) "partitionByValues"
fields (required) array of fieldName At most 10 items.
keepFields boolean
naming "labels" or "name", "append"
queries transformQueries The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query.

prepareTimeSeries

Field Type Description
type (required) "prepareTimeSeries"
format (required) "wide", "many", "long"
queries transformQueries The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query.

timeSeriesTable

Field Type Description
type (required) "timeSeriesTable"
stats object
queries transformQueries The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query.

rowsToFields

Field Type Description
type (required) "rowsToFields"
mappings array of object At most 20 items.
queries transformQueries The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query.

configFromData

Field Type Description
type (required) "configFromData"
configQuery (required) queryRef
mappings (required) array of object At most 20 items.
applyTo match
queries transformQueries The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query.

concatenate

Field Type Description
type (required) "concatenate"
nameMode "drop", "field", "label"
nameLabel string
queries transformQueries The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query.

groupBy

Field Type Description
type (required) "groupBy"
by array of fieldName At most 20 items.
aggregate array of object At most 20 items.
queries transformQueries The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query.

groupingToMatrix

Field Type Description
type (required) "groupingToMatrix"
column fieldName A field name or series name in the panel’s frames.
row fieldName A field name or series name in the panel’s frames.
value fieldName A field name or series name in the panel’s frames.
empty "empty", "zero", "true", "false"
queries transformQueries The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query.

groupToNestedTable

Field Type Description
type (required) "groupToNestedTable"
by array of fieldName At most 20 items.
aggregate array of object At most 20 items.
hideHeaders boolean
queries transformQueries The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query.

histogram

Field Type Description
type (required) "histogram"
bucketCount integer Between 1 and 1000.
bucketSize number
bucketOffset number
combine boolean
queries transformQueries The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query.

regression

Field Type Description
type (required) "regression"
model "linear", "polynomial"
degree integer Between 1 and 5.
x fieldName A field name or series name in the panel’s frames.
y fieldName A field name or series name in the panel’s frames.
predictions integer Between 1 and 1000.
queries transformQueries The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query.

transpose

Field Type Description
type (required) "transpose"
firstName fieldName A field name or series name in the panel’s frames.
restName fieldName A field name or series name in the panel’s frames.
empty "empty", "zero", "true", "false"
queries transformQueries The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query.

heatmap

Field Type Description
type (required) "heatmap"
xBuckets heatmapBuckets
yBuckets heatmapBuckets
yScale "linear", "log", "symlog", "ordinal" Spacing of the value rows; ordinal gives each distinct value its own row, in order of first appearance.
yLogBase 2, 10
xScale "linear", "log", "symlog" Spacing of the time columns; log and symlog space them by the logarithm of the time, with 16 columns when xBuckets has no count, and a size is then a step in scaled units, not seconds. Absent is linear.
xLogBase 2, 10 Base of a logarithmic xScale; 2 when absent.
keepOriginalData boolean
queries transformQueries The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query.

spatial

Field Type Description
type (required) "spatial"
action "prepare", "calculate", "modify" prepare (the default) adds lat and lon fields from the source location; calculate adds the heading or distance from the previous row, or the area of the polygon the rows outline; modify builds lines.
source spatialLocation Where a row is: auto (the default) takes latitude and longitude fields named lat, latitude, lon, lng or longitude, else a field named geohash; coords names the latitude and longitude fields; geohash names the geohash field; lookup names the text field looked up in the gazetteer (countries by default).
calc "heading", "distance", "area" For calculate: heading in degrees and distance in meters from the previous located row, or area in square meters of the polygon whose corners are the located rows in order. Absent means heading.
field fieldName The name of the calculated field. Absent means Heading, Distance or Area.
modify "lineBuilder", "asLine" For modify: lineBuilder draws one line per row from the source to the target location; asLine keeps the located rows, in order, as the points of one line. Absent means lineBuilder.
target spatialLocation Where a row is: auto (the default) takes latitude and longitude fields named lat, latitude, lon, lng or longitude, else a field named geohash; coords names the latitude and longitude fields; geohash names the geohash field; lookup names the text field looked up in the gazetteer (countries by default).
queries transformQueries The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query.

fieldLookup

Field Type Description
type (required) "fieldLookup"
lookupField fieldName The text field holding the names or codes to look up. Absent means the first text field.
gazetteer "countries", "usa-states" The built-in list the names are looked up in. Absent means countries.
queries transformQueries The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query.

Generated from spec/schema/observespec.v0.json at bac0fe39. Report a problem.

/observeOpen source under Apache-2.0.Grafana is a trademark of Grafana Labs. SlashObserve is not affiliated with or endorsed by Grafana Labs.

Search pages and headings.