Terdata to DB2 lookup

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
iwin
Premium Member
Premium Member
Posts: 99
Joined: Mon Apr 11, 2005 9:20 pm

Terdata to DB2 lookup

Post by iwin »

Hi ,
I have a job, where Data from Teradata goes to Hashfile and then to transformer. And doing a lookup with DB2 , in Transformer, where file data goes to flatfile.
TD-----HS

DB2----- Trans------Flatfile

When i run the job, i am getting some 10000's of warinings like below:

Transformer_50: Reference lookup generated 2 rows. Only the last row was used.

Please help me how to get rid of these warnings.


Thanks in advance.
rasi
Participant
Posts: 464
Joined: Fri Oct 25, 2002 1:33 am
Location: Australia, Sydney

Post by rasi »

Hi

Is Teradata is your source or lookup?. This error occurs when the lookup returns more than one match. Try to remove duplicates when creating references.

Regards
Regards
Siva

Listening to the Learned

"The most precious wealth is the wealth acquired by the ear Indeed, of all wealth that wealth is the crown." - Thirukural By Thiruvalluvar
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Because you are performing a lookup against a partial key or secondary key, it is possible that more than one row might be returned. The DB2 stage is not equipped to return multiple rows on a reference lookup, so generates the message.

You have three choices.
  • Use an ODBC stage, which does have multi-row return capability, to access the DB2 table.

    Change the SQL so that the query can only deliver one row (for example limit the rownumber to 1, or get the first or last row selected).

    Change the operation so that you are performing a lookup against the primary key (which, by definition, is unique).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
iwin
Premium Member
Premium Member
Posts: 99
Joined: Mon Apr 11, 2005 9:20 pm

Terdata to DB2 lookup

Post by iwin »

Hi,
I have taken the 3rd Option.
Thanks
iwin
Premium Member
Premium Member
Posts: 99
Joined: Mon Apr 11, 2005 9:20 pm

Post by iwin »

Hi ray,
Actually my refercence database DB2 contains no unique columns.
Thanks
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Then option 3 is not for you. Try option 2.

Seems to me that a table with no unique columns is a strange choice for a lookup table.
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