> #### How to create a MongoDB data source

> 1 | In Data Explorer, right-click Data Sources, then choose New Data Source.

> 2 | In New Data Source, specify the following information:

> 1 | Select MongoDB Data Source from the list of data source types.

> 2 | In Data Source Name, type a name for the data source.

> 3 | Choose Next.

> 3 | In New MongoDB Data Source Profile, specify the properties to connect to your MongoDB database instance. Choose Mongo Database URI Elements to specify the elements of the URI individually, or choose Mongo Database URI to type the URI string.

> | If you choose Mongo Database URI Elements, provide values for the following properties:

> | Server Host: The IP address of the database server to which to connect.

> | Server Port: The port on which the database server listens for requests. The default value is 27017.

> | Database Name: The name of the database from which to retrieve data.

> | User Name and Password: User authentication is required only when the MongoDB process is run in a secure mode. Username and password are optional when MongoDB is run without authentication in a trusted environment.

> | If you choose Mongo Database URI, type the URI string in the following format:

> mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[database][?options]]

> 4 | Optionally, enable one or both of the following properties:

> | Keep Socket Alive: When enabled, a MongoDB connection is kept alive through firewalls.

> | Consistent Request Session: When enabled, all database operations within an ODA connection use the same MongoDB connection, ensuring that they occur in a fixed order with predictable results.

> Figure 2-24 shows an example of properties to connect to a database instance in MongoDB.

> Figure 2-24 Connection properties for a MongoDB database

> 5 | Choose Test Connection. If the connection is successful, choose Finish. If the connection is unsuccessful, you must provide different values for the connection properties.

(c) Copyright Actuate Corporation 2013