Scripted Aggregations in Time Series Visual Builder

Right now, one can neither select a scripted field as the target of an aggregation nor supply a custom script in combination with a special aggregation in the time series visual builder, as far as I see. Is that correct?

I have a use case where I need to compute several bucket script aggregations over simple aggregations, which themselves are scripted. For example: I need to compute a sum of the form sum(f(x)), where f(x) = x, if y = 0 and f(x) = 0 else (x, y are document fields). Generally I have an ES query which computes exactly this value. Nevertheless it seems that I am not able to visualize this in Kibana.

Is there any way I can use a scripted aggregation (e.g. scripted sum aggregation) as a child aggregation of a bucket script aggregation in Kibana?

Unfortunately I am not in a situation to alter the type in order to include an according precomputed field.

TSVB does not support scripted fields.

TSVB does support scripted aggregations such as https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-pipeline-bucket-script-aggregation.html

Thanks for your answer, Nathan.

In that case I will submit a feature request :slight_smile:. Just wanted to make sure that I am not missing some functionality.

Nevertheless your answer is not 100% correct, as far as I know, as the TSVB supports the bucket script aggregation since 5.4 (see https://github.com/elastic/kibana/issues/4707 - answer by tbragin at the very bottom).

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.