If the order of field names is acceptable
... | table * |sort [search (your search)|head 1 | table * | stats dc(*) as * | transpose |head 1|rename column as query]
If the order of field names is acceptable
... | table * |sort [search (your search)|head 1 | table * | stats dc(*) as * | transpose |head 1|rename column as query]
Awesome, that worked. Can you please explain this?
| rename column as query
The return value will be the value only. Usually field = value.
special field:query
index=* [inputlookup xxx.csv | fields col_a]
->(col_a=1) OR (col_a=2) OR (col_a=3) ・・・・
index=* [inputlookup xxx.csv | rename col_a as query | fields query]
->(1) OR (2) OR (3) ・・・・
Try this
| stats values(*) as * | sort 0 *
Nope, this will group everything up in one cell which is not the desired outcome 🙂