Extracting director data from MongoDB - Cloud - 8.0

MongoDB

Version
Cloud
8.0
Language
English
Product
Talend Big Data
Talend Big Data Platform
Talend Data Fabric
Talend Real-Time Big Data Platform
Module
Talend Studio
Content
Data Governance > Third-party systems > NoSQL components > MongoDB components
Data Quality and Preparation > Third-party systems > NoSQL components > MongoDB components
Design and Development > Third-party systems > NoSQL components > MongoDB components
Last publication date
2024-02-20

Procedure

  1. Double-click tMongoDBLookupInput to open its Component view.
  2. Click the [...] button next to Edit schema to open the schema editor.
  3. Click the [+] button to add the schema columns as shown in this image.
  4. In the Collection field, enter the name of the collection from which tMongoDBLookupInput extracts data.
  5. In the Query field, enter the following query."{'person.id':" + row2.directorID +"}"
    In this statement, row2 represents the main flow to tMap and row2.directorID the directorID column of this flow. You need to adapt this row2 to the label of the main flow link in your Job.
    The whole statement means to select every record in which the id field within the person field has the same value as this directorID column.
    The example above shows how to use the schema of the main flow to construct the SQL statement to load only the matched records into the lookup flow. This approach ensures that no redundant records are stored in memory before being sent to tMap.
  6. In the Mapping table, the id and the name columns have been automatically added. Enter, within double quotation marks, person in the Parent node path column for each row.
    This table defines how the hierarchical construct of the data from MongoDB should be interpreted in order to fit the schema of tMongoDBLookupInput.