Skip to main content
waffle.svg
Domo Knowledge Base

MongoDB SSH Connector

Version 4

 

Intro

MongoDB is an open-source document-oriented database system that stores structured data as JSON-like documents with dynamic schemas. Domo provides connectors that allow you to pull data from a MongoDB collection and compile custom reports. 

  • The MongoDB connector uses Java driver version 3.2.1, and supports Find and Aggregate query methods. You need to enter the Collection name manually in the MongoDB connector.
  • The MongoDB Advanced connector uses Java driver version 3.2.1, and supports a plain JSON query. You need to enter the Collection name manually in the MongoDB Advanced connector.
  • The MongoDB V2 connector uses Java driver version 3.12.1, and supports Find and Aggregate query methods. You can either select the Collection name from the drop down or enter it manually in the MongoDB V2 connector. Also, MongoDB V2 connector doesn’t require a CA certificate.
  • The MongoDB SSH Connector uses Java driver version 3.12.1, and supports Find and Aggregate query methods. You can either select the Collection name from the drop down or enter it manually in the MongoDB SSH connector. You need your SSH credentials (host, port, username, and password) to pull data from a MongoDB collection through an SSH tunnel.

This article discusses the MongoDB SSH Connector. You can use Domo's MongoDB SSH connector to pull data from a MongoDB collection through an SSH tunnel and compile custom reports. You indicate the data you want by inputting JSON query filter. For more information about the MongoDB API, go to http://api.mongodb.org/.

The MongoDB SSH Connector is a "Database" connector, meaning it retrieves data from a database using a query. In the Data Center, you can access the connector page for this and other Database connectors by clicking Database in the toolbar at the top of the window.

This topic discusses the fields and menus that are specific to the MongoDB SSH Connector user interface. For general information about adding DataSets, setting update schedules, and editing DataSet information, see Adding a DataSet Using a Data Connector.

Important: An SSL connection is required for this connector to work. 
 

Prerequisites

To connect to your MongoDB SSH account and create a DataSet, you must have the following:

  • The username and password you use to log into SSH Host

  • The SSH host you wish to tunnel through

  • The port number of your SSH host

  • The SSH private key or SSH password 

  • The username and password you use to log into your MongoDB database

  • The host name for the database server (e.g. db.company.com).

  • The port number for the database

  • The database name

Before you can connect to a MongoDB database, you must also whitelist a number of IP addresses on your database server on the port you want to connect to. For the full list of IP addresses, see Whitelisting IP Addresses for Connectors.

 

Connecting to Your MongoDB Collection

This section enumerates the options in the Credentials and Details panes in the MongoDB SSH Connector page. The components of the other panes in this page, Scheduling and Name & Describe Your DataSet, are universal across most connector types and are discussed in greater length in Adding a DataSet Using a Data Connector.

Credentials Pane

This pane contains fields for entering credentials to connect to a collection within a MongoDB database. The following table describes what is needed for each field:

Field

Description

SSH Host The SSH host you wish to tunnel through. For example, dmz.mydomain.com
SSH Port The port number of your SSH host
SSH Username The username you use to log into SSH Host
SSH Password The password you use to log into SSH Host
SSH Private Key The SSH private key or SSH password 
MongoDB Host Enter the host name for the MongoDB database. For example- db.company.com
MongoDB Port Enter the port number for the MongoDB database
MongoDB Database Enter the name of the MongoDB database
MongoDB Username Enter your MongoDB username
MongoDB Password Enter your MongoDB password

Once you have entered valid MongoDB SSH credentials, you can use the same account any time you go to create a new MongoDB SSH DataSet. You can manage connector accounts in the Accounts tab in the Data Center. For more information about this tab, see Managing User Accounts for Connectors.

Details Pane

In this pane you create a JSON query to pull data from your MongoDB collection. You can also create optional WHERE, SELECT, GROUP, and SORT clauses, and apply the query filter to find documents in the collection, also in JSON format.

Menu

Description

How would you like to select your collection name? Select how would you like to get the collection name (whether by entering it manually or selecting it from a drop down.)
Query Method Select a query method to pull data from your MongoDB collection.
Find A JSON Query will execute by 'Find Method'.
Aggregate A JSON Query will execute by 'Aggregate Method'.
JSON Query Filter Enter the query filter to find documents in the collection.
Limit Row Enter the number of rows you want to be returned.
Batch Size Batch size is the number of documents to be returned per batch which is used internally by the connector. Enter the batch size greater than 1.
Query Type Select which query filter to be used to aggregate documents in the collection.
Enter Query Filter Select "Enter Query Filter" to manually enter the JSON Aggregate Query Filter.
JSON Aggregate Query Filter Enter the query filter to aggregate documents in the collection.
Custom Query Clause Select "Custom Query Clause" to aply the custom clauses such as where clause, select clause, group clause, and sort clause.
Where Clause JSON Enter a WHERE clause in JSON format.
Select Clause JSON Enter a SELECT clause in JSON format.
Group Clause JSON Enter a GROUP clause in JSON format.
Sort Clause JSON Enter a SORT clause in JSON format. 

Other Panes

For information about the remaining sections of the connector interface, including how to configure scheduling, retry, and update options, see Adding a DataSet Using a Data Connector.