Create a mapping which contains 2 target tables. When the
session runs for the first time it shud load Target table 1
and when it runs for second time it shud load Target
table 2.

Answers were Sorted based on User's Feedback



Create a mapping which contains 2 target tables. When the session runs for the first time it shud ..

Answer / babu

Hi,
By using mapping variable,we can achieve this logic.


i.e SRC==>TRANS==>FLT1 ==>TRG1
|==>FLT2==>TRG2


in FLT1 place a condition mod(MVAR,2)=1,in FLT2 place a
condition as mod(MVAR,2)=0

MVAR is nothing but a mapping variable.
I think all are knows how to create,declare and call the
mapping variable.
please concern me if any doughts.

Is This Answer Correct ?    9 Yes 4 No

Create a mapping which contains 2 target tables. When the session runs for the first time it shud ..

Answer / babu

Hi Zak,
By default the value of MVAR is 0.The value is
increment by at run time only.
i.e is SETVARIABLE($$MVAR,($$MVAR+1))
Let me know if u have any doughts

mail:
dwarak.vbr@gmail.com
+91-8861145051

Is This Answer Correct ?    3 Yes 0 No

Create a mapping which contains 2 target tables. When the session runs for the first time it shud ..

Answer / zak

Hi Babu,

Your logic works fine if you update the MVAR mapping
variable manually before you run the session. Is there a
way to update the MVAR within the mapping??
Thanks for your reply:)

Is This Answer Correct ?    0 Yes 0 No

Create a mapping which contains 2 target tables. When the session runs for the first time it shud ..

Answer / hai

there is an option to set the value as zero ,with out set
the value manually .

Is This Answer Correct ?    0 Yes 0 No

Create a mapping which contains 2 target tables. When the session runs for the first time it shud ..

Answer / triveni munnangi

source_>sq->expression->router->tg1
->tg2
expression:v_count decimal 10 0(variableport) setvariable($$cnt,1)
o_count decimal 10 0 (outputport) $$cnt
router:groups
t1=o_count=0
0_count=1
$$cnt variable integer 10 0 max false

Is This Answer Correct ?    0 Yes 0 No

Create a mapping which contains 2 target tables. When the session runs for the first time it shud ..

Answer / perumal

Source -> sq -> sequence Generator -> exp trans -> router
trans -> tgt1/tgt2

create variable nxt_val with next value return from seq gen
and in router give rule as mod(nxt_val,2)<>0 to load tgt1
(since first run value will be 1) and mod(nxt_val,2)=0 to
load tgt2.

Is This Answer Correct ?    2 Yes 2 No

Create a mapping which contains 2 target tables. When the session runs for the first time it shud ..

Answer / subhajit

Alternative to mapping variable:

Use sequence generator, mod on that and then finally router.

Thanks

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More Informatica Interview Questions

Differnce between filter and router?

14 Answers   IBM,


What are slowly changing dimensions?

5 Answers   Informatica, Verinon Technology Solutions,


What is Data Caches size?

0 Answers   Informatica,


Hello...... How can i set my mapping as read-only? Please answer me. Advance thanks

4 Answers  


How to create the list file having millions of flat files while indirect loading in informatica? In indirect file loading, suppose we have less no.of flat files then we can enter files names manually in list file creation. If millions of files are there, how can we enter the flat file names in list file?

0 Answers   HP,






Is it possible to update the target table with PK?

1 Answers   TCS,


How do u identify or filter out a 0 byte file available in a folder by using UNIX command?

1 Answers   Wipro,


which one is better performance wise joiner or look up

0 Answers   Informatica,


What is a test load?

1 Answers  


can any one explain me what i have to tell about insurance project in interview,,,,when he asked to tell about ur project

0 Answers  


i having source, router transformation, two targets in my mapping... i given two conditions in router 1)sal >500 2)sal < 5000 --------------- my source is havig two sal records (1)1000 (2)2000 then which target will load first? will both targets are get load or single target only get load...... why?

9 Answers   Cap Gemini,


Difference Between ETL & ELT?

1 Answers   TCS,


Categories