Docs
Search…
Javascript
Javascript transform allows you to define customized transform logic by Javascript code.

Function Template

Javascript transform has following template:
1
function XX(event) {
2
/*
3
// Write your transform code
4
*/
5
return event
6
}
7
result = XX(event);
Copied!

Example

Following JS transform converts value of status to an integer.
1
function transform(event) {
2
// write your transform code here
3
event.status = parseInt(event.status)
4
5
return event
6
}
7
result = transform(event);
8
Copied!
Last modified 1yr ago
Copy link