In the example that we just built, the code was very simple and didn't require much attention. However, when you have more code or maybe a complicated algorithm to run on your data, testing the code effectively before running it with your data could be a great idea. The Test script button allows you to do this: checking whether the script does what it is intended to do. It actually generates a Transformation in the back with two steps: a Generate Rows step with sample data and a copy of the JavaScript step that works on that sample.
This is how you test your JavaScript code:
- Click on the Test script button and a window will appear to create a set of rows to test. Fill it as shown in the following ...