talend , mongoDB connection

你。 提交于 2019-12-19 11:43:32

问题


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.

  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!




回答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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!