Multiple Intify Processor

Modified on Tue, 30 Nov 2021 at 03:16 PM

Overview

The Multiple Intify processor changes the data type of the selected columns to integer.


Input

All kinds of data types are possible, though the way datetime and string values are handled depends on their content.


Configuration


Rounding Strategy: The available rounding modes are the same as in the Rounding processor: Ceiling, Down, Floor, Half Down, Half Even, Half Up & Up. Descriptions and examples for all modes can be found under the official Java documentation for RoundingMode.

Output

The output is the dataset from the input, but values of columns selected in the configuration are converted to integers.


Example

Example Input

int
product_id

string

product_name

double

price_(€)

string

special-offer_price_(€)

1

08/15 Tablet

134.19

90.99

2

Awesome Thing

76.66

60.00

3

Creative Name

222.88

200.50

4

High-end Product

232.57

187.30

5

Expensive Thingy

49.01

44.44

6

Something or Other

44.33

22.15

7

24/7 Buying

135.82

111.11

8

Product Product

53.13

45.13


Workflow



Example Configuration

All columns are selected to be converted. If rounding is necessary, the strategy DOWN is to be used. Should a value not be convertible, then zero will be set instead.


Result

As configured, all non-numerical string entries under product_name got assigned "0". All string values under special-offer_price_(€) only consist of numbers, so they were able to be converted to integers after rounding. As expected, no change in column product_id.



When using a Result Table processor, the data type of a column can be checked in the JSON result of the processor under schema. Another possibility would be to save the data using the Data Table Save processor and check the types of the columns in the table entry under the DATA TABLES tab of the project.



Related Articles

Multiple Doublify Processor

Stringify Processor

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article