1.3.4.9.21 Match Transformation: Select Array Element

The Select Array Element matching transformation allows you to select an individual array element from any position in an array, to use when clustering or comparing values.

This works in exactly the same way as the main Select Array Element processor, but may be useful within matching, if you need to cluster on, or compare using, a word that is in a given position within a value (for example, the last word, or the second word).

Use the Select Array Element matching transformation when you want to cluster on, or compare, a word that is in a distinct position within a value, such as the second or third word. Use Make Array from String to split up the value into an array of many words, and then Select Array Element to extract the word that you require according to its position.

The following table describes the configuration options:

Configuration Description

Options

Specify the following options:

  • Index position: specifies the numbered element in the array that you want to select and extract. Type: Integer. Default value: 1.

  • Count from end?: determines whether or not to count from the end of the array attribute rather than from the beginning. Type: Yes/No. Default value: No.

Example

In this example, the Select Array Element transformation is used to compare the last word (where words are separated by spaces) of a Town identifier. The attribute mapped to the Town identifier is known to contain some values where the town is prefixed by other address information (for example, '11 Grange Road, Cambridge')

Example configuration

Two transformations are added on the Town identifier as part of a comparison, configured as follows:

1. Make Array from String

  • Delimiter characters: Space and Comma

2. Select Array Element

  • Index position: 1

  • Count from end?: Yes

Example transformations

The following table shows examples of transformations using the above configuration:

Table 1-94 Example Transformations for Select Array Element

Value Value after Make Array from String Value after Select Array Element

11 Grange Road, Cambridge

1 - 11

2 - Grange

3 - Road

4 - Cambridge

Cambridge

Hardwick, Cambridge

1 - Hardwick

2 - Cambridge

Cambridge

London

1 - London

London

11 London Road, Hertford

1 - 11

2 - London

3 - Road

4 - Hertford

Hertford

Cambridge

1 - Cambridge

Cambridge