How to extract original records at one target & Duplicate
records at one target?
Answer Posted / sks
Hi,
If I understand your question correctly, then it is like-
How to send original (distinct) records to one target
(let's say TA) and duplicates to another target (let's say
TB).
It can simply be done as follows -
In your mapping, take the source table containing whole
records (duplicates as well). Now, take 2 source qualifier
(SQ) transformations. The first SQ should
contain 'Distinct' sql query (hope you know that) and the
output ports should go to TA table.
The second SQ should contain the following sql stmt (which
filters only the duplicate records) -
-------------------------------------------
SELECT empno, ename, job, mgr, hiredate, sal, comm, deptno
FROM (SELECT empno, ename, job, mgr, hiredate, sal, comm,
deptno, ROW_NUMBER() OVER (PARTITION BY empno ORDER BY
EMPNO) rn FROM s_assign_1_emp)
WHERE rn > 1
-------------------------------------------
I am using emp table example (hope you can understand it).
Now, the output ports of the seecond SQ should go to TB
table.
This is the simplest way of doing it. Hope it will help.
If you feel any issue, please let me know at
shrikant_rps@yahoo.com
| Is This Answer Correct ? | 1 Yes | 3 No |
Post New Answer View All Answers
How to create the list file having millions of flat files while indirect loading in informatica? In indirect file loading, suppose we have less no.of flat files then we can enter files names manually in list file creation. If millions of files are there, how can we enter the flat file names in list file?
How would you join a node to the already existing domain?
I have three same source structure tables. But, I want to load into single target table. How do I do this? Explain in detail through mapping flow.
Parameter and variable differences
How to do unit testing in informatica?
Explain the mapping variable usage example in informatica
What are active transformations.
What is union transformation in informatica?
What is an Integration service in Informatica?
What is meant by active and passive transformation?
Workflow is long running due to long running sql query so when we refer the query plan it tells the issue is due to partition of the db table. How to handle this?
How to go to the older version for a mapping?
What are connected or unconnected transformations?
Explain about cumulative Sum or moving sum?
What are the different clients of powercenter?