Double-click tMongoDBOutput to open its
- 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.
- 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.
- 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.
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
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.