1.3.11.37 Select Array Element

The Select Array Element processor extracts a numbered element from one or more array attributes into a new attribute of the equivalent type.

Use this process to select a single element from an array for further processing. For example, if you have split the values in an attribute using Make Array from String into an array, you may use Select Array Element to extract the elements into new attributes.

The following table describes the configuration options:

Configuration Description

Inputs

Specify one or more Array attributes from which to select an array element.

Options

Specify the following options:

  • Array index: specifies the numbered element in the array that you want to select and extract. Specified as a Number Default value: 1.

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

Outputs

Describes any data attribute or flag attribute outputs.

Data Attributes

The following data attributes are output:

  • ArrayElement: holds the selected array element.

Flags

None.

The Select Array Element transformer presents no summary statistics on its processing.

In the Data view, the input array attribute is shown with the new array size attribute to its right.

Output Filters

None. All records input are output.

Example

In this example, Select Array Element is used to extract the first element from a NAME array into a new attribute:

Array (asc) ArrayElement

{ 1 King Edward Road,}{Brentwood}{Essex}{CM14 4HG}

1 King Edward Road,

{ 1-3 Dufferin St,}{LONDON}{}{EC1Y 8NA}

1-3 Dufferin St,

{ 1-5 Call Lane,}{ Leeds}{ West Yorkshire}{LS1 7DM}

1-5 Call Lane,

{ 10 Ballater Street,}{Glasgow}{G5 9PS}{}

10 Ballater Street,