How to delete first 3 rows & last 3 rows in target table in
informatica
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
Answer / kiran
Question state Target table!! All above answers are for
Source table!
Is This Answer Correct ? | 1 Yes | 1 No |
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 |
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 |
what is workflow varible
My source is like bellow F.NAME M.NAME L.NAME A B C D E F G H I and out put should like S.NO F.NAME M.NAME L.NAME 1 A B C 2 D E F 3 G H I 4 UNNOWN UNNOWN UNNOWN How can we acheive? please explane me indetail
Lookup transformation, one condition is having SQL override (Empno < 10) and the other condition is Lookup (Sal>1000), which is dynamic. How will u resolve this situation?
How or for what purpose look up transformation would be useful in Sales or Banking Project? Please reply!
Is it possible to update the target table with PK?
In mapping f.f as one src and f.f as trg,f.f as src and oracle as trg which is fast? mean which is complete first process
what is service oriented architecture in Informatica 8 version
1 Answers Cap Gemini, IBM, Systech, TCS,
Explain what is informatica metadata and where is it stored?
can we override a native sql query within informatica? How do we do it?
in flatfile target how can u create header and footer plese give me the comands how will u write in session properties
Consider a Phone Log table as below. It records all phone numbers that we dial in a given day. SOURCE_PHONE_NUMBER DESTINATION_PHONE_NUMBER CALL_START_DATETIME 1234 4567 01/07/2011 10:00 1234 2345 01/07/2011 11:00 1234 3456 01/07/2011 12:00 1234 3456 01/07/2011 13:00 1234 4567 01/07/2011 15:00 1222 7890 01/07/2011 10:00 1222 7680 01/07/2011 12:00 1222 2345 01/07/2011 13:00 Please provide an SQL query to display the source_phone_number and a flag where the flag needs to be set to Y if first called number and last called number are the same and N if the first called number and last called number are different. Desired Output: Source Number Is_Match 1222 N 1234 Y
without using rank transformation how can we rank items by using some other transformations