Lookup comparisions

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
e1994264
Premium Member
Premium Member
Posts: 28
Joined: Mon Jul 18, 2011 5:12 pm

Lookup comparisions

Post by e1994264 »

Hi,
I have one issue.
My source is a flat file. My lookup is Db2 database.
i have Source column which is Char datatype with 9 chars.
But my lookup up table column is Varchar data type with 15 in length.
My question is how can i trim the spaces and lookup based on the condition.

As far as in server jobs you can write Trim function in while joing the columns, But in Parallel job how should i do get perfect match values.
Please can you share you ideas ASAP
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post by jwiles »

You can call Trim and many other functions in the transformer stage (quick search of <a href="http://publib.boulder.ibm.com/infocente ... p">product documentation</a> will point you towards them).

The data types of your keys should match when performing a lookup, so convert both to the same varchar or char specification out of the transformer.

Regards,
- james wiles


All generalizations are false, including this one - Mark Twain.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Why ASAP?

We don't do "urgent". DSXchange is an all volunteer forum whose members post if, as and when they can.

Search DSXchange for examples of how to pad strings and of how to convert from fixed-length string to variable-length string. However you accomplish it, your values (with trailing spaces if they have them) must match.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply