MongoDB BI Connector

This article describes how to connect Tableau to MongoDB Business Intelligence (BI) data and set up the data source.

Before you begin

Before you begin, gather this connection information:

  • Name of the server that hosts the database you want to connect to

  • User name and password, if MongoDB authentication is enabled

  • Database name associated with the user's credentials, if MongoDB authentication is enabled

  • Are you connecting to an SSL server?

  • (Optional) Initial SQL statement to run every time Tableau connects

You must install and run the MongoDB Connector for BI, version 2.1 or later, before you can connect Tableau to your MongoDB BI data.

To get the MongoDB Connector for BI, sign in to the MongoDB website and download the connector. Follow the Installation instructions on the MongoDB website.

Driver required

This connector requires a driver to talk to the database. You might already have the required driver installed on your computer. If the driver is not installed on your computer, Tableau displays a message in the connection dialog box with a link to the Driver Download page where you can find driver links and installation instructions.

Make the connection and set up the data source

  1. Start Tableau and under Connect, select MongoDB BI Connector. For a complete list of data connections, select More under To a Server. Then do the following:

    1. Enter the name of the server.

    2. If MongoDB authentication is enabled, enter your user name with associated database name, and password. For information about the correct format to use, see Sign in options. If MongoDB authentication isn't enabled, proceed to step c.

      Select the Require SSL check box when connecting to an SSL server. For more information about connecting with SSL to MongoDB, see Connecting Tableau to MongoDB on the MongoDB website.

    3. (Optional) Select Initial SQL to specify a SQL command to run at the beginning of every connection, such as when you open the workbook, refresh an extract, sign in to Tableau Server, or publish to Tableau Server. For more information, see Run Initial SQL.

    4. Select Sign In.

      If Tableau can't make the connection, verify that your credentials are correct. If you still can't connect, your computer is having trouble locating the server. Contact your network administrator or database administrator.

  2. On the data source page, do the following:

    1. (Optional) Select the default data source name at the top of the page, and then enter a unique data source name for use in Tableau. For example, use a data source naming convention that helps other users of the data source figure out which data source to connect to.

    2. Select the sheet tab to start your analysis.

MongoDB BI Connector data source example

Here is an example of a MongoDB BI Connector data source using Tableau Desktop on a Windows computer:

Sign in options

User accounts in MongoDB are associated with specific logical databases in MongoDB. So when users log into MongoDB, they need to specify the database name associated with the user's credentials. This is done by passing special options in the username string. For example, if user henrywilson is associated with the example database, he enters the following in the Username field.

henrywilson?source=example

You can use the mechanism option to define the authentication mechanism if you want to use a mechanism other than the default, SCRAM-SHA-1. For example, if user henrywilson wants to connect to the example database using challenge/response as the authentication mechanism, he enters the following in the Username field:

henrywilson?source=example,mechanism=MONGODB-CR

For more information about authentication options, see the MongoDB website.

 

See also

Thanks for your feedback! There was an error submitting your feedback. Try again or send us a message.