Map Values Component

Map Values Component

Conditionally replaces one value with another in the data

As the data is passed through the component rules are applied to specified columns to replace one value with another. Like the Fixed Flow component this can be used introduce mappings into the data for example mapping a non descriptive code to a more human readable name.

Properties

Property Setting Description
Name Text The descriptive name for the component.
Value Map Input Column The name of the column output from the previous component used for comparison
Qualifier Is or Not used to invert the filter if required
Comparator Less than (default) – Value in the Input Column must be less than that specified in the Comparison Value Column.
Less than or equal to – Value in the Input Column must be less than or equal to that specified in the Comparison Value Column.
Equal to – Value in the Input Column must be equal to that specified in the Comparison Value Column.
Greater than (default) – Value in the Input Column must be greater than that specified in the Comparison Value Column.
Greater than or equal to – Value in the Input Column must be greater than or equal to that specified in the Comparison Value Column.
Like – Case sensitive match of the value in the Input Column and the pattern in the Comparison Value Column.
ILike – Case insensitive match of the value in the Input Column and the pattern in the Comparison Value Column.
Similar to – Matches the value in the Input Column with a SQL standard regular expression pattern in the Comparison Value column.
(see redshift documentation for expression syntax)
Null – Checks if the value of the Input Column is the sql ‘null’ value.
Blank – Checks if the value of the Input Column is an empty string.
Null or blank – Checks if the value of the Input Column is either an empty string or the sql ‘null’ value.
Comparison Value A value entered by the user to use for comparison.
Then Value A value entered by the user that will be added to the data when the comparison is matched
Other Text/Number/Datetime A value entered by the user when none of the conditions are matched.
Column Name Text The name of the output field that will be passed to subsequent components

Strategy

Generates a select statement with a case statement in-line.

Example

This example uses the airport code to map the airport's full name onto the data set.

Note: this achieves the same thing as the example on the Fixed Flow component but without the join.


The component properties are set up as below.

The Value Map is set up with the 5 mapped airports in-line.

The Sample data shows the new column added.