Wednesday, February 27, 2008

OWB - table upsert mapping

Error:

VLD-2750: Missing update matching criteria in YOUR_DIM Match by Constraint is set to all constraints or a specific constraint for YOUR_DIM, then all mapped attributes of this constraint will be included in the WHERE clause in the UPDATE statement. If there is no constraint on the target, or none of the constraint attributes are mapped, set Match by Constraint to no constraints for YOUR_DIM, and define the match condition on the attributes of the target

Solution excerpted from Oracle forums:

When you use a surrogate key (eg. generated with a sequence, presumably for
a slowly changing dimension) you also have to define a unique natural key on
your target table, and use the natural key for matching/updating.

If you change your target table columns or constraints after the operator
was put on the mapping canvas, there is a possibility that OWB doesn't change
the "Loading Properties" correspondingly. To fix this;

1) first finish up your constraints work, then
2) set operator property "Match by constraint" to "No constraints", then
3) check column attribute properties "Loading Properties" for all
columns;
a) columns being part of the unique natural key should have "Load column when
Updating Row" set to "No", other columns should normally have this property set
to "Yes"

b) the "Match Column ...." properties should be set to "Yes" if part of the
natural key, "No" otherwise

c) "Load column when Inserting Row" should normally be "Yes".

4) Finally, you can change the operator property "Match by constraint" from
"No constraints" to your natural key

No comments: