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

Slowly changing dimensions, types and where will you use them

0 Answers  


In which situation we will use persistant cache and shared cache in real time. plzsss answer with example

1 Answers   Wipro,


what is confirmed fact?

2 Answers  


How does the server recognize the source and target databases. Elaborate on this.

1 Answers  


I cleared Informatica certification Designer. if anybody need dumps, can contact at mukesh1009@gmail.com

119 Answers   Accenture, Gcs, TCS,






What are conformed dimensions?

1 Answers  


What is the maplet?

0 Answers   Informatica,


Different types of Power center errors?

1 Answers   Cinterco, IBM,


After draging the ports of three sources(sql server,oracle,informix) to a single source qualifier, can you map these three ports directly to target?

6 Answers  


whats the option in informatica 7 version is outdated in informatica 8 version onwards.

1 Answers   iGate,


There are 2 files, Master and User. We need to compare 2 files and prepare a output log file which lists out missing Rolename for each UserName between Master and User file. Please find the sample data- MASTER.csv ---------- Org|Tmp_UsrID|ShortMark|Rolename ---|---------|----------|------------ AUS|0_ABC_PW |ABC PW |ABC Admin PW AUS|0_ABC_PW |ABC PW |MT Deny all GBR|0_EDT_SEC|CR Edit |Editor GBR|0_EDT_SEC|CR Edit |SEC MT103 GBR|0_EDT_SEC|CR Edit |AB User USER.csv -------- Org|UserName|ShortMark|Rolename ---|--------|---------|------------ AUS|charls |ABC PW |ABC Admin PW AUS|amudha |ABC PW |MT Deny all GBR|sandya |CR Edit |Editor GBR|sandya |CR Edit |SEC MT103 GBR|sandya |CR Edit |AB User GBR|sarkar |CR Edit |Editor GBR|sarkar |CR Edit |SEC MT103 Required Output file: --------------------- Org|Tmp_UsrID|UserName|Rolename |Code ---|---------|--------|------------|-------- AUS|0_ABC_PW |charls |ABC Admin PW|MATCH AUS|0_ABC_PW |charls |MT Deny all |MISSING AUS|0_ABC_PW |amudha |ABC Admin PW|MISSING AUS|0_ABC_PW |amudha |MT Deny all |MATCH GBR|0_EDT_SEC|sandya |Editor |MATCH GBR|0_EDT_SEC|sandya |SEC MT103 |MATCH GBR|0_EDT_SEC|sandya |AB User |MATCH GBR|0_EDT_SEC|sarkar |Editor |MATCH GBR|0_EDT_SEC|sarkar |SEC MT103 |MATCH GBR|0_EDT_SEC|sarkar |AB User |MISSING Both the files are mapped through Organization, Shor_mark. So, based on each Organization, Short_Mark, for each UserName from User.csv, we need to find the Matching and Missing Rolename. I am able to bring Matching records in the output. But really I don't find any concept or logic to achieve "MISSING" records which are present in Master and not in User.csv for each UserName. Please help out guys. Let me know if you need any more information. Note:- In User.csv file, there are n number of Organization, under which n number Shortmark comes which has n number of UserName.

0 Answers  


How do schedule a workflow in Informatica thrice in a day? Like run the workflow at 3am, 5am and 4pm?

3 Answers   Logica CMG,


Categories