Sparse 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
Subhasree
Participant
Posts: 11
Joined: Fri Jul 27, 2007 12:12 am

Sparse Lookup

Post by Subhasree »

Hi All,

Im doing a Sparse lookup on a DB2 table.Its returing the lookup key values as Null eventhough the records in the reference table matches with that of Source table.But for the same Source and reference table,the lookup is working fine for SQL Server.
Please help me in this regard.

Thanks.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

perhaps extra spaces on the lookup string? Is the key dataype identical (same length if of type char())?
poornima.chandramouli
Participant
Posts: 42
Joined: Wed Dec 26, 2007 1:58 am
Location: India

Re: Sparse Lookup

Post by poornima.chandramouli »

Subhasree wrote:Hi All,

Im doing a Sparse lookup on a DB2 table.Its returing the lookup key values as Null eventhough the records in the reference table matches with that of Source table.But for the same Source and reference table,the lookup is working fine for SQL Server.
Please help me in this regard.

Thanks.
If the key the with which you are doing the lookup is a char field,Pls do a trim by using LTRIM(RTRIM(column)) in the DB2 query,then carry the field as varchar from the DB2 stage.
Do the same for the reference also.(Propagate the column as varchar throughout,till the lookup)
Then go for a hit in the lookup,you will get a valid hit.
Regards
Post Reply