Importing data from a JSON file - 7.3

MongoDB

Version
7.3
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-21

Procedure

  1. Double-click the second tMongoDBBulkLoad component to open its Basic settings view in the Component tab.
  2. In the MongoDB directory field, type in the MongoDB home directory. In this example, it is D:/MongoDB.
  3. In the Server and Port fields, fill in the information required for the connection to MongoDB. In this example, type in localhost and 27017.
  4. In the Database field, type in the target database to import data, bookstore in this example.
  5. In the Collection field, type in the target collection to import data, books in this example
  6. Browse to the desired data file from which you want to import data. Here, select books.json.{ "id": "4", "title": "Les Miserables", "author": "Victor Hugo", "category": "Language&Literature" } { "id": "5", "title": "Advanced Database Systems", "author": "Carlo Zaniolo", "category": "Database" }
  7. Select JSON from the File type list.
  8. Select Insert from the Action on data list.
  9. Click the Advanced settings tab to define the additional arguments as needed.

    In this example, add the argument " --jsonArray" to accept the imported data within a single JSON array.