[Expressions] datatable utility functions #78745
Labels
Feature:ExpressionLanguage
Interpreter expression language (aka canvas pipeline)
impact:low
Addressing this issue will have a low level of impact on the quality/strength of our product.
loe:large
Large Level of Effort
v7.11.0
v8.0.0
In expressions
Datatable
is the common data format that as many functions as possible should share. EachDatatableColumn
has ameta
field, which contains additional information about the column such asfield
,type
andformat
.We want to keep the structure of meta field private (not part of our public API) and instead provide utility functions that extract information from
DatatableColumnMeta
instead.This will allow us to do changes to the
DatatableColumnMeta
without affecting downstream consumers and also make usage easier and clearer.The basic list of functions:
getField(column: DatatableColumn): IndexPatternField | undefined
retrieves index pattern field instance if availablegetFieldFormat(column: DatatableColumn): FieldFormat
retrieves field formatter instance for specified columngetAggConfig(column: DatatableColumn): AggConfig | undefined
retrieves AggConfig instance for specified columngetInterval(column: DatatableColumn): string | undefined
retrieves interval used for the column (if it's a date histogram) - resolves auto to the actual intervalsetFieldFormat
sets a new format for columnclearField
removes column association with fieldclearFieldFormat
removes formatting meta from columnThe text was updated successfully, but these errors were encountered: