Configuring the Adapter for MongoDB

How to:

Reference:

Configuring the adapter consists of specifying connection and authentication information for each of the connections you want to establish.


Top of page

x
Procedure: How to Configure the MongoDB Adapter

You can configure the adapter from either the Web Console or the Data Management Console.

  1. From the Web Console menu bar, click Adapters.

    or

    From the Data Management Console, expand the Adapters folder.

  2. Expand the Available folder.
  3. Expand the SQL folder.
  4. Right-click MongoDB and click Configure.
  5. In the URL box, enter the URL used to connect to your MongoDB server. For more information, see MongoDB Adapter Configuration Settings.
  6. In the Driver Name box, enter:
    mongodb.jdbc.MongoDriver
  7. Enter User and Password, if needed.
  8. Click Test. You should see a list of data sources on your server.
  9. Click Configure.

Top of page

x
Reference: MongoDB Adapter Configuration Settings

The Adapter for MongoDB in under the SQL group folder.

Connection name

Logical name used to identify this particular set of connection attributes. The default is CON01.

URL

Is the URL to the location of the MongoDB data source.

The following is an example of the URL that is used to connect to your MongoDB server:

jdbc:mongo://server:27017/database?rebuildschema=true

where:

server

Is the DNS name or IP address of the system where the MongoDB server is running. If it is on the same system, localhost can be used.

27017

Is the default port number MongoDB is listening on if not specified when MongoDB is started. This value is optional.

database

Is the database name to connect to.

?rebuildschema=true

Indicates that the metadata store or schema should be rebuilt on every connection to the server. This parameter can be removed when the metadata is static for faster connection to the server.

Driver Name

Is the name of the JDBC driver, for example, mongodb.jdbc.MongoDriver

IBI_CLASSPATH

Defines the additional Java Class directories or full-path jar names which will be available for Java Services. Value may be set by editing the communications file or in the Web Console. Using the Web Console, you can enter one reference per line in the input field. When the file is saved, the entries are converted to a single string using colon (:) delimiters for all platforms. OpenVMS platforms must use UNIX-style conventions for values (for example, /mydisk/myhome/myclasses.jar, rather than mydisk:[myhome]myclasses.jar) when setting values. When editing the file manually, you must maintain the colon delimiter.

Security

There are two methods by which a user can be authenticated when connecting to a database server:

  • Explicit. The user ID and password are explicitly specified for each connection and passed to the database, at connection time, for authentication.
  • Password Passthru. The user ID and password received from the client application are passed to the database, at connection time, for authentication.
User

Primary authorization ID by which you are known to the data source.

Password

Password associated with the primary authorization ID.

Select profile

Select a profile from the drop-down menu to indicate the level of profile in which to store the CONNECTION_ATTRIBUTES command. The global profile, edasprof.prf, is the default.

If you wish to create a new profile, either a user profile (user.prf) or a group profile if available on your platform (using the appropriate naming convention), choose New Profile from the drop-down menu and enter a name in the Profile Name field (the extension is added automatically).

Store the connection attributes in the server profile (edasprof).


WebFOCUS