Latest code error(NOTE: There are no empty fields or values, I’m sure about it. If you use this code without reducing, it’d work as expected.)
runtime error @6:8-12:87: reduce: null values are not supported for “_field” in the reduce() function
Even I check and set the default “field”, Flux continues to say “null for _value”. I guess it drops all the things whenever I switch to “reduce” aggregate.
Is it impossible to use reduce with pivot and group?
Before the pivot you can see _field and _value are represented accordingly and would work against your reduce. After the pivot toy can see we drop the _field and _vaue field. These are replaced by the column jetson_CPU1 with the values represented in this field.
Here is an example of using reduce with a pivot before.
Thank you so much for the fast answer, it helped me. I’ve figured out how to deal with it and write an aggregation in Java language.
The problem I am facing now is to use to to transfer my data to another bucket. After using pivot, group, and reduce, it is almost impossible to transfer my grouped and reduced data(Example: ‘_result, user=1’ and 'result, user=2).
Is there a way to transfer aggregated data to another bucket? I can do it but it just gets the latest field. For example, if I have 3 users grouped by the “user” field, it writes “user3” only, not “user1” and “user2”.
After taking a look at it, it is not solved. It is working as I want but user field becomes tag. If I regroup with just measurement, it just resulted as same as first time(getting only last player, u_2)