Page 1 of 1

Checking for Integer Datatype

Posted: Thu Aug 13, 2009 10:47 am
by kumar66
Hi All,

I am cheking for whether the datatype is numeric. The coloumn comes with the null value also.

I am using the code;

IsNull(Input) Or IsValid("int32",input) as a constraint in the transformer.

But no rows get tranfered to the output link.

I dont know where I am missing.

Please Advice.

Thanks & Regards,
Kumar66

Posted: Thu Aug 13, 2009 10:50 am
by ArndW
Variables and Column names are case sensitive. "Input" is not the same as "input".

Posted: Thu Aug 13, 2009 10:56 am
by kumar66
Hi Arnd,

Thanks for your reply.

Sorry it was a typo error,

IsNull(Input) Or IsValid("int32",Input).

Thanks & Regards,
Kuamr66

Posted: Thu Aug 13, 2009 11:13 am
by ArndW
Try outputting your data to a peek stage or file, make one column have "Input" as a value and the other "IsValid("Int32",Input)" and find an example of a value that is not as you expect.

Posted: Thu Aug 13, 2009 11:33 am
by kumar66
Hi Arnd

I tried , but no rows are geeting tranfered to the output.

Thanks & Regards,
Kumar66

Posted: Fri Aug 14, 2009 4:38 am
by miwinter
What datatype is the incoming "Input" field out of interest?

Posted: Sat Jan 30, 2010 12:03 pm
by dspradeep
I also faced same issue. My Field datatype is Varchar and I also tried IsNull() function but costraint doesn't satisfied and the null value went to next stage from transformer stage after that I have used Len() function to achive this. But I also don't know why it's happened :P

Posted: Sat Jan 30, 2010 3:04 pm
by ray.wurlod
This is not exactly the same topic; you should really start a new one rather than hijack an old thread.

If the constraint expression specifies IsNull(InputLink.ColumnName) then NULL values will be transferred to the output. You want IsNotNull() if what you want to do is to prevent NULL from being transferred.

The original poster in this thread did want NULL to be transferred to output.

Posted: Tue Feb 02, 2010 2:37 am
by mgendy
may be the data type is not integer , may be it is decimal , trye to work to validate that