MongoDB connection?

Is there a way to get data from MongoDB using clover?
Or should I use MongoDB JDBC driver?

Hi timson21,

yes, there is currently no such component. You can use:

DBInputTable and JDBC driver as you wrote.

OR

HttpConnector and JsonReader (available since 3.3.0M2) to access data via REST HTTP mongo interface (http://www.mongodb.org/display/DOCS/Http+Interface)

DBInputTable and JDBC driver as you wrote.

“kubosj”

Is it possible to use Mongo JDBC driver in community edition?

You can also use native Mongo connector library to access the Mongo database from Java (tutorial available at http://www.mongodb.org/display/DOCS/Java+Tutorial), get data as json documents and read those using JSONReader in CloverETL 3.3.0.M2.

Please find attached proof-of-concept. I am using

  • Reformat as a wrapper component for reading data from MongoDB using class com.javlininc.MongoDBWriter

  • Denormalizer as a wrapper component for reading data from MongoDB using class com.javlininc.MongoDBReader

Please note that the attached implementation is just a proof of concept; when implemented properly, you would probably parametrize the code so that you can supply queries to it from outside, create separate connection rather than instantiating it directly in the component and you would also implement your own component for MongoDbReader and MongoDbWriter.