I have one source table and three target tables.
When the session runs for the first time involving the
mapping,i want that the loading should take place in 1st
Target table only.
The 2nd time the same session runs the loading should take
place in 2nd Target only only
and similarly when the session runs for the 3rd time loading
should take place in Third only.
And again when the session runs for the 4th time loading
should take place in 1st Target table.
Answer Posted / vineet katyal
take mapping variable $$count-to count the number of session runs(initial value as 1 and default value as 1)
from source take the input to expression transformation and add two variable ports
V_flag=DECODE(MOD($$COUNT,3,1'FIRST',2,'SECOND',0'THIRD')
V_count=SET VARIABLE($$COUNT,$$COUNT+1)
now router transformation
three user defined groups
v_flag=first
v_flag=second
v_flag=third
now add three groups to three targets.
after every successful session run the mapping variable value gets updated by 1 in the repository.
first time the variable value will be 1 as SET VARIABLE WILL BE PROCESSED AFTER FLAG VARIABLE PORT
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is the main purpose of Unconnected lookup other than updating slowly changing dimensions? or In which case u use Unconnected lookup?
How to delete duplicate row using informatica?
suppose we are using dynamic lookup cache and in lookup condition the record is succeeded but in target it is failed due to some reasons then what happened in the cache ?
As union transformation gives UNION ALL output, how you will get the UNION output?
Explain the scenario which compels informatica server to reject files?
Informatica Server and Client are in different machines. You run a session from the server manager by specifying the source and target databases. It displays an error. You are confident that everything is correct. Then why it is displaying the error?
Explain the code page compatibility?
How we can create indexes after completing the load process?
What is a snowflake schema?
How many input parameters can exist in an unconnected lookup?
One of the optimizing technique to improve the session performance is push down optimization,by using push down optimization we push as much as transformation logic to source/target database,but this degrades the d/b performance,how to overcome this?
Can u generate reports in Informatica?
What is the status code in stored procedure transformation?
How to load the name of the current processing flat file along with the data into the target using informatica mapping?
Source and Target are flat files, Source table is as below ID,NAME 1,X 1,X 2,Y 2,Y On Target flat file i want the data to be loaded as mentioned below ID,NAME,REPEAT 1,X,2 1,X,2 2,Y,2 2,Y,2 How to achieve this, Can i get a map structure