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.
Answers were Sorted based on User's Feedback
Answer / harish konda
We can achieve this by using Mapping Variable and Mod function.
Create a mapping var. and using the SetVariable() fun increment its value by 1 every time when the session runs succesfully.
And in the Router create 3 groups and give the conditions, Mod($$var,3)=0,Mod($$var,3)=1,Mod($$var,3)=2.
And map each group of Router to 3 different Targets.
Is This Answer Correct ? | 18 Yes | 2 No |
Answer / 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 |
Create a mapping variable $$INCR=1
Take Expression Transformation after SQ
In Expression Transformation create a variable port:
v_count_session=IIF($$INCR=4,setVariable($$INCR,1),setVarialbe($$INCR,$$INCR+1))
After Exp take a ROUTER Transformation and create three groups with conditions :
GROUP1
$$INCR=1
GROUP2
$$INCR=2
GROUP3
$$INCR=3
Finally connect groups to group1--tgt1, group2--tgt2, group3=tgt3
Is This Answer Correct ? | 0 Yes | 1 No |
Answer / bhupal
Hi all,
Use sequence generator to generate the sequence.
properties should be
start value=1
end value=3
check the cycle option.
connect this nextvalue port to router and make there groups.
group_1----> nextvalue=1
group_2----> nextvalue=2
group_3----> nextvalue=3
connect first group to first target and second group to second target and then third to third.
flow will be like this
sequence generator
|
source---->source qualifier---->router--------Target 1
|-----------Target 2
|-----------Target 3
please let me know if you have any new questions.
mail id: bhupalreddy200@gmail.com
Is This Answer Correct ? | 1 Yes | 20 No |
What is the capacity of power cube?
Suppose on 1st Nov 2010 you had created a mapping which includes huge aggregator calculations and it is under process for next two days. You will notice that even on 3rd day also its still calculating. So without changing a logic or changing a mapping How will you troubleshot or to run that mapping? Explain the steps
What is the difference between Junk and Confirmed Dimention? where can be used htat one in Informatica?
Can we use Union Transformation for Heterogeneous sources? i.e; 3 sources, 1 from Oracle, 2nd from Informix, 3rd from Sql Server with same metadata?
What are session parameters ? How do you set them?
hi,this is satheesh working as pl/sql resource in MNC.i just wanna switch to informatica.Could you please let me know what is the best way to learn informatica.what are the best coaching centres available in chennai?Is there any coaching centre will give me a real time experience? informatica
HOW TO YOU LOAD TIME DIMENSION
Hi experts, table 1 has 10 records, table 2 has 5 records select * from table1, table2; What is the output for this query???....plz answer
what is junk dimension
Hi, There is a session in my workflow which is running for a long time, atlast we found the cause is the missing index. My session is running via a stored procedure. Can I create an Index on the table which the stored procedure is using while my session is running? Please suggest. My Informatica version is PC 8.0.6 My Oracle APPS is 11.5.3. Thanks,
i have thousand records in my source(flat file) i wanna load 990 records i don't want load first 5 records and last 5 records at informatica level?
Hi, As shown below i have repositories under that some folder are there . Between these repositories and folder some thing is there.I want to know what is that? repositories repo1 repo2 repo3 IS_## IS_## IS_## Folder1 Folder2 Folder3 - - - Here i want to what IS_## represents ? Advance Thanks