How to delete first 3 rows & last 3 rows in target table in
informatica

Answers were Sorted based on User's Feedback



How to delete first 3 rows & last 3 rows in target table in informatica..

Answer / venkateshmalneni


FIRS PIPELINE
BY using sequence generator t/r generate sequence
numbers(sno)
in rank t/r,from sq connect all the ports to the rank
t/r,rank by sno,select top 3 ranks
SECOND PIPELINE
connect the nextval port from sequence generator to sorter
t/r
from sq connect all the ports to the sorter t/r,connect all
the ports to the filter t/r.in filter t/r write a condition
sno>3.

connect the o/p of the two pipelines by using UNION T/R
connect the o/p of the Union t/r to aggrigator t/r group by
sno.create an o/p port with name count_sno to
count(sno),connect the o/p from aggrigator t/r to the filter
t/r write the condition count_sno=1.
connect the o/p from filter to trg
THE DATA FLOW DIAGRAM IS LIKE THIS
sequence generator
| |
| \|/
src--->sq--->rank------>union--->aggrigator---->filter->trg
| | /
\|/ \|/ /
sortet----->filter/

If am wrong please let me know



Is This Answer Correct ?    2 Yes 0 No

How to delete first 3 rows & last 3 rows in target table in informatica..

Answer / venkateshmalneni


FIRS PIPELINE
BY using sequence generator t/r generate sequence
numbers(sno)
in rank t/r,from sq connect all the ports to the rank
t/r,rank by sno,select top 3 ranks
SECOND PIPELINE
connect the nextval port from sequence generator to sorter
t/r
from sq connect all the ports to the sorter t/r,connect all
the ports to the filter t/r.in filter t/r write a condition
sno>3.

connect the o/p of the two pipelines by using UNION T/R
connect the o/p of the Union t/r to aggrigator t/r group by
sno.create an o/p port with name count_sno to
count(sno),connect the o/p from aggrigator t/r to the filter
t/r write the condition count_sno=1.
connect the o/p from filter to trg
THE DATA FLOW DIAGRAM IS LIKE THIS
sequence generator
| |
| \|/
src--->sq--->rank------>union--->aggrigator---->filter->trg
| | /
\|/ \|/ /
sortet----->filter/

If am wrong please let me know



Is This Answer Correct ?    1 Yes 1 No

How to delete first 3 rows & last 3 rows in target table in informatica..

Answer / civa

take seq trns and drag nextval port into exp trns and also
drag sq ports to exp

in exp delete from emp where nextval= 1 or 2 or 3 and
nextval=count(empno)-1 or count(empno)-2 or count(empno)-3

Is This Answer Correct ?    3 Yes 3 No

How to delete first 3 rows & last 3 rows in target table in informatica..

Answer / kiran

Question state Target table!! All above answers are for
Source table!

Is This Answer Correct ?    1 Yes 1 No

How to delete first 3 rows & last 3 rows in target table in informatica..

Answer / santosh kumar sarangi

create a sequence t/r and link the next value with sq t/r to
expression t/r and. Create two link.
First Link:
Connect ex t/r to update strategy t/r and keep condition as
IIF(NEXTVAL<4,DD_DELETE,DD_REJECT) and connect to target
except the nextval column.
Second Link:
Connect to sorter t/r and sort with descending order of
nextval and rename as in_nextval. create new sequence
generator and link to the same ex t/r. Link the ports to
again one more update strategy t/r and keep the same condition
as IIF(NEXTVAL<4,DD_DELETE,DD_REJECT) and link to the one
more instance of target table.

Let me know if any things wrong.

Thanks & regards,
Santosh Kumar Sarangi

Is This Answer Correct ?    0 Yes 1 No

How to delete first 3 rows & last 3 rows in target table in informatica..

Answer / suresh

cant we write a subquery?

delete from table emp where exists (select * from emp where rownum=1 or 2 or 3);

count(empno) --> has to be stored in a variable port and delete the last three rows of the target table.

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More Informatica Interview Questions

How to calculate the cache size if say we are doing a performance check on a mapping and found that a particular cache needs to be changed. Is there a formula to calculate this! i know that informatica has a auto option available but how to calculate manually?

1 Answers  


How do you take care of security using a repository manager

2 Answers  


Kimball and Inmon methodologies?

2 Answers  


If source is having 5000 rows,and if you want to load data into 500 rows to target,if the session runs successfully,how can you verify the target if the rows are successfully loaded or not.

3 Answers   IBM, TCS,


How can the following be achieved in 1 single Informatica Mapping. * If the Header table record has error value(NULL) then those records and the corresponding child records in the SUBHEAD and DETAIL tables should also not be loaded into the target(TARGET1,TARGET 2 or TARGET3). * If the HEADER table record is valid, but the SUBHEAD or DETAIL table record has an error value (NULL) then the no data should be loaded into the target TARGET1,TARGET 2 or TARGET3. * If the HEADER table record is valid and the SUBHEAD or DETAIL table record also has valid records only then the data should be loaded into the target TARGET1,TARGET 2 and TARGET3. =================================================== HEADER COL1 COL2 COL3 COL5 COL6 1 ABC NULL NULL CITY1 2 XYZ 456 TUBE CITY2 3 GTD 564 PIN CITY3 SUBHEAD COL1 COL2 COL3 COL5 COL6 1 1001 VAL3 748 543 1 1002 VAL4 33 22 1 1003 VAL6 23 11 2 2001 AAP1 334 443 2 2002 AAP2 44 22 3 3001 RAD2 NULL 33 3 3002 RAD3 NULL 234 3 3003 RAD4 83 31 DETAIL COL1 COL2 COL3 COL5 COL6 1 D001 TXX2 748 543 1 D002 TXX3 33 22 1 D003 TXX4 23 11 2 D001 PXX2 56 224 2 D002 PXX3 666 332 ======================================================== TARGET1 2 XYZ 456 TUBE CITY2 TARGET2 2 2001 AAP1 334 443 2 2002 AAP2 44 22 TARGET3 2 D001 PXX2 56 224 2 D002 PXX3 666 332

3 Answers   IBM, Mphasis,






Explain scd type 3 through mapping.

0 Answers  


How can i catch the Duplicate Rows From SorterTrans in a Seperate Target Table ?

2 Answers  


Q. source having mutile depatment of data, dept1, dept2 ....dept10 today. we have mutilple depts in source, we need to generate dept1, dept2 and multile files in target side. today we have 10 dept which have 10 files, tommorow we have only 4 dept and 4 files, dayafter tommorow we have only 6 all the number of files in the targete file directory it's always dynamic. how can acheive it.

0 Answers  


what is the size of u r project? and what is the size of source file?

1 Answers   HP,


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,


Scenario:-  Below is the requirement. Source:-  NAME          ID                    Requirement  RAVI            1                      (no need to repeat as it ID is 1) KUMAR        3                     (repeat 3 times as it ID is 3) John             4                     (repeat 4 times as it ID is 4) Required Out Put:- Name                   ID RAVI                     1                    KUMAR                3      KUMAR                3 KUMAR                3  John                     4 John                     4 John                     4 John                     4 Scenario 2:- Source Data  ID              NAME 1,2            NETEZZA,ORACLE 3,4,5         SQL Server, DB2, Teradata Required Output:-  ID                   NAME 1                  NETEZZA 1                  ORACLE 3                  SQL Server 3                  DB2 3                  Teradata

1 Answers   Cognizant,


When will u go for Dynamic Cache and Persistent Cache? Pls explain with an example?

2 Answers   TCS,


Categories