Event Breaking issues in JSON Array Mode
Hey all, I'm having some event breaking issues, and I'm really struggling. `events` is an array of objects, and each object has some fields. I'm using the `Event Breaker` function, in `JSON Array` mode. `Array Field` is set to `events`, and yet nothing is happening. I've tried with `JSON Extract Fields` both on and off, to no avail.|
Answers
-
Try using Unroll, source field set to `events`
0 -
IIRC, EB works on _raw. not on arbitrary fields in the event
0 -
if events was a thing under _raw, you might see the results you were expecting
0 -
Progress! If I unroll onto _raw, each new event has its own events array, with all 105 siblings, essentially squaring the memory footprint. If I unroll onto events, now I just need to eval all child fields to top-level fields. Long shot question - is it possible to return multiple events from a code function? I can try modifying raw to get EB working, but I don't think that's a long-term solution, in case we need the OG event later for debugging.
0 -
Code: No, code works inside a single event context only
0 -
Valid. If I overwrite _raw in code with a *stringified* array, then EB will work. Seems silly to json parse and then stringify to json parse again, so unroll is likely the best option here.
0 -
def experiment with that. Hit the CPU profiler in the stats popout
0 -
0
0 -
unroll takes 87ms; total time 260ms; though more than half appears to be writing the pipeline results to the preview pane
0 -
EB takes 53ms; increases code from 2 to 3 for the stringify; total time 103ms - less than half. IDK what `run Microtasks` is, but it takes a lot longer after `unroll`
0 -
Looks like parse -> stringify -> parse is most performant. Thanks for the hint on the profiler!
0 -
woof, that's a lot of time! If you can cleanse your data, I'd love to get a sample to see what sort of optimizations i can come up with. let me know.
0