Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
490 views
in Technique[技术] by (71.8m points)

talend , mongoDB connection

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.

  1. 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.
  2. The components will be zipped format , Unzip the same. In Talend Big data you will find the components in Component folder.
  3. 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
  4. 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.
  5. optional for few systems——>>> Inside index.xml add save index.xml
  6. Restart TOS

Then you will be able to use them as normal components.

Cheers!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...