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



I have one source table and three target tables. When the session runs for the first time involvin..

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

I have one source table and three target tables. When the session runs for the first time involvin..

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

I have one source table and three target tables. When the session runs for the first time involvin..

Answer / kamleshmishra291

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

I have one source table and three target tables. When the session runs for the first time involvin..

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

Post New Answer

More Informatica Interview Questions

If the source has duplicate records as id and name columns, values: 1 a, 1 b, 1 c, 2 a, 2 b, the target should be loaded as 1 a+b+c or 1 a||b||c, what transformations should be used for this?

4 Answers   ABC, Cap Gemini,


HOw can we load the normalised data ( Vertical data) to (Horizontal data)with out using decode in the expression transformation and the aggregator transformation. But, what exactly I want is .. If we have million of records,it is not possible using decode and search for that Particular Id to pivot into Horizontal data... Can any one of guys please help me in this regard.....

3 Answers   TCS,


What is meant by lookup transformation?

0 Answers  


scd methodology?

2 Answers  


HAI FRIENDS THIS KISHORE FROM KUMBAKONAM. I HAVE COMPLETED MY MCA IN SASTRA UNIVERSITY WAITING FOR MY 6 TH SEM RESULT.DURING MY PROJECT I HAVE DONE INFORMATICA COURSE AS MY AREA INTEREST COURSE IN CORE MIND TECHNOLOGIES CHENNAI.I HAVE ENQUIRY ABT ALL IT PEOPLE FOR DATAWAREHOUSING THERE IS NO OPENING FOR FRESHERS. WITH SOME EXPERIENCE ANY OTHER DOMAIN TNEN ONLY U CAN GET THAT DOMAIN(DATAWAREHOUSING) JOB.BUT I AM MORE INTEREST ON THAT TO WORK ON THAT DOMAIN(INFORMATICA).WHAT TO I DO. I AM IN HELPLESS FRIENDS/EXPORTS.WAITING FOR REPLY

0 Answers  






What is the format of informatica objects in a repository?

0 Answers  


how can u tune u r informatica mapppings

2 Answers   CTS,


How do you Merge multiple Flat files for example 100 flat files with out using Union T/F

4 Answers   IBM,


How is Source Side push down optimization different to just providing a SQL override in Source qualifier transformation.

0 Answers  


Explain the mapping variable usage example in informatica

0 Answers   Informatica,


I have a scenario like - how can i load 1st record to Trgt1,2nd->Trgt2, 3rd->Trgt3 and again the cycle has to repeat with loading 4th->Trgt1,5th->Trgt2,6th->Trgt3?

3 Answers   ITC Infotech, TCS,


if i am having 10 records in source, i want 20 records in target...how will you do it

13 Answers   BirlaSoft, IBM,


Categories