Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Expressions] datatable utility functions #78745

Closed
1 of 7 tasks
ppisljar opened this issue Sep 29, 2020 · 1 comment · Fixed by #126572
Closed
1 of 7 tasks

[Expressions] datatable utility functions #78745

ppisljar opened this issue Sep 29, 2020 · 1 comment · Fixed by #126572
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

Comments

@ppisljar
Copy link
Member

ppisljar commented Sep 29, 2020

In expressions Datatable is the common data format that as many functions as possible should share. Each DatatableColumn has a meta field, which contains additional information about the column such as field, type and format.

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 available
  • getFieldFormat(column: DatatableColumn): FieldFormat retrieves field formatter instance for specified column
  • getAggConfig(column: DatatableColumn): AggConfig | undefined retrieves AggConfig instance for specified column
  • getInterval(column: DatatableColumn): string | undefined retrieves interval used for the column (if it's a date histogram) - resolves auto to the actual interval
  • setFieldFormat sets a new format for column
  • clearField removes column association with field
  • clearFieldFormat removes formatting meta from column
@ppisljar ppisljar added Feature:ExpressionLanguage Interpreter expression language (aka canvas pipeline) Team:AppArch v7.11.0 v8.0.0 labels Sep 29, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-arch (Team:AppArch)

@petrklapka petrklapka added 1 and removed 1 labels May 10, 2021
@exalate-issue-sync exalate-issue-sync bot added impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort labels May 13, 2021
@exalate-issue-sync exalate-issue-sync bot added loe:large Large Level of Effort and removed loe:small Small Level of Effort labels May 27, 2021
@exalate-issue-sync exalate-issue-sync bot changed the title datatable utility functions [Expressions] datatable utility functions Jul 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants