问题
I am facing a problem with mongo DB connection.
I have succefully imported tMongo components it to my Talend Open Studio 5.1.1 and by copying the mongo 1.3.jar file to lib/java folder, my Mongo DB jobs are running successfully, but the problem is even if I provide some fake server path(IP) and fake port for mongoDB, my job is running without an error and it is giving me 1 row with no data. and same goes with right IP and port.
How do I resolve it.
回答1:
I think the connection is not working. As you must be knowing, mongoDB checks that the connection is actually working or not when you perform a query on it. (Yeah, it doesn't check for a successful connection when you just connect to it ).
I would suggest to instead add the mongoDB components present in Talend for Big Data by following the steps below: Components provided for MongoDB are : tMongoDBInput, tMongoDBOutput, tMongoDBConnection etc.
- Or you can Download the components from http://www.talendforge.org/exchange/ and search for Mongo instead of using Talend Big Data. But I would suggest use Talend for big Data for it.
- The components will be zipped format , Unzip the same. In Talend Big data you will find the components in Component folder.
- Copy these Unzipped Components to the installation Path of TOS. C:TalendTOS_DI-Win32-r84309V5.1.1pluginsorg.talend.designer.components.localprovider_5.1.1.r84309components
- Copy the mongo-1.3.jar file in the component folder into the C:TalendTOS_DI-Win32-r84309-V5.1.1libjava In many systems you might not be able to see this file then go with ADMINISTRATOR priviliges.
- optional for few systems——>>> Inside index.xml add save index.xml
- Restart TOS
Then you will be able to use them as normal components.
Cheers!
回答2:
The reason for the Job running without any error could be due to the connection / meta-data you have used for the Mongo Connector. It doesn't is not possible for the job to run without any error even after giving fakepath.
I guess you might configured (re-modified) the repository connection but using a built-in meta data for component.
来源:https://stackoverflow.com/questions/19182836/talend-mongodb-connection