This page describes how to connect to either an Atlas federated database instance or an on-premises MongoDB Enterprise database with Tableau (Desktop or Server) using the Tableau custom connector.
The SQL Interface supports connections from Atlas clusters on MongoDB 5.0 and later and Self-Managed clusters on MongoDB 6.0 and later.
Prerequisites
Before connecting with Tableau, ensure you have met the following prerequisites:
An Atlas federated database instance or a self-managed EA database.
Tableau Desktop or Server. For Tableau Server, SCRAM authentication is the only authentication mechanism supported at this time.
Procedure
The procedure to connect to MongoDB with Tableau comprises the following steps:
Download the JDBC Driver and Tableau Connector
Ensure you have enabled SQL Interface for your cluster.
See Quick Start for detailed instructions on enabling Atlas SQL.
See On-Premise set up for detailed instructions on how to enable the SQL Interface for EA databases.
Download the MongoDB JDBC Driver.
Download the latest MongoDB JDBC Driver version.
Note
See Connect with JDBC Driver for more details on the MongoDB JDBC Driver.
Move the downloaded ALL JAR file into the appropriate directory for your operating system:
Operating SystemFolder PathWindows
C:\Program Files\Tableau\DriversMacOS
~/Library/Tableau/DriversLinux
/opt/tableau/tableau_driver/jdbc
Download and install the Tableau custom connector.
Download the Tableau taco file for the latest version.
Move the downloaded taco file into the appropriate directory for your operating system:
Operating SystemFolder PathWindows
C:\Users\<user>\Documents\My Tableau Repository\ConnectorsMacOS
~/Documents/My Tableau Repository/ConnectorsLinux
/opt/tableau/connectors
Important
Updating Your Connector
If you download a new version of the Tableau custom connector, delete the old Tableau custom connector file from your Connectors directory to ensure that Tableau uses the latest version.
Get Your MongoDB Database Connection Information
Perform the following steps to get your MongoDB database connection information:
Use your connection string for mongosh.
Connect with Tableau
Enter your database connection information:
Enter your SQL Interface connection string. See Get Your MongoDB Database Connection Information for detailed instructions in getting your connection string.
Select your authentication method.
Choose your Authentication Mechanism from the dropdown.
Username: Enter your MongoDB username.
Password: Enter your MongoDB password.
Configure your PEM certificate using one of the following methods:
Use a PEM File Path:
In your
mongodb_jdbc.propertiesfile, set thex509pempathproperty to your PEM file's path. For example,x509pempath=/certs/client-cert.pem.If your PEM file is unencrypted, do not select Provide PEM Contents. No further action is required.
If your PEM file is encrypted, select Provide PEM Contents and enter the file's passphrase in the Password field.
Provide PEM Contents:
Select the checkbox next to Provide PEM Contents and enter your certificate data into the Password field:
Unencrypted Content: Paste the full certificate content directly into the field.
Encrypted Content: Paste a JSON object containing the content and passphrase:
{ "pem": "<PEM-CONTENT>", "passphrase": "<PEM-PASSPHRASE>" }
Enter the Kerberos principal name in the Username field.
For example, user@EXAMPLE.COM.
No additional properties or fields are required in the connection dialog for OIDC.