August 15, 2023

Extracting director data from MongoDB – Docs for ESB 6.x

Extracting director data from MongoDB

  1. Double-click tMongoDBLookupInput to open its
    Component view.

    use_case-mongodblookupinput-spark_stream4.png

  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.

    use_case-mongodblookupinput-spark_stream5.png

  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.

Document get from Talend https://help.talend.com
Thank you for watching.
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x