As you write your code in the Code Engine, it is useful to see sample event data and then test your code on these samples. The Code Engine provides a "Get Sample" button that pulls in a real
event object that the system received, shown as JSON in the Sample text area. Press the "Run Test" button to simulate the current code on the sample event. The resulting event dictionary appears in corresponding “Result” text area.
Tip: The run-time indicator shows the execution time of your code on the sample event. Providing an efficient transform function can significantly improve the rate of transformed events, since transforms typically run on millions of events.
Running your code in this manner doesn’t actually affect any events. The “Get Sample” and “Run Test” workflow is purely a sandbox for you to tune your code. Additionally, the Sample Event text area is completely user-modifiable, meaning you can start with a sample event, modify the keys and values in the JSON directly, and then test your code on the modified object.
Note: Events are sampled as they are received by Alooma, before having been transformed by the Code Engine and Mapper.
You can test your code via the Code Engine UI, or you can test your code programmatically.