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.|
Try using Unroll, source field set to `events`
IIRC, EB works on _raw. not on arbitrary fields in the event
if events was a thing under _raw, you might see the results you were expecting
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.
Code: No, code works inside a single event context only
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.
def experiment with that. Hit the CPU profiler in the stats popout
0
unroll takes 87ms; total time 260ms; though more than half appears to be writing the pipeline results to the preview pane
Looks like parse -> stringify -> parse is most performant. Thanks for the hint on the profiler!
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`
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.
Reply
Login to the community
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.