Overview

The Rounding Processor rounds numeric columns to a specific number of decimal places and significant numbers based on a selected rounding strategy.

Input

The processor can operate on any dataset that includes at least one numeric column.

Configuration

Columns to round: If none are selected, all numeric columns will be rounded.


Decimal Places & Significant Numbers: It is sufficient to configure only one of those two fields. If you set both, the significant number configuration might invalidate the decimal places configuration.

 

NumberDecimal PlacesSignificant NumbersResult
26.023not configured226
2not configured26.02
2226


Rounding Mode: The following rounding modes are available: Ceiling, Down, Floor, Half Down, Half Even, Half Up & Up. A description of how they work and examples can be found under the official Java documentation for RoundingMode.


Output

The input table is forwarded and the previously selected columns are overwritten with their rounded values.

Example

Example Input

A dataset is created using the Custom Input Table Processor.



Workflow


Example Configuration 


Result

The numbers are rounded to the nearest neighbor, unless they're in the middle, then they're rounded up. 

A preceding zero before the decimal point is not significant. 123 will become 120 if the number of significant digits is 2. Also, the significant numbers invalidated the decimal numbers, as seen with 44.44 becoming 44. 

Be aware, that the Result Table Processor does not write out preceding decimal zeroes, though they are significant. 0.5 is actually 0.50 with two decimal places and two significant numbers.