Sequence number
Posted: Thu May 24, 2007 12:33 pm
Hi All,
Here is the job design
Seq_file----->Pivot stage----->Transformer----->Oracle_table
I am taking data from Seq file and transform and sending to Oracle_table
There are some fields from cobol copy book which occurs twice in the source and getting populated as Column_A,Col_B,Col_C, FLAG,Col_B_2, Col_C_2 in metadata
By using Pivot stage I am generating second row with columns which are occuring second time
Now, I need to generate a sequence number as below
If the FLAG=1 then generate sequence number as 1
and of the FLAG=2 then generate sequence number as 1 for first row
and generate sequence number as 2 for second row
I tried by using Surrogate Key Generator, but not able to meet the above condition
Any ideas?
Here is the job design
Seq_file----->Pivot stage----->Transformer----->Oracle_table
I am taking data from Seq file and transform and sending to Oracle_table
There are some fields from cobol copy book which occurs twice in the source and getting populated as Column_A,Col_B,Col_C, FLAG,Col_B_2, Col_C_2 in metadata
By using Pivot stage I am generating second row with columns which are occuring second time
Now, I need to generate a sequence number as below
If the FLAG=1 then generate sequence number as 1
and of the FLAG=2 then generate sequence number as 1 for first row
and generate sequence number as 2 for second row
I tried by using Surrogate Key Generator, but not able to meet the above condition
Any ideas?