Validate the type of a column
- Problem Description:
Is there a way to enter a rule via the preparation editor or other that checks the type of data and then uses a validation node to exclude all data that does not have the expected correct type?
- Solution:
The simplest way is to use a validation node, it allows you to do this directly:
In this example, the data in “Processing Date” is of the wrong type; it will be the same whether it’s an integer, decimal, boolean column, etc.
Note
To change the type of a column, simply right-click in the column list in a preparation editor and choose “change field type”
The configuration of the validation node allows you to define the desired controls. In this example, we want to check that the “Processing Date” is of the correct type:
The two output arrows are:
the first, green, contains valid data (with respect to the selected criterion)
the second, red, contains invalid data: