Home > Software > Data-Warehouse > Informatica
Interview Questions   Tutorials   Discussions   Programs   

Informatica - How could we generate the sequence of key values without using sequence generator transformation in the target ?




1007
views
asked marvit September 20, 2014 08:05 AM  

How could we generate the sequence of key values without using sequence generator transformation in the target ?


           

1 Answers



 
answered By vishnoiprem   0  

Just create a unconencted lookup on the history table with sql override as select max(key_column),1 as dummy from HIST_TABLE_NAME. Condition as lkp_dummy=in_dummy

 

In the expression use the below expression :

 

var_Max_key=IIF(isnull(var_Max_key),:lkp.<Lkp name.(1),var_Max_key) (just check the syntax for calling unconnected lookup)

 

This way you will call only once from next time onwords it wont call as the variable is not null.

 

out_next_key=var_max_key+1

 

This way you can generate the next keys for the hist table with minimal burden on lkp cache etc.

flag   
   add comment

Your answer

Join with account you already have

FF

Preview


Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!

Alert