About cookies on this site Our websites require some cookies to function properly (required). In addition, other cookies may be used with your consent to analyze site usage, improve the user experience and for advertising. For more information, please review your options. By visiting our website, you agree to our processing of information as described in IBM’sprivacy statement. To provide a smooth navigation, your cookie preferences will be shared across the IBM web domains listed here.
Product Documentation
Abstract
JDBC Connector has been certified to connect to MongoDB Database. To use this Connectivity, the latest Datadirect JDBC MongoDB driver must be used (ISmongodb.jar)
As MongoDB is a NoSQL database, the user needs to define or correctly map the fields with the correct data type so that JDBC Connector can operator on those fields with the metadata specified. In order to automate this process, DataDirect has come up with a tool called schematool which samples the collections in the MongoDB database and maps the fields to the most reasonable data type.
Content
Configuring the JDBC Driver Configuration File for MongoDB database
The file "isjdbc.config" is the configuration file which is used for the JDBC connector. This file is available or needs to be created if not already present at the location "<IS-Server-Installation>/Server/DSEngine"
The following entries need to be added (or appended to the already existing entries ) to the file
CLASSPATH=<IS-Server-Installation>/ASBNode/lib/java/ISmongodb.jar:$CLASSPATH
CLASS_NAMES=com.ibm.isf.jdbc.mongodb.MongoDBDriver
CLASSPATH specifies the location of the JDBC Driver for MongoDB database. CLASS_NAMES specifies the class file that needs to be loaded by the JDBC Connector for connecting to the Database
URLs to be used for connecting to MongoDB using the JDBC Connector by Datadirect JDBC MongoDB drivers
When the application is reading the data, the following properties need to be specified
jdbc:ibm:mongodb://<MongoDBServer>:<PortNo>;DatabaseName=<DatabaseName>;SchemaMap=<SchemaMap name>
for example
jdbc:ibm:mongodb://<MongoDBServer>:27017;DatabaseName=testdb;SchemaMap=/tmp/SchemaMaps/testMongoDB/schema.config
When the application is writing the data, the following properties need to be specified
jdbc:ibm:mongodb://<MongoDBServer>:<PortNo>;DatabaseName=<DatabaseName>;ReadOnly=false
for example
jdbc:ibm:mongodb://<MongoDBServer>:27017;DatabaseName=testdb;ReadOnly=false
Additional details on the connection options of the driver can be found in Progress DataDirect for JDBC for MongoDB Connection Property Descriptions Page
Important Note
The entry “REFRESH MAP” needs to be added to the 'Before SQL Statement' job property, to be used when the tables are created in the KeySpace, once the SchemaMap has been created.
The user executing the job should have the permissions on the directory containing the config files for SchemaMap
[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSZJPZ","label":"IBM InfoSphere Information Server"},"Component":"JDBC Connector","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"11.5, 11.7","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]
Was this topic helpful?
Document Information
More support for:
IBM InfoSphere Information Server
Software version:
11.5, 11.7
Operating system(s):
AIX, Linux, Windows
Document number:
720131
Modified date:
06 September 2018
UID
ibm10720131
Manage My Notification Subscriptions