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 might you approve all mappings in the archive all the while?
what is the Default Source Option For Update Strategy Transformation?
How many input parameters can exist in an unconnected lookup?
What is rank transformation in informatica
explain any diffcult scenario that u have faced in your experience... or explain any complex maping u have developed?
Informatica settings are available in which file?
How are indexes created after completing the load process?
what is the -ve test case in your project.
Mention few power centre client applications with their basic purpose?
What is meant by LDAP users?
What is a joiner transformation and why it is an active one?
is it possible to index the data in cache of lkp transformation ?
I have worked on Informatica 7.1.1. I want to know the answer for the below question. Target is not created initially.Then how to take the DDL script from the source and run the Mapping by creating the Target dynamically?Is it possible by SQL Transformation?
What is dynamic cache?
Design a mapping to load a target table with the following values from the above source?