Due to duplicate rows in the source, encountering primary key violation errors on the target table is a common issue encountered when running PowerCenter sessions. You can use a Lookup transformation to find duplicate data in a target based on a key field (or a composite key). This works when comparing source rows to rows already existing in the target table. But this technique does not entirely work when the source contains duplicate rows which do not exist in the target already.
You may attempt to use an uncached Lookup against the target and set the target commit interval to one so that the target table is queried for each row. Because of the way in which the PowerCenter Server processes rows (as described at the end of this article ), this approach does not work.
Even if this method worked, it would be very inefficient and performance would be severely affected.
The following examples demonstrate some of the most efficient ways to deal with duplicate source data.
文件名称
Handling duplicate rows using a PowerCenter mapping.doc