I have an index that collects entries in batches, identified by their build number in a corresponding column, and need to show only the data from the last build on a canvas. While I can filter for an explicitly given number, I thought I would need to use something like
I see a few issues with your expression. First, the result of each function is passed on as the input to the next function. So when you do
getCell "build" | eq math "max(build)"
The result of the getCell is the input of the eq function and that's all the context that the eq function has. So, doing max(build) will throw an error because it's doesn't know how to find the max value of a column named build when it's only given a number (the result of the getCell).
Now, it's not throwing an error because of a small syntax error on the eq function. You would have to give the eq function an expression for its argument using {} to be able to use an additional function like math, like eq {math "max(build)"}. As it is, it's being interpreted as just two strings, "math" and "max(build)", the second string being compared to the result of getCell, causing the empty table.
Now, to fix it, the easiest way would be to just add a new column to your result so in your filterrows function you can do a comparison on two columns in the same row. Something like
Many thanks for your input and for correcting my syntax. As you noticed, I am quite new to this flavour of filtering and I really appreciate your help.
Your suggestion works in principle, but it looks like I am running into Kibana issue #51191 now, as my index currently contains about 100k entries and the max seems to be only evaluated among the first 1000 rows of my query result. Is there a workaround/fix?
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.