Feature available in version 2.5.6_HF1


Similar to the "lookup values in an external datasource", this mapping maps the value of a field in a MongoDB collection. To do the enrichment, a connection string, database, collection, username, password and query need to be defined.


Attribute

Required

Description

from

Y

Defines the field name before mapping.

to

Y

Defines the field name after mapping.

precedence

Y

Defines the precedence used when mapping.

Function

Y

Defines the type of mapping. Needs to be "MongoDB Enrichment".

Function typeYDefines the function type of the mapping. Needs to be "Enrichment/lookup functions"

connection string

Y

Defines the connection string to the database.

userNMongoDB user. Leave blank if the MongoDB doesn't require authentication.
passwordNMongoDB user's password. Leave blank if the MongoDB doesn't require authentication.
DatabaseYName of the database to connect to.
CollectionYName of the collection to extract data from.

query

Y

Query to be executed.

projectionNDetermines which field/s from the result to select in the output. Leave blank to get all fields.

The $value placeholder will get replaced with the value of the from field in the message.

In the following example a customer name is searched by id. The customer id value is replaced in the query to extract the customer name from the database.