Checking for Integer Datatype

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
kumar66
Participant
Posts: 265
Joined: Thu Jul 26, 2007 12:14 am

Checking for Integer Datatype

Post 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
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Variables and Column names are case sensitive. "Input" is not the same as "input".
kumar66
Participant
Posts: 265
Joined: Thu Jul 26, 2007 12:14 am

Post by kumar66 »

Hi Arnd,

Thanks for your reply.

Sorry it was a typo error,

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

Thanks & Regards,
Kuamr66
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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.
kumar66
Participant
Posts: 265
Joined: Thu Jul 26, 2007 12:14 am

Post by kumar66 »

Hi Arnd

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

Thanks & Regards,
Kumar66
miwinter
Participant
Posts: 396
Joined: Thu Jun 22, 2006 7:00 am
Location: England, UK

Post by miwinter »

What datatype is the incoming "Input" field out of interest?
Mark Winter
<i>Nothing appeases a troubled mind more than <b>good</b> music</i>
dspradeep
Participant
Posts: 59
Joined: Fri Aug 21, 2009 12:58 am

Post 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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
mgendy
Premium Member
Premium Member
Posts: 44
Joined: Thu Sep 10, 2009 5:30 am
Contact:

Post by mgendy »

may be the data type is not integer , may be it is decimal , trye to work to validate that
Mohmmed Elgendy
Senior System Analyst
Data IntegrationTeam
Etisalat Egypt
+20 1118511161
Post Reply