WSO2 Data Mapper Operators - Arithmetic category
This post describes about the operators in the Arithmetic category- Add
This operator can be used to add two or more numbers
1.Drag and drop the operator to the editor
2. To configure the number of inputs, right click and select “Configure Add Operator” menu action and then you can add the number of inputs you require to add
Eg:Adds the calories and count and maps the result to value
- Subtract
This operator can be used to subtract two numbers
- Multiply
This can be used to multiply two or more numbers
1. Drag and drop the operator to the editor
1. Drag and drop the operator to the editor
Eg: Multiplies the calories by 1% and map the result
- Divide
This can be used to divide two numbers
Eg: Divide the calories by 2 and map the result
- Ceiling
This can be used to derive the ceiling value of a number (the least integer that is greater than the input value)
- Floor
This can be used to derive the floor value of a number (the greatest integer that is less than the input value)
- Round
This can be used to derive the next integer value by either increasing or decreasing the number
Eg: Get the round value of price
- Set Precision
This can be used to specify a number into a specified length.
Eg: Nmber as 5.5433
Number of decimals as 2
The result would be 5.54
1.Drag and drop the operator to the editor
2. You can give the number which you need to convert into the first input box and the number of decimals to the other input box. No of decimals can be given in two ways as below-Can give via the dialog box by right click and select “Configure Set Precision Operator” menu action and specify the value for {$NoOfDigits}
- Absolute value
This can be used to derive the absolute value of a rational number
- Min
This can be used to derive the minimum number of the given set of numbers
1.Drag and drop the operator to the editor
1.Drag and drop the operator to the editor
- Max
1.Drag and drop the operator to the editor
No comments:
Post a Comment