Skip to main content

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

Custom Script Engine

Script Editor: The script editor is the place where you can write powerful scripts, debug, and handle error rows.

Custom Script Engine
  • Click the JavaScript dropdown and then select the language that you want to use to write the script
Javascript
  • You can also select a script template that help you give a framework to your script
Script template
  • In the script engine, function name will always be remained function process that has two inputs- Rows and Context

  • Rows 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

Input
  • Once you end up with the script you can click on the Test Run to see the test result
Test Run

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.

Fail Pipeline
  • 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

Untitle Script

Save Script

Click the Save button to save the script

Save 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