Configuring the components - 7.0

MongoDB

author
Talend Documentation Team
EnrichVersion
7.0
EnrichProdName
Talend Big Data
Talend Big Data Platform
Talend Data Fabric
Talend Open Studio for Big Data
Talend Real-Time Big Data Platform
task
Data Governance > Third-party systems > Database components > MongoDB components
Data Quality and Preparation > Third-party systems > Database components > MongoDB components
Design and Development > Third-party systems > Database components > MongoDB components
EnrichPlatform
Talend Studio

Procedure

  1. Double-click tMongoDBConnection to open its Basic settings view.
  2. From the DB Version list, select the MongoDB version you are using.
  3. In the Server and Port fields, enter the connection details.
  4. In the Database field, enter the name of the MongoDB database.
  5. Double-click tMongoDBInput to open its Basic settings view.
  6. Select the Use existing connection option.
  7. In the Collection field, enter the name of the collection, namely blog.
  8. Click the [...] button next to Edit schema to open the schema editor.
  9. Click the [+] button to add five columns, namely id, author, title, keywords and contents, with the type as Integer and String respectively.
  10. Click OK to close the editor.
  11. The columns now appear in the left part of the Mapping area.
  12. For columns author, title, keywords and contents, enter their parent node post so that the data can be retrieved from the correct positions.
  13. In the Query box, enter the advanced query statement to retrieve the posts whose author is Anderson:
    "{post.author : 'Anderson'}"
    This statement requires that the sub-node of post, the node author, should have the value "Anderson".
  14. Double-click tLogRow to open its Basic settings view.
    Select Table (print values in cells of a table) for a better display of the results.