Apologies but looking at your example output I do not see the logic / math how you come up with results ... can you show the logic for each row in the result?
Apologies but before we try to construct the query we need to under the logic / aggregation / equation you want ... How did you arrive at the please show equation pseudo code etc...I can not figure out what you want ..
Sorry for the confusion. The table above was just an illustration that I'd like to achieve. My current equation can only return the max id and bucketed workflow. See below. Instead of id, it is actually the max_id based on my query.
max_id
workflow
2
A
3
B
And, I'd like to get the sum of duration for each of the bucketed workflow. For example, workflow A has sum of duration from x1 and x2 (yield 5m), whereas workflow B has sum of duration from y1 and y2 (yield 6m). This is exactly the problem that I couldn't resolve.
Thanks for explaining your expectation on equation. This is what I'd like to achieve.
Identify the max id per workflow
Sum up the duration per workflow based on max id
For example,
Max id of workflow A is id 2. Given id 2, x1 (row3) = 2m, x2 (row 4) = 3m, sum of duration is 2+3=5.
Max id of workflow B is id 3. Given id 3, y1 (row9) = 4m, y2 (row 10) = 2m, sum of duration is 4+2=6.
| max_id | workflow | sum_duration | equation |
|--------|----------|--------------|-----------------------------------------------------------|
| 2 | A | 5m | Max(id) of workflow A is 2. Sum of duration is 5m (x1+x2) |
| 3 | B | 6m | Max(id) of workflow B is 3. Sum of duration is 6m (y1+y2) |
Ok thanks the equations are much clearer BUT my first thought is that is much harder and may require some advanced scripting (which I am not an expert at), I will try to take a look tomorrow.
It would seem that you want to Use the max id per workflow as a filter / selector I do not know how to do that off the top of my head.... you can not have sub aggregations of max which seems like what you will need to do..
It's late I will need to take a look tomorrow perhaps someone else may look in the meantime.
And now the Table (this is 8.9) but I think you can do it in 7.17
Rows
Top Value of workflow
Max value of id Trickey is really Top 1 Values of id Ranked by Custom Max Value of id (This custom rank function might not be in 7.17)
Then Metric is just sum of duration
Hi @stephenb , I'd like to build 2 dimension visualizer like follows. You helped me with the aggregated results (duration with workflow*). Is it possible to build the visualizer with breakdown by y-axis (which is release*).
I'd like to clarify, is it necessary to ingest the aggregated results into ES again in order to build visualizer? I'm confused with the records of the screenshot below.
Unfortunatly the Heat Map does not work because you can not apply the max id selection (I assume that requirement still exists) because that level of filtering is not available on that Visuzilaton.
If you want to use the heat map you would need to pre-filter / aggregate the data.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.