You are here: Processor Library > Transformation > Merge Attributes

Merge Attributes

The Merge Attributes processor allows you to merge together a number of attributes into a single attribute, by selecting the first non-empty value from a number of input attributes.

Use

Use Merge Attributes:

A number of attributes may all be mapped to the same merged attribute, in order. Merge Attributes will perform selections for each record, picking the first non-empty (that is, Null, or consisting only of whitespace characters) value from this ordered list of attributes.

So, for example, if you have an original firstname attribute, and checked it contains a valid Forename using a List Check, you might apply a fix (for example, using the Replace processor) only on the invalid records. You therefore might have two attributes that you wish to merge to a single MergedFirstname attribute. The Merge Attributes processor allows you to do this, by selecting the first non-empty value, considering a number of attributes in order, for example:

  1. Select the fixed name (firstname.Replaced), if it is not empty;
  2. Select the original name (firstname), if the fixed name is empty (which it will be for all the records that were not fixed);

It is possible to create a number of merged attributes in a single Merge Attributes processor.

For example, if you have applied fixes to the values for a title attribute in the same way as above, you might want to create both MergedFirstname and MergedTitle in the same processor. See the following diagram that shows how Merge Attributes may be configured to do this:

Note that title.replaced is above title in the above dialog, indicating that its value will be selected if it is not empty/Null. The same applies for firstname.replaced and firstname.

Configuration

Inputs

Any attributes that you wish to merge together to create a new attribute. Attributes that are used for selection to create a new Merged Attribute must share the same data type (String, Number or DATE).

To map input attributes to create a new merged attribute, select the attributes you wish to merge on the left-hand side, and use the Merge button:

 

Note that the merged attributes, on the right-hand side of the dialog, are named Merged, Merged.1, Merged.2, and so on, by default. Double-click on the name of the merged attribute to rename it as you wish (for example, MergedFirstname above).

Use the up and down arrow buttons on the dialog to change the order of selection of the input attributes within each merged attribute.

Note regarding the use of the latest version of Input Attributes with the Merge Attributes processor (Click to expand)

It is not possible to input the latest version of an attribute with Merge Attributes if there are conflicting attributes that could both be considered to be the latest version of the attribute, for any of the input records.  The latest version of an attribute is indicated by the blue arrow icon .

For example, in the following process, all records have conflicting transformations of the SURNAME attribute (SURNAME.Denoise and SURNAME.Upper), so the latest version of SURNAME is ambiguous for all records:

 

In this case, you must input the actual attribute names (that is, Surname.Upper and Surname.Denoise) that you wish to use when merging.

Similarly, if a transformation is applied to some records and not others, as in the main example, the latest actual attribute is different for the transformed and untransformed records, and therefore cannot be used.

If both prior processing paths exist when you add and configure the Merge Attributes processor, you will simply not see the latest attributes that you cannot use. However, it is possible to configure a Merge Attributes processor and later invalidate it by adding upstream transformations of input attributes. If this happens, the Merge Attributes processor will appear in the errored state. You can correct it by removing the invalid input, and adding the appropriate actual attribute name.

Options

Option

Type

Purpose

Default Value

Select empty strings

Yes/No

Determines whether or not empty strings are selected when merging attributes. If set to Yes, an attribute value will only not be selected if it is Null, or if no attribute value exists (for example, the attribute was added on a stream the record did not go down)

No

Outputs

Data attributes

Data attribute

Type

Purpose

Value

The new merged attributes as named in the Inputs tab

Added

New attributes containing values merged from the configured input attributes

Selected as the first not null value from the ordered input attributes

Flags

None

Execution

Execution Mode

Supported

Batch

Yes

Real time Monitoring

Yes

Real time Response

Yes

Results Browsing

The Merge Attributes processor produces no summary view of its results. Use the Data View to check that the configured merge selections are working as expected.

Output Filters

None

Example

In this example, replacements to title and firstname values have been applied to a subset of records (with Titles and Names that were not recognized as valid in list checks). The replaced values are used where available. Where not available, the original values for title and firstname are used:

After the attributes have been merged, you may wish to re-check the merged attributes - for example, to ensure that MergedFirstname and MergedTitle in the example above now both contain valid data.

Oracle ® Enterprise Data Quality Help version 9.0
Copyright © 2006,2011 Oracle and/or its affiliates. All rights reserved.