Warning when directly doing a lookup to Db2 table

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
somu_june
Premium Member
Premium Member
Posts: 439
Joined: Wed Sep 14, 2005 9:28 am
Location: 36p,reading road

Warning when directly doing a lookup to Db2 table

Post by somu_june »

Hi ,

I have a job in which Iam doing a lookup to a db2 table directly with out out using any hash files for a column Annd and when Iam doing that Iam getting an warning.


Preprocessor_CheckAnnouncement..Xfom_ANNDoc: Reference lookup generated 9555 rows. Only the last row was used.

I tried in select statement using Distinct Annd and with out distinct in select statement . But Iam getting the same warning .

Can some one tell me why Iam getting this warning


Thanks,
SomaRaju.
somaraju
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Because you're doing a lookup on something that is not unique in the DB2 table - that is, neither the primary key nor a column that has a UNIQUE constraint.

DISTINCT does not help if there are other columns in the lookup query; these would have to all be identical to reduce the count.

The DB2 stage can not support multiple returns from a lookup. This is only supported by the ODBC stage and the UniVerse stage. You could use an ODBC stage if multi-row return is what you require (for example 9555 rows out of the Transformer stage for one row in).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
somu_june
Premium Member
Premium Member
Posts: 439
Joined: Wed Sep 14, 2005 9:28 am
Location: 36p,reading road

Post by somu_june »

Hi Ray,


Thanks for solving my problem.






Regards,
SomaRaju
somaraju
Post Reply