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

What is target designer and target load order?

0 Answers  


how lookup is acting as both active and passive ? how is it possitble?

9 Answers   TCS,


what is unit testing?tell me proceedure

0 Answers   L&T, UST,


Can any one give me a real time example for FACT TABLE & DIMENSIONAL TABLE?

0 Answers  


How to differentiate between the active and passive transformations?

0 Answers  






HOW TO DELETE A RECORD FROM FLAT FILE

6 Answers   TCS,


what is constraint based load order

2 Answers   Cap Gemini,


replace multiple spaces with single space.

3 Answers   IBM,


What are the informatica performance improvement tips

0 Answers   Informatica,


how to load rows into fact table in data warehouse

0 Answers   Informatica,


The structure of source file is as below: Source structure(two fields) Name, Card NUmber A, 111111111(SSN) A, 01010101(Creditcard number) A, 34343434(Debit card number) B, 55555555(Creditcard number) C, 77777777(Debit card number) Target Structure(4 fields) Name,Credit card,SSN,Debit card A,01010101,111111111, 34343434 B,55555555,, C,,,77777777 Corresponding to one name there can be maximum 3 rows and minimum zero rows. Given that I do not know which record might have a particular type of number. How can I handle above requirement with informatica transformations?

1 Answers   Amdocs,


I have a source as flat file and having data like ""TCS"MUMBAI" and i want output like TCS MUMBAI,the length of the data in the rows is variable.how can you fix it?

5 Answers   TCS,


Categories