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

my source is a comma delimited flatfile as eno, ename, sal 111,sri,ram,kumar,1000 and my target should be eno ename sal 111 sri ram kumar 1000 i.e; we need to eliminate the commas in between the data of a comma delimited file.

5 Answers   IBM,


How to get EVEN & ODD numbers separately?

8 Answers  


In a scenario I want to change the dimensions of a table and normalize the denomralized table which transformation can I use?

4 Answers  


how can we use sorter transformation in joins?

5 Answers   IBM,


What is sql query override? When did u use sql query override?

1 Answers   TCS,






Source --------- eno , ename, sal 001,ank,1000 002,behe,2000 003,raj,2500 Target ------- header :DDMMYYYY24MMSS timestamp body: 001,ank,1000 002,behe,2000 003,raj,2500 footer: count(eno),sum(sal) how to implement the same in a FF tgt?

2 Answers   CTS,


I want skip first 5 rows to load in to target? what will be the logic at session level ??

1 Answers   IBM,


What are the differences between source qualifier and joiner transformation?

0 Answers  


All active transformations r passive or not?

7 Answers  


whats the logic to load the lower level of granularity of data to fact table.

0 Answers   IBM,


What are Rapid changing dimensions?

1 Answers  


what is data driven in informatica

5 Answers   IBM,


Categories