Script Engine
Boltic provides you a custom script engine where you can transform the data by writing Python/JavaScripts. A Custom script engine is used to transform the various fields of the data that cannot be achieved through no code transformation.
Scripting Prerequisites
You should have a great understanding of the following supported transformation scripts:
JavaScript
Python
Learn How to Use a Custom Script Engine
Script Editor: The script editor is the place where you can write powerful scripts, debug, and handle error rows.
- Click the JavaScript dropdown and then select the language that you want to use to write the script
- You can also select a script template that help you give a framework to your script
In the script engine,
function name
will always be remainedfunction process
that has two inputs- Rows and ContextRows means batch data. You can process multiple rows of data at 1 job.
To help you in writing script we provide you Context, which is a meta information of the data such as columns names, query parameter, batchno, batchsize, and so on. In the input data section you can view the context and sample data that both are non editable
- Once you end up with the script you can click on the Test Run to see the test result
Additional Advanced Features
Use
script.log
to add informational messages that help you debug your script.Infinite loop is not allowed. To add the timeout duration, click the three vertical dots and select the timeout.
When your scripts show error you use error_rows to capture a failed row
The entire pipeline will fail if you choose Fail Pipeline as an error handling mechanism. Fail Current Batch, on the other hand, will skip that batch and move on to the next, save the pipeline from failure.
Name the Script
Click the Untitled Script to add a meaningful name to your script
Save Script
Click the Save button to save the script
Any Question?
We are always an email away to help you resolve your queries. If you need any help, write to us at - 📧 support@boltic.io