Page 1 of 1

String to Integer Conversion

Posted: Thu Oct 20, 2011 12:39 pm
by palak08
Hi All,

I am trying to load one Flat file toNetezza database. In flat file, I have a column as Varchar and in Target the datatype of column is Integer.

I am not using any function for explicit conversion in between. Now if I have data as 1234, it gets loaded correctly. But when I have data like 'abc', it inserts '0'.

Should not that record be rejected because of datatype issue?

The message I am geeting in log file is :
"Transformer_1,1: Numeric string expected for input column 'A'. Use default value."

Is there a way to get that record rejected in case of 'abc' and capture it in a file?

Thanks.

Posted: Thu Oct 20, 2011 3:03 pm
by ray.wurlod
Yes. Just use regular constraint expressions in the Transformer.

Posted: Thu Oct 20, 2011 3:03 pm
by jwiles
Use the IsValid() or Num() functions. This is standard data validation functionality.

Regards,