Querying MongoDB with C# in Knime

I am able to query MongoDB by creating a program with Visual Studio in C#.  Can I query MongoDB with C# code in Knime or do I need to do that using Jongo?


Since you need Mono to run C# applications on Mac OS and Linux, KNIME does not support running C#-Code. To access a MongoDB database you can use one of our MongoDB nodes (MongoDB Reader, Writer, Save, Delete, Update). These nodes internally use Jongo to access a MongoDB instance. If you need to do fancier stuff you can also use the Jongo Jar within a Java Snippet node.

Regards, Alexander

Hello AlexanderFillbrunn,

Could you give more information about "to use Jongo to access a MongoDB instance"

With the Mongodb Node (Reader), there is a problem closing the connection :


- Do we have to install Maven to add a Maven dependency for Jongo ? And how to make a dependency in Knime ?

- Which jarfile do I have to download and install ?


Jongo relies upon Jackson 2.7.3, Bson4Jackson 2.7.0 and Mongo Java Driver 3.0+. Its Maven dependency, an OSGI compliant jar, comes with the first two, you have to provide a dependency to the driver.
Jongo is deployed into OSS Sonatype (Maven repository hosting service for open source projects).
Add the following dependency to your pom.xml

Thanks for helping.