Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


i have f;latfile source. i have two targets t1,t2. i want to
load the odd no.of records into t1 and even no.of recordds
into t2. what is the procedure and whar t/r's are involved
and what is the mapping flow

Answers were Sorted based on User's Feedback



i have f;latfile source. i have two targets t1,t2. i want to load the odd no.of records into t1 an..

Answer / vani

Can it be done in this way....

1)Drag source to mapping designer
2)Take a router transformation .consider EMP table in which
i am using EMPNO. In group1, assign the condition as
mod(empno,2)=0 which gives even numbers and in group2,
assign the condition as mod(empno,2)!=0 which gives odd numbers.
3)connect group1 to one target and group2 to another target.

If i am wrong please tell me....

Is This Answer Correct ?    27 Yes 4 No

i have f;latfile source. i have two targets t1,t2. i want to load the odd no.of records into t1 an..

Answer / sree

1. drag source and targets in to mapping designer work space
2. from t/r devoloper take sequence genarato t/r,exp t/r
and router t/r.
3. in seqg t/r give startvalue 1 ,increment by 1
give netval to a newpor in exp t/r
4. drag all ports of sq to exp in addition to newport
5. in router t/r create one group name as odd
give condetion mode(newport/2)!=0
6. give from group odd to t1
and defoult to t2.

Is This Answer Correct ?    5 Yes 0 No

i have f;latfile source. i have two targets t1,t2. i want to load the odd no.of records into t1 an..

Answer / anand kumar

We can do this in the following.

Take the sequence generator t/r
set the properties like
Start value 1
End value 2
and also Enable cycle option

connect the nextval port to the router T/r
port "SGTNO"(created by you) and also connect the ports
from source qualifier to the router t/r

Now given the first condition like
SGTNO=1 then go to first target
otherwise go to second target(here no need to mention the
second condition).

If I went wrong, please let me know

Thanks
Anand Kumar

Is This Answer Correct ?    4 Yes 1 No

i have f;latfile source. i have two targets t1,t2. i want to load the odd no.of records into t1 an..

Answer / sreekar

Hi,

Steps:-

1.Load ur source table into source analyzer.

2.generate the target tables.

3.in the maping designer take 2 filter transformations and
write these queries in each of the filter transformations

for even no of records:- select * from <tablename> where
(rowid,1) in (select rowid, mod(rownum,2) from <tablename>)

for odd no of records:- select * from <tablename> where
(rowid,0) in (select rowid, mod(rownum,2) from <tablename>)\

4. connect the output ports of this transformation to their
respective output tables.

Note:-
send your responses to suriaslesha_sreekar@yahoo.co.in

Is This Answer Correct ?    4 Yes 4 No

Post New Answer



More Informatica Interview Questions

What is parameter file?

2 Answers  


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.

2 Answers   Tech Mahindra,


How to use procedural logic inside infromatica? If yes how, if now how can we use external procedural logic in informatica?

0 Answers  


What are the modules in Power Center

0 Answers  


Separate from an archive server and a powerhouse?

0 Answers  






Can anyone please distinguish what is Inner join and Outer join

2 Answers   Wipro,


how can u connect client to ur informatica sever iff server is located at different place( not local to the client)

3 Answers   Accenture,


How can one identify whether mapping is correct or not without connecting session?

0 Answers  


sample mappings for scd1,scd2 and scd3

2 Answers   Cognizant,


In a table there are 1 million records there in which 3 records are duplicate how will you find out those 3 records?

6 Answers  


what r d pre-requiste for update strategy transformation, and differnce between delete n truncate in target session properties for update strategy

2 Answers   TCS,


how many session run unix environment what command using ?

1 Answers   HCL,






Categories