Functions Reference

CloudConnect transformation language has at its disposal a set of functions you can use. We describe them here.

All functions can be grouped into following categories:

[Important]Important

Remember that with CTL2 you can use both CloudConnect built-in functions and your own functions in one of the ways listed below.

Built-in functions

  • substring(upperCase(getAplhanumericChars($0.field1))1,3)

  • $0.field1.getAlphanumericChars().upperCase().substring(1,3)

The two expressions above are equivalent. The second option with the first argument preceding the function itself is sometimes referred to as object notation. Do not forget to use the "$port.field.function()" syntax. Thus, arg.substring(1,3) is equal to substring(arg,1,3).

You can also declare your own function with a set of arguments of any data type, e.g.:

function integer myFunction(integer arg1, string arg2, boolean arg3) { 
<function body>
}

User-defined functions

  • myFunction($0.integerField,$0.stringField,$0.booleanField)

  • $0.integerField.myFunction($0.stringField,$0.booleanField)

[Warning]Warning

Remember that the object notation (<first argument>.function(<other arguments>) cannot be used in Miscellaneous functions. See Miscellaneous Functions.

[Important]Important

Remember that if you set the Null value property in metadata for any string data field to any non-empty string, any function that accept string data field as an argument and throws NPE when applied on null (e.g., length()), it will throw NPE when applied on such specific string.

For example, if field1 has Null value property set to "<null>", length($0.field1) will fail on the records in which the value of field1 is "<null>" and it will be 0 for empty field.

See Null value for detailed information.