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.

Procedure: How to Configure an Adapter

  1. From the Web Console sidebar, click Connect to Data.

    or

    From the Data Management Console, expand the Adapters folder.

    In the DMC, the Adapters folder opens. In the Web Console, the Adapters page opens showing your configured adapters.

  2. In the Web Console, click the New Datasource button on the menu bar and find the adapter on the drop-down list or, in the DMC, expand the Available folder if it is not already expanded.
    On the Web Console, you can select a category of adapter from the drop-down list or use the search option (magnifying glass) to search for specific characters.
  3. In the DMC, expand the appropriate group folder and the specific adapter folder. The group folder is described in the connection attributes reference.
  4. Right-click the adapter name and/or version and select Configure.

    The Add Adapter to Configuration pane opens.

  5. Enter values for the parameters required by the adapter, as described in the chapter for the specific adapter you want to configure.
  6. Click Configure. The configured adapter is added to the Adapters list in the DMC resources tree or the Configured list in the Web Console.
    In the Web Console, the adapter remains on the Available Adapters list with a check mark to indicate that at least one connection has been configured. You can configure additional connections from either the Configured or Available list by right-clicking the adapter and clicking Add Connection.

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. For sharded servers, the URL should contain the server names (and optional ports) in a comma-separated list.

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.

For more information on debugging and other additional options, see JDBC Driver for MongoDB on the UnityJDBC documentation page. Click the Connector Argument Details link to see the entire list.

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

Feedback