stroom-expression

Library of functions as used in Stroom dashboards

Лицензия

Лицензия

Группа

Группа

uk.gov.gchq.stroom.expression
Идентификатор

Идентификатор

stroom-expression
Последняя версия

Последняя версия

1.5.15
Дата

Дата

Тип

Тип

pom.sha512
Описание

Описание

stroom-expression
Library of functions as used in Stroom dashboards
Ссылка на сайт

Ссылка на сайт

https://github.com/gchq/stroom-expression
Система контроля версий

Система контроля версий

https://github.com/gchq/stroom-expression

Скачать stroom-expression

Зависимости

runtime (1)

Идентификатор библиотеки Тип Версия
org.slf4j : slf4j-api jar 1.7.25

Модули Проекта

Данный проект не имеет модулей.

stroom-expression

Build Status

This library provides Stroom with the functions for manipulating data on Stroom Dashboards.

See the full documentation for all functions here.

Internally an expression function will create a generator to produce values for a cell based on the expression definition. Each generator is supplied with an array of values for the row it belongs to (multiple sets of array values if a row is an aggregated grouping of multiple rows).

The arguments to functions can either be other functions, literal values, or they can refer to fields on the input data using the ${} syntax.

A FieldIndexMap is used to map named fields to the index of the appropriate value within the supplied row value array.

Example:

FieldIndexMap fim = FieldIndexMap.forFields("name", "age", "occupation")
Generator g = parseExpression("concat(${name}, ${age})")

g.addData("JDoe", 45, "Butcher")

g.eval
> JDoe45

Example showing multiple values supplied to generator due to some external grouping:

FieldIndexMap fim = FieldIndexMap.forFields("name", "age", "occupation")
Generator g = parseExpression("count()")

g.addData("JDoe", 45, "Butcher")
g.addData("JBloggs", 23, "Butcher")
g.addData("JSmith", 34, "Butcher")
g.addData("JSmith", 24, "Butcher")

g.eval
> 4

Example showing multiple values supplied to generator due to some external grouping:

FieldIndexMap fim = FieldIndexMap.forFields("name", "age", "occupation")
Generator g = parseExpression("countUnique(${name})")

g.addData("JDoe", 45, "Butcher")
g.addData("JBloggs", 23, "Butcher")
g.addData("JSmith", 34, "Butcher")
g.addData("JSmith", 24, "Butcher")

g.eval
> 3
uk.gov.gchq.stroom.expression

GCHQ

Версии библиотеки

Версия
1.5.15
v1.5.14
v1.5.13
v0.0.1-test-deployment