Importing data from a CSV file - 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 the first 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 database to import data to, bookstore in this example.
  5. In the Collection field, type in the collection to import data to, books in this example.
  6. Select the Drop collection if exist check box to remove the specified collection if it already exists.
  7. Browse to the desired data file from which you want to import data. In this example, it is D:/Input/books.csv, which is a standard CSV file containing four columns: id, title, author, and category.id,title,author,category 1,Computer Networks,Larry Peterson,Computer Science 2,David Copperfield,Charles Dickens,Language&Literature 3,Life of Pi,Yann Martel,Language&Literature
  8. Select CSV from the File type list.
  9. Select Insert from the Action on data list.
  10. Select the First line is header check box to use the first line in the CSV file as a header.
  11. Select the Ignore blanks check box to ignore the blank fields (if any) in the CSV file.