MongoDB Connector > Mappings and mapping tasks with MongoDB > MongoDB lookups in mapping tasks
  

MongoDB lookups in mapping tasks

You can create lookups for objects in a MongoDB connection. You can retrieve data from a MongoDB lookup object based on the specified lookup condition.
When you configure a lookup in MongoDB, you select the lookup connection and lookup object. You also define the behavior when a lookup condition returns more than one match.
You can create the following lookups when you configure field mappings in a mapping task:
For more information about the Lookup transformation, see Transformations in the Data Integration documentation.
The following table describes the MongoDB lookup object properties that you can configure in a Lookup transformation:
Property
Description
Connection
Name of the lookup connection.
Source Type
Type of the source object.
You can select one of the following options:
  • - Single Object
  • - File List
  • - Command
  • - Parameter
Lookup Object
Name of the lookup object for the mapping.
Multiple Matches
Behavior when the lookup condition returns multiple matches.
You can select one of the following options:
  • - Return first row
  • - Return last row
  • - Return any row
  • - Return all rows
  • - Report error
You can set the tracing level in the advanced properties to determine the amount of detail that appears in the logs.
The following table describes the tracing levels that you can configure:
Property
Description
Terse
The Secure Agent logs initialization information, error messages, and notification of rejected data.
Normal
The Secure Agent logs initialization and status information, errors encountered, and skipped rows due to transformation row errors. Summarizes session results, but not at the level of individual rows.
Verbose Initialization
In addition to normal tracing, the Secure Agent logs additional initialization details, names of index and data files used, and detailed transformation statistics.
Verbose Data
In addition to verbose initialization tracing, the Secure Agent logs each row that passes into the mapping. Also notes where the Secure Agent truncates string data to fit the precision of a column and provides detailed transformation statistics.
When you configure the tracing level to verbose data, the Secure Agent writes row data for all rows in a block when it processes a transformation.