i have n number of records in my source, i want first and
last record to my target. how can u implement this scenario .

Answers were Sorted based on User's Feedback



i have n number of records in my source, i want first and last record to my target. how can u imple..

Answer / venkateshmalneni

we can also do it like this
FIRST PIPELINE

From sq connect all the ports to expression t/r and by using sequence generator t/r generate sequence number.
From expression t/r connect the all the ports to the filter t/r write a condition sno=1.
from filter t/r connect all the ports to the target
SECOND PIPELINE

From sq connect all the ports to Aggrigator t/r and dont group by any port,connect the ports to the target
THE DATA FLOW DIAGRAM WILL BE LIKE THIS
sequencegenerator
|
\|/
src--->sq--->expression--->filter--->trg
|
|-->aggrigator--->tgr


I think this will work

Is This Answer Correct ?    12 Yes 1 No

i have n number of records in my source, i want first and last record to my target. how can u imple..

Answer / chandrasekar

Please try the SQL query in the SQL override,

select * from emp where rownum=1 union select *
from emp where rowid=(select max(rowid) from
emp);


if it wrong means please mail to me chandranmca2007@gmail.com

Is This Answer Correct ?    8 Yes 3 No

i have n number of records in my source, i want first and last record to my target. how can u imple..

Answer / rakesh

Hi Chandrasekar,

My intension was to specify the column that is generated using sequence generator as RANK PORT. So no matter of sorting..

Thanks.

Is This Answer Correct ?    4 Yes 1 No

i have n number of records in my source, i want first and last record to my target. how can u imple..

Answer / chandrasekar

Hi Rakesh,

Please go through the above question because don't sort the
records what have the source as it is to load the records
for first and last.

Is This Answer Correct ?    4 Yes 2 No

i have n number of records in my source, i want first and last record to my target. how can u imple..

Answer / srinivas bolusupati

Use sequence generator t/r and give the nextval link
to 2 rank transformations, 1st one with top1 and 2nd one with bottom1 and connect them to 2 instances of target..

Is This Answer Correct ?    0 Yes 0 No

i have n number of records in my source, i want first and last record to my target. how can u imple..

Answer / rakesh

use 2 rank transformations, 1st one with top1 and 2nd one with bottom1 and connect them to 2 instances of target..

Is This Answer Correct ?    3 Yes 8 No

Post New Answer

More Informatica Interview Questions

Source (Flatfile) - Target (1-1 mapping). How to load first or last 20 record to target?

5 Answers   Flextronics,


WHAT IS UPDATE OVERRIDE . DIFFERENCE BETWEEN SQL OVERRIDE AND UPDATE OVERRIDE ?

7 Answers   Target,


What are the uses of etl tools?

0 Answers  


why u go for dimensions ?

3 Answers   TCS,


What is aggregate cache in aggregator transforamtion?

5 Answers  






What are the basic needs to join two sources in a source qualifier?

3 Answers  


My source is delimited flat file Flat file data is H|Date D1|ravi|bangalore D2|raju|pune T|4 The data will be send to target if the fallowing two conditions satisfied 1.The first row Date column is equal to SYSDATE 2.Last record second port equal to number of records. How to achieve?

2 Answers   Sapient,


Do you have to change the reject file b4 using reject loader utility.

1 Answers  


What is a repository? And how to add it in an informatica client?

0 Answers   Informatica,


What are the joiner caches?

3 Answers   Informatica,


My flat file source is C_Id 1-nov-2011 8-nov-2011 100 2000 1500 101 2500 2000 I want my Target as C_Id Week_Num Amt 100 45 2000 100 46 1500 101 45 2500 101 46 2000

3 Answers   Wipro,


How to create a mapping ? id date 101 2/4/2008 101 4/4/2008 102 6/4/2008 102 4/4/2008 103 4/4/2008 104 8/4/2008 O/P - shud have only one id with the min(date) How to create a mapping for this

9 Answers   Deloitte,


Categories