Semarchy Lookup enricher
The Semarchy Lookup enricher performs a data lookup on a mapping table.
Description
This enricher performs a data lookup on a mapping table accessed via a datasource.
The mapping table is located in a datasource provided using the Datasource parameter, which defaults to the data location’s datasource. The mapping table is declared to the enricher:
-
By giving a Mapping Table as well as a Lookup Column and a list of (up to 20) Output Columns from this table. The input lookup value is searched in the Lookup Column and the corresponding values from the Output Columns are returned.
-
By giving a Custom SQL select statement executed on the datasource, which must return columns aliased
LOOKUP_COLUMN
andOUTPUT_COLUMN1, …, OUTPUT_COLUMN20
. These columns will be used as the lookup and output columns.
You must either set Mapping Table, Lookup Column and Output Columns, or only set Custom SQL. The Mapping Table, Lookup Column, and Output Columns parameters are mandatory unless the Custom SQL parameter is set instead. |
The lookup is performed on the mapping table with an optional memory cache configured with the Cache Lookup Data parameter.
When a null value is passed as the Lookup Value or when the lookup finds no matching value in lookup column, the enricher returns the Fallback Value or the Lookup Value, depending on the Fallback Behavior parameter.
The lookup value expected and output values emitted by this plugin are string values. Any other datatype passed as the input should be converted to a string using SemQL, and outputs should be mapped to string attributes. Output values mapped to non-string output attributes rely on the database implicit conversion, which may give unexpected results. |
This plugin is thread-safe and supports parallel execution. |
Plugin parameters
The following table lists the plugin parameters.
Parameter name | Mandatory | Type | Description | ||
---|---|---|---|---|---|
Cache Lookup Data |
No |
String |
Use this parameter to optionally use a memory cache for the lookup process. Possible values are:
|
||
Custom SQL |
No |
String |
Leave this parameter empty to use a generated SQL query. Use this parameter instead of Mapping Table, Lookup Column and Output Columns to define the lookup dataset with a select statement in the following form:
The number of
|
||
Datasource |
No |
String |
Name of datasource containing the lookup data. This datasource must be configured in the platform. If this parameter is not defined, the enricher uses the data location datasource. |
||
Fallback Behavior |
No |
String |
Behavior when the lookup value is not found in the lookup column. Possible values are:
|
||
Fallback Value |
No |
String |
Value to return if the lookup value is not found in the lookup column. Default value: |
||
Lookup Column |
No |
String |
Physical name of the column containing the lookup values. Default value: |
||
Mapping Table |
No |
String |
Physical name of the mapping table containing the lookup and output columns. Default value: |
||
Output Columns |
No |
String |
Comma-separated list of the physical names of the columns containing the values returned by the enricher. Default value:
|