Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

MongoDB - How I set up a connection for extraction

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
😎 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
Labels (4)
5 Replies
Anonymous
Not applicable
Author

Hi Geuder
Great! Thanks for your feedback! 0683p000009MA9p.png
Regards,
Pedro
Anonymous
Not applicable
Author

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
_AnonymousUser
Specialist III
Specialist III

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

Anonymous
Not applicable
Author

please check my snapshot. I keep getting and error: could not load or find main class