Stay organized with collections
Save and categorize content based on your preferences.
Mathematical functions
This page describes the additional set of predefined Jsonnet functions for the Data Transformer Script task available in Application Integration.
Before you begin
To use the following predefined functions, you must import the functions library in your script. Importing the functions library lets you use both the standard Jsonnet functions and the predefined Data Transformer functions.
Application Integration supports Jsonnet functions library v0.20.0. For information about the Jsonnet standard functions, see Jsonnet Standard Library.
Is Decimal
Syntax
isDecimal(num)
Description
Checks if the given number is a decimal.
Input parameter
num: The input number.
Return type
BOOLEAN
Output
Returns TRUE if the number is a decimal and FALSE otherwise.
Is Even
Syntax
isEven(num)
Description
Checks if the given number is even.
Input parameter
num: The input number.
Return type
BOOLEAN
Output
Returns TRUE if the number is even and FALSE otherwise.
Is Integer
Syntax
isInteger(num)
Description
Checks if the given number is an integer.
Input parameter
num: The input number.
Return type
BOOLEAN
Output
Returns TRUE if the number is an integer and FALSE otherwise.
Is Odd
Syntax
isOdd(num)
Description
Checks if the given number is odd.
Input parameter
num: The input number.
Return type
BOOLEAN
Output
Returns TRUE if the number is odd and FALSE otherwise.
Random Number
Syntax
randomNumber(lowerBound, upperBound)
Description
Generates a random real number between a specified range.
Input parameter
lowerBound: Lower range value (inclusive). Default value is 0.
upperBound: Higher range value (exclusive). Default value is 1.
Return type
A real number.
Output
Returns a random real number between lowerBound and upperBound.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-10 UTC."],[[["This page details the predefined Jsonnet functions available for the Data Transformer Script task in Application Integration, which is a Pre-GA feature with potential limitations in support and availability."],["To utilize these functions, including standard Jsonnet functions, users must import the `functions` library into their script, with Application Integration supporting Jsonnet library version v0.20.0."],["The functions provided include `isDecimal`, `isEven`, `isInteger`, and `isOdd`, each designed to verify specific properties of a given number, returning a boolean result of `TRUE` or `FALSE`."],["Additional functions are `randomNumber`, which generates a random real number within a specified range, and `round`, which rounds a number to the nearest integer."],["The functionality that these functions are providing is part of the data transformer script task, which is currently still in preview mode, as described in the recommendations."]]],[]]