Skip to main content
Question

Event Breaking issues in JSON Array Mode

  • March 11, 2025
  • 12 replies
  • 59 views

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.|

12 replies

Jon Rust
Forum|alt.badge.img
  • Employee
  • March 11, 2025

Try using Unroll, source field set to `events`


Jon Rust
Forum|alt.badge.img
  • Employee
  • March 11, 2025

IIRC, EB works on _raw. not on arbitrary fields in the event


Jon Rust
Forum|alt.badge.img
  • Employee
  • March 11, 2025

if events was a thing under _raw, you might see the results you were expecting


  • Author
  • Employee
  • March 11, 2025

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.


Jon Rust
Forum|alt.badge.img
  • Employee
  • March 11, 2025

Code: No, code works inside a single event context only


  • Author
  • Employee
  • March 11, 2025

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.


Jon Rust
Forum|alt.badge.img
  • Employee
  • March 11, 2025

def experiment with that. Hit the CPU profiler in the stats popout


Jon Rust
Forum|alt.badge.img
  • Employee
  • March 11, 2025

0


  • Author
  • Employee
  • March 11, 2025

unroll takes 87ms; total time 260ms; though more than half appears to be writing the pipeline results to the preview pane


  • Author
  • Employee
  • March 11, 2025

Looks like parse -> stringify -> parse is most performant. Thanks for the hint on the profiler!


  • Author
  • Employee
  • March 11, 2025

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`


Jon Rust
Forum|alt.badge.img
  • Employee
  • March 11, 2025

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.