Beware when you see this message when working with Boolean in DataStage, the message displays as informational (at list it did for me) not as a warning or an error. Even though it seems innocuous, what it meant for my job, was the Boolean (‘true’ / ‘false’) was not being interpreted and everything posted to ‘false’.
In DataStage the Netezza ‘Boolean’ field/Data SQL type maps to the ‘Bit’ SQL type, which expects a numeric input of Zero (0) or one (1). So, my solution (once I detected the problem during unit testing) was to put Transformer Stage logic in place to convert the Boolean input to the expected number value.
Netezza to Datastage Data Type Mapping
Netezza data types
data types (SQL types)
Expected Input value
|BOOLEAN||Bit||0 or 1 (1 = true, 0 = false)|
Transformer Stage logic Boolean Handling Logic
A Netezza Boolean field can store: true values, false values, and null. So, some thought should be given to you desired data outcome for nulls
This first example sets a that the nulls are set to a specific value, which can support a specific business rule for null handling and, also, provide null handling for non-nullable fields. Here we are setting nulls to the numeric value for ‘true’ and all other non-true inputs to ‘false’.
If isnull(Lnk_Src_In.USER_ACTIVE) then 1 Else if Lnk_Src_In.USER_ACTIVE = ‘true’ Then 1 Else 0
These second examples sets a that the nulls are set by the Else value, if your logic direction is correct value and still provides null handling for non-nullable fields.
If Lnk_Src_In.USER_ACTIVE = ‘true’ Then 1 Else 0
If Lnk_Src_In.USER_ACTIVE = ‘False’ Then 0 Else 1
Director Log Message
- <<Link Name Where Message Occurred>>: Numeric string expected. Use default value.
Or something like this:
- <<Link Name Where Message Occurred>>: Numeric string expected for input column ‘<<Field Name Here>>‘. Use default value.