generate Unique sequence numbers for each partition in session with Unconnected Lookup ?




Hi All,

Please help me to resolve the below issue while Applying partitioning concept to my Session.

This is a very simple mapping with Source, Lookup , router, and target.

I need to Lookup on the target and compare with the source data, if any piece of data is new then Insert, and If any thing change in the existed data then Update.

while Inserting the new records to the target table I'm generating sequence numbers with Unconnected lookup, by calling the maximum PK ID from the target table.

The above flow is working fine from last one year.

Now I wish to apply the Partitioning concept to the above floe(session)

At source I used 4 pass through partitions.(For Each partition different filter conditions to pull the data from source)

at Target I used 4 passthrough Partitions.

it is working fine for some data, but for some rows for Insert Operation , it is throwing Unique key errors, because while Inserting the data it is generating the same sequence key twice.


In detail : 1st row is coming from 1st partition and generated the sequence number 1 for that row.

2nd row is coming from 1st partition and generated the sequence number 2 for that row

3rd row is coming from the 2nd partition generated the sequence number 2 again for that row. (it must generate 3 for this row)

the issue is becuase of generating the same sequence numbers twice for different partitions.

Can any one Please help me to resolve this issue.

While Applying partitions how can I generate a Unique Sequence numbers from Unconnected lookup for Each partitioned data.


Regrads,
N Kiran.

Answers were Sorted based on User's Feedback



generate Unique sequence numbers for each partition in session with Unconnected Lookup ? Hi..

Answer / sufi

Most simple way to handle this type scenario is use DB Sequence Generator (write Stored Procedure) and Trigger on INSERT on top of it.

Is This Answer Correct ?    2 Yes 0 No

generate Unique sequence numbers for each partition in session with Unconnected Lookup ? Hi..

Answer / subhrangshu

Hi,
Take one parameter (i.e. $$seq) and assign initial value for the unique key (i.e. 1000). Now, from Source Qualifier take all the ports to one expression transformation. Add two additional ports in the Expression Transformation as below.

v_seq (variable port) = IIF(v_seq>0,v_seq+1,$$seq)
SEQ_NO (output port) = v_seq

In this way, the Sequence transformation can be avoided but we will have the same facility in partition scenario as we are changing the port values only.

Though I believe it will work but please let me know if it is not.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Informatica Interview Questions

how remove 1st 3 records & last 3 records in informatics

4 Answers   TetraSoft,


What is difference between maplet and reusable transformation?

2 Answers  


My sql query is 1. select 1+x from dual? 2. select 1+'x' from Dual? 3. Select x+1 from dual? what is the out put of the above queries?

3 Answers   HP,


Hi, What is exactly node ? what is exactly domain ? How loadbalancer will work ? what is Integration service (IS) ? Can anyone give me exact scenario when I click on start workflow in the workflow manager ? (Note : I am not expecting answer like, node means logical representation of a machine and domain will contain multiple nodes .I gone through Informatica help but I couldn’t understand. I am expecting exactly what is happening in background detailed explanation or Pictorial representation will be highly appreciation ) Advance thanks

3 Answers   IBM,


What is an MDDB? What is the difference between MDDBs and RDBMSs?

3 Answers  






How to load relational source into file target?

3 Answers   IBM,


tell me the push down optimization

2 Answers   Wipro,


How to delete the data in the target table after loaded.

3 Answers   TCS,


Can we create two repositories on same database instance in oracle?

0 Answers  


Different qualification between a related rotate toward the sky and isolates look upward?

0 Answers  


how to through logic of informatica using the push down optimization into oracle.

2 Answers   Hexaware,


Differentiate between a repository server and a powerhouse?

0 Answers  


Categories