How to generate the sequence of keys or numbers in target without using the sequence generator transformation.

Showing Answers 1 - 18 of 18 Answers

Anil kumar

  • Oct 19th, 2007
 

By using pre SQL in source qualifier we can generate sequence in the target

OR
It can be implemented throuh Lookup Transformation, Develope the lookup transformation with condition like NEXTVAL=CURVAL+1, Through this conditon we can acheive.

  Was this answer useful?  Yes

It can be done using a setvariable function. We need to add a mapping variable with the initial value given as 0.

Then in the expression transformation:
1. Seq_No -->
2. Out_Seq_No --> setvariable(,)

At every run, the value of the mapping variable will be incremented by 1.

Thanks.

  Was this answer useful?  Yes

ashish

  • Sep 27th, 2014
 

use the expression transformation. in there create a variable port say count in that write count+1 then assign this port to out put port it will create a sequence .

  Was this answer useful?  Yes

Venkateswara Rao Rajanala

  • Oct 14th, 2014
 

You can use output port and say CUME(1).. this will automatically generate the sequence or use Variable port
Var= var+1 and Output port = Var...This will generate the sequence for you

  Was this answer useful?  Yes

There are 3 ways are available to generate sequence numbers with out using Sequence Generator Transformation,

1) Using Exp Tfn variable concept
v_cnt(v)=o_cnt+1
o_cnt(o)=v_cnt
2)using mapping variable concept

first we have to define the one mapping variable
$$var_seq(mv) datatype->integer agg-->count initial value=0

At mapping level using exp tfn o_seq=setcountvariable($$var_seq)

3)Using Dynamic lookup cache we can generate seq numbers
emp_sk(integer)

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions