Page 1 of 1

Data type check

Posted: Tue Apr 28, 2009 11:39 pm
by Gopalraja
Hi,

I want to chcek the data type is correct or not.

For example:

I have 2 columns in my source i.e EmpNo(Integer) and EmpName(String).
I want to check the Empno is integer and EmpName is string. How to check these two column data tyes are correct or not.

Is there any other way to check these kind of scenario.

Thanks in Advance...
Aswice

Posted: Tue Apr 28, 2009 11:57 pm
by Kryt0n
When is a string not a string?

Check out IsValid (if you want to keep processing with a default) and the Column Import stage (if you want to reject invalid records)

Posted: Wed Apr 29, 2009 3:05 am
by Gopalraja
Thanks for your reply.

IsValid check is possible to check only the string to string data type. But I want to check all kind of data types check.

Is any other function available apart from this IsValid check funtion.

Thanks in Advance
Aswice

Posted: Wed Apr 29, 2009 3:22 am
by nirdesh2
You can use NUM function to check numerical value and Alpha function to check string values.

Posted: Wed Apr 29, 2009 3:23 am
by nirdesh2
You can use NUM function to check numerical(integer) value and Alpha function to check string values.

Posted: Wed Apr 29, 2009 4:38 am
by Gopalraja
Hi Nirdesh Kumar,

I got it..Thanks for your reply....


With Regards,
Aswice

Posted: Wed Apr 29, 2009 5:11 pm
by Kryt0n
Gopalraja wrote: IsValid check is possible to check only the string to string data type. But I want to check all kind of data types check.
It is?

Code: Select all

IsValid Return whether the given string is valid for the given type. Valid types are "date", "decimal", "dfloat", "sfloat", "int8", "uint8", "int16", "uint16", "int32", "uint32", "int64", "uint64", "raw", "string", "time", "timestamp". "ustring" type (string) format (string) result (int8) 
Works fine for our float check too...