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
What is domain and gateway node?
what is the -ve test case in your project.
How can we store previous session logs?
What are the different types of transformation available in informatica.
Explain lookup transformation source types in informatica
How to join three sources using joiner? Explain though mapping flow.
Explain the shared cache and re-cache?
What is an Integration service in Informatica?
In warehouses how many schemas are there?
What is informatica? Why do we need it?
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?
What is dimensional table? Explain the different dimensions.
How does a rank transform differ from aggregator transform functions max and min?
What do you understand by SOA of Informatica?
write sql query vertical to horiozontal following table id name 1 100 2 dinesh 3 india 1 101 2 suresh 3 india 1 103 2 prakesh 3 usa i want output like id name country 100 dinesh india 101 suresh india 103 prakesh usa