August 15, 2023

Writing data to MongoDB – Docs for ESB 6.x

Writing data to MongoDB

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

    use_case-mongodbinput_spark_batch5.png

  2. If this component does not have the same schema of the preceding
    component, a warning icon appears. In this situation, click the Sync columns button to retrieve the schema from the
    preceding one and once done, the warning icon disappears.
  3. In the Collection field, enter the name of
    the collection to which you need to write data. If this collection does not
    exist, it will be automatically created at runtime.
  4. From the Action on data list, select the
    operation to be performed on the data. In this example, select Insert, which creates documents in MongoDB whether
    these documents already exist or not and in either case, generates a new
    technical ID for each of the new documents.
  5. In the Mapping table, the id and the name
    columns have been automatically added. You need to define how the data from
    these two columns should be transformed into a hierarchical construct in
    MongoDB.

    In this example, enter, within double quotation marks, person in the Parent node path
    column for each row. This way, each director record is added to a node called
    person. If you leave this Parent node path column empty, these records are added to
    the root of each document.

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