Sparse Lookup query

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
Havoc
Participant
Posts: 110
Joined: Fri Nov 24, 2006 8:26 am

Sparse Lookup query

Post by Havoc »

In the DataStage Parallel Job Developer's Guide, they mention that when we have a user generated SQL query, we have to use sparse lookups. Is there a reason why they suggest this ?

On what basis does the lookup happen when the mode is Sparse Lookup. In my job, there are no key column matches in my Lookup to Oracle Sequence (sparse lookup mode) but I am getting the desired output (i.e the next sequence number). But I just wanted to know how Sparse Lookup runs 'behind the scenes' ? This question is more in reference to this post

This question is related more the to the replies i got for this query:-
viewtopic.php?t=107257
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Query in Sparse lookup will be executed every time when each row enters the stage. And hence you get the new sequence number generated.
Increment of the sequence number is the job of Database not Datastage.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Havoc
Participant
Posts: 110
Joined: Fri Nov 24, 2006 8:26 am

Post by Havoc »

kumar_s wrote:Query in Sparse lookup will be executed every time when each row enters the stage. And hence you get the new sequence number generated.
Increment of the sequence number is the job of Database not Datastage.
Yeah, i got that ... but... on what are they doing the column matches? There is no key expression required for a sparse lookup atleast in this scenario. Then what exactly is it 'looking up' to ?
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

First available record in the lookup table's records set will be passed to the output along with incomming record set, if no lookup key is specified.
Else the matched row is processed among the existing record set. In your case, the available only row is the next sequence number.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Post Reply