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?
Hi,
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 :
https://tech.knime.org/forum/knime-general/mongodb-reader
- 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 ?
Download
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
<dependency>
<groupId>org.jongo</groupId>
<artifactId>jongo</artifactId>
<version>1.3.0</version>
</dependency>
Thanks for helping.
Thierry