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 within a specified datasource.
The mapping table is accessed via the Datasource parameter, which defaults to the datasource of the data location. It is defined for the enricher in one of two ways:
-
Using a mapping table: specify a mapping table, a lookup column, and up to 20 output columns from the table. The input lookup value is searched in the lookup column, and corresponding values from the output columns are returned.
-
Using a custom SQL query: provide a custom SQL
SELECT
statement that runs on the datasource. The query must return columns aliased asLOOKUP_COLUMN
for the lookup column andOUTPUT_COLUMN1, …, OUTPUT_COLUMN20
for the output columns.
You must configure either the Mapping Table, Lookup Column, and Output Columns parameters, or the Custom SQL parameter exclusively. The Mapping Table, Lookup Column, and Output Columns parameters are mandatory unless the Custom SQL parameter is specified. |
The lookup operation can use an optional memory cache, configured via the Cache Lookup Data parameter.
When the input lookup value is null or no matching value is found in the lookup column, the enricher returns either the fallback value or the lookup value, depending on the Fallback Behavior parameter.
The enricher expects string values as input lookup values and emits string values as outputs. Non-string input values must be converted to strings using SemQL. Outputs must be mapped to string attributes, as mapping to non-string attributes relies on implicit database conversions, which may produce 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 |
Configures an optional memory cache for the lookup process. Possible values are:
|
||
Custom SQL |
No |
String |
Defines the lookup dataset using a custom SQL query instead of the Mapping Table, Lookup Column, and Output Columns parameters. Leave this parameter empty to use a generated query. The query must follow this structure:
The query can define up to 20 output columns (
|
||
Datasource |
No |
String |
Name of datasource containing the lookup data. This datasource must be configured in the platform. If not specified, the enricher uses the datasource in the data location. |
||
Fallback Behavior |
No |
String |
Defines the behavior when the lookup value is not found in the lookup column. Possible values are:
|
||
Fallback Value |
No |
String |
The value to return if the lookup value is not found in the lookup column. Default: |
||
Lookup Column |
No |
String |
The physical name of the column containing lookup values. Default: |
||
Mapping Table |
No |
String |
The physical name of the mapping table containing lookup and output columns. Default: |
||
Output Columns |
No |
String |
A comma-separated list of the physical names of the columns containing values returned by the enricher. Default:
|