• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » MongoDB - How I set up a connection for extraction

#1 2012-04-07 18:03:12

geuder
Member
Company: Mojang
Registered: 2011-10-19
Posts: 92
Website

MongoDB - How I set up a connection for extraction

Tags: [how-to, input, mongodb]

Hi

By request from @carbone I'm posting this summary of how I connected to a MongoDB for extracting data.


1) Downloaded the components from TalendForge web: http://www.talendforge.org/exchange/?eid=286
   (Components are not availble through the in-app TalendForge Exchange)

2) Extracted the files and put each of the component's folders in:
   /plugins/org.talend.designer.components.localprovider_4.2.3.r67267

3) I also made a copy of mongo-1.3.jar from the component's folders an put it in:
    %TalendInstallationPath%\lib\java       (Thanks Pedro!)

4) Restart ToS.

5) Then I set up the test job with a tMongoDBConnection-component first, with
   - URL to server (within quotation marks)
   - Name of the database (within quotation marks)
   - Port (without quotation marks!)

6) Next I pulled in the tMongoDBInput-component and connected it to the Connection-component with a OnComponentOK-connection.

7) In the basic settings of tMongoDBInput-component I,
   - checked: "Use Existing Connection", and choose the tMongoDBConnection from drop list
   - entered name of the collection i wanted to query (within quotation marks)
   - Left query empty to get what ever
   - and set a limit to not get drowned with data

8) And set up the Schema (Edit Schema) of the tMongoDBInput-component, where each column is the keys of the key-value-pairs of the chosen mongodb collection.

9) Then, for testing, I connected the input component to a tLogRow, and ran it.


Cheers & good luck,

/Geuder

Offline

#2 2012-04-09 05:48:30

pedro
Member
Registered: 2011-11-17
Posts: 3682

Re: MongoDB - How I set up a connection for extraction

Hi Geuder

Great! Thanks for your feedback! wink

Regards,
Pedro


Only Paranoid Survive.

Offline

#3 2012-06-28 10:53:04

edwinlima
New member
Registered: 2011-06-10
Posts: 1

Re: MongoDB - How I set up a connection for extraction

Hi,

I'm trying to use talend to insert records into MongoDb. I'm reading a flat file with records in JSON format but no matter what I do, I can't see the MongoDB Connection in the drop list of the MongoDbOutput. I've followed the same procedure described here but it doesn't work, any tips?

Thanks in advance.

Edwin Lima

Offline

#4 2013-02-20 23:01:14

Jayanchoudary
Guest

Re: MongoDB - How I set up a connection for extraction

What components I got to extract from the URL that you mentioned in Step 1. Please advice.

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » MongoDB - How I set up a connection for extraction

Board footer

Powered by FluxBB