less rows from 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

DSRajesh
Premium Member
Premium Member
Posts: 297
Joined: Mon Feb 05, 2007 10:37 pm

less rows from lookup

Post by DSRajesh »

Hi

I have source file and lookup file which are joined using trnasformer.
I am getting data for lookup from oracle table the problem i ma facing is
When i try to run the job for lookup individually using oracle and hash file for lookup i am getting exact rows as in database even after applying where clause.

But when i joined this lookup with source i ma getting less rows from lookup which was not like that when the lookup individually.

can u pls let me know why am i getting less number of rows after join with source where as i am getting same number of rows when ru the job individually for lookup.

pls help me here
RD
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I am not sure where the hashed file fits in. But which lookup is not working and can you identify a row which should be found in the lookup but is not?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

What is the data type of the lookup (reference) key? Are you certain that you trimmed trailing space when loading the hashed file and when you form the reference key value?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
DSRajesh
Premium Member
Premium Member
Posts: 297
Joined: Mon Feb 05, 2007 10:37 pm

Post by DSRajesh »

Hi

I have the column flieght_sched_key in my table and hash file with value
2405269
but i am unable to find the key value for 2405265 in hash file where as same exist in my table.

Column data type is integer and i am not doing any trimming on this column.

can you pls help me why i am uanble be view the rwo with key 2405265 in hash file.
RD
Raghavendra
Participant
Posts: 147
Joined: Sat Apr 30, 2005 1:23 am
Location: Bangalore,India

Post by Raghavendra »

Please first of all check whether you are using correct columns for the lookup then check the datatypes both from table and lookup.
DSRajesh
Premium Member
Premium Member
Posts: 297
Joined: Mon Feb 05, 2007 10:37 pm

Post by DSRajesh »

I am using correct columns only
metadata is same in table as well as hash file

can you pls advice me why this is happening
RD
hemachandra.m
Participant
Posts: 27
Joined: Wed Jan 03, 2007 1:29 am

Post by hemachandra.m »

When it is 2405269 in table how will you find 2405265 in hash file. 2405269 <> 24052695. Check if the lookup has 2405269.
Hemachandra
hemachandra.m
Participant
Posts: 27
Joined: Wed Jan 03, 2007 1:29 am

Post by hemachandra.m »

If still the problem persists. Just trim the key column in the hash file. Also while joining with hash file from source file have a trim of the source field.
Hemachandra
Raghavendra
Participant
Posts: 147
Joined: Sat Apr 30, 2005 1:23 am
Location: Bangalore,India

Post by Raghavendra »

try once trimming both the columns
DSRajesh
Premium Member
Premium Member
Posts: 297
Joined: Mon Feb 05, 2007 10:37 pm

Post by DSRajesh »

how can we trim the column in hash file?
becuase the job design which is in production cannot have any stage like transformer between sourec table and hash file as it is direct mapping

can u pls advive me how do we do in hash file
RD
Raghavendra
Participant
Posts: 147
Joined: Sat Apr 30, 2005 1:23 am
Location: Bangalore,India

Post by Raghavendra »

You cannot trim the columns directly in hashfile.If you don't have any transformer between the hashfile and the source stage try trimming the column directly at the source only( I mean database only.). But please be cautious while doing this as it may impact your job performance.
Raghavendra
Participant
Posts: 147
Joined: Sat Apr 30, 2005 1:23 am
Location: Bangalore,India

Post by Raghavendra »

Please post the server issues in server forum only.... :D
hemachandra.m
Participant
Posts: 27
Joined: Wed Jan 03, 2007 1:29 am

Post by hemachandra.m »

I had a similar problem where my hash file had 3 keys in which the key cols were not continuous from the start. So if a transformer is not used when data is transfomed to hash file then it would give problem if the keys are not continuous from the start. So try giving the key column as the first column in the hash file. I believe this should solve the issue.
Hemachandra
DSRajesh
Premium Member
Premium Member
Posts: 297
Joined: Mon Feb 05, 2007 10:37 pm

Post by DSRajesh »

Hi hema,

I had totally 4 coulmns in my table where first 3 columns are hey columns and the last column which is not key column is missing the data in hash file where the row exists in database .

tried in many ways but in vain.

pls help me here
RD
DSRajesh
Premium Member
Premium Member
Posts: 297
Joined: Mon Feb 05, 2007 10:37 pm

Post by DSRajesh »

also i am able to see the data when test with sequential files
RD
Post Reply