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

I want my deployment group to refer an external configuration file, while i deploy in the production environment. How can i achieve it.

0 Answers  


WAT IS TEXT LOAD?

3 Answers   Wipro,


can we use bulk loading when we use look in mapping

1 Answers   TCS,


What is aggregate awareness?

1 Answers  


write sql query following table amount year quarter 1000 2003 first 2000 2003 second 3000 2003 third 4000 2003 fourth 5000 2004 first 6000 2004 second 7000 2004 third 8000 2004 fourth i want the output year q1_amount q2_amount q3_amount q4_amount 2003 1000 2000 3000 4000 2004 5000 6000 7000 8000 can anybady help me to achieve the aboue result by using informatica. thanks in advance.

5 Answers  


HI Experts, What is BULK mode and NORMAL mode, Which one gives better performance. How? Please Explain with an example...! It will help's me a lot. Thanks In advance.

8 Answers   CTS,


Please create a mapping where I have source which has one column with name like Aman_Gupta Rakesh_Mehra Sachin_More I want the target field should contain the name in reverse order i.e Gupta_Aman Mehra_Rakesh More_Sachin. Can you please tell me what transformation would be needed to do this.

5 Answers  


How will you update the row without using update statergy?

10 Answers   CTS,


Can we create two repositories on same database instance in oracle?

0 Answers  


In EMP table, for those emp whose Hiredate is same, update their sal by "sal+500" or else for others keep the sal as it is, how to do it by SQL query

8 Answers   Cap Gemini,


Find a way to implement the following logic : You have column like : Column 1 AA|BB|CC DD|EE|FF WW|AA I need to get the length of the column without the ‘|’ .

5 Answers  


What are the different threads in DTM process?

1 Answers  


Categories