DataSet LookUp

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
ewartpm
Participant
Posts: 97
Joined: Wed Jun 25, 2003 2:15 am
Location: South Africa
Contact:

DataSet LookUp

Post by ewartpm »

The partitioning on the lookup stage is set to auto.
I do a lookup to the datastage where the key values, incomming and on the dataset, are varchar.
This works when the varchar contains only numerics e.g. '13300'
This does not work when the varchar contains non-numerics e.g. 'VDB_120'.

Has anyone else experienced this problem?
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post by jwiles »

What do you mean by doesn't work? Do you just not get an expected match, or does the job fail?

Both varchar columns are defined alike, yes? Are both datasources of the same type (sequential file, database, dataset for example)?

Typically, you don't get a match on varchars because the data doesn't exactly match (that one was obvious, wasn't it? :) ) It may LOOK like it does when you do a peek or view data, but there could be trailing spaces, non-printable characters or something that isn't readily visible using peek/view data. You may just need to clean up your data using some form of Trim() or Convert() before entering the lookup stage.

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 »

It may also not work, even if the data do look the same, if they are encoded differently (for an extreme example, ASCII and EBCDIC).
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