Skip to main content

Lookup values in an external datasource

The Lookup values in an external datasource (SqlQueryMapping) mapping is used to execute a parameterized SQL query against an external database using a value from the incoming message. This mapping allows you to enrich the message with data fetched from a database.

Required Attributes

AttributeRequiredDescription
fromYField in the message whose value will be used as the SQL parameter.
toYField where the result of the query will be stored.
Function typeYMust be "Enrichment/lookup functions".
FunctionYNeeds to be "lookup values in an external datasource"
connectionstringYJDBC connection string to the target database.
userNUsername for database authentication.
passwordNPassword for database authentication.
queryYSQL query with a single ? placeholder for the parameter.

Note: The SQL must contain exactly one ? placeholder, which will be replaced by the value from de from field at runtime.