- Connect BI Tools >
- Connect from Tableau Desktop
Connect from Tableau Desktop¶
On this page
The MongoDB Connector for BI is a named connector in Tableau.
Prerequisites¶
- Windows
- macOS
Before using Tableau with BI Connector you should have:
- A running mongod instance or Atlas deployment
- A running
mongosqld
instance - The MySQL Connector/ODBC driver (Version 5.3.10)
Before using Tableau with BI Connector you should have:
- A running mongod instance or Atlas deployment
- A running
mongosqld
instance - ODBC Manager installed
- The MySQL Connector/ODBC driver (Version 5.3.10)
Important
The BI Connector is only compatible with version 5.3.x of the MySQL Connector/ODBC driver.
New in version 2.2.
Connect from Tableau without Authentication or TLS/SSL¶
Start Tableau.¶
Start the Tableau Desktop application.
Connect using Tableau.¶
- In the left-side navigation under To a server, click on More… then click MongoDB BI Connector.
- In the connection dialog box, provide values for these fields:
Field | Action |
---|---|
Server | Type the hostname or IP address of the MongoDB Connector for BI host. |
Port | Type the
IANA
port number
for the MongoDB Connector for BI. The default is 3307 . |
Username | Type the username for the user that can access the active MongoDB Connector for BI database. Unless you specified a Example |
- Click Sign In.
Connect from Tableau with the C Authentication Plugin¶
Note
If you are running Tableau on macOS, you must have sudo
access to
set the appropriate permissions on the MySQL configuration file in step
2.
Download the C Authentication Plugin library.¶
Navigate to the releases page
then download the mongosql_auth
plugin library.
- Windows
- macOS
Run the Windows installer (.msi
).
Save the library file mongosql_auth.so
to the
/usr/local/mysql/lib/plugin/
directory.
If this directory does not exist, create it:
Example
Note
This example assumes you downloaded the
mongosql_auth
plugin to the
/Users/{user}/Downloads/
directory.
Create a MySQL configuration file. (macOS only)¶
Create a text file with the following contents:
Save the file to
/etc/my.cnf
.Set the permissions of the file to
0644
:
Create a Tableau Datasource Connection file.¶
Create a text file with the following contents:
- Windows
- macOS
Save this file as
mongodb.tdc
in the My Tableau Repository for your platform:- Windows
- macOS
Note
Your Tableau repository may be located somewhere other than the default path. To find the repository, go to the File menu and click Repository Location….
Start Tableau.¶
Start the Tableau Desktop application or restart it if it was already running.
Important
Any time you change a .tdc
file, you must restart the Tableau
Desktop application for those changes to take effect.
Connect using Tableau.¶
In the left-side navigation under To a server, click on More… then click MongoDB BI Connector.
In the connection dialog box:
Field Action Server Type the hostname or IP address of the MongoDB Connector for BI host. Port Type the IANA port number for the MongoDB Connector for BI. The default is 3307
.Username Type the username for the user that can access the active MongoDB Connector for BI database.
Unless you specified a
defaultMechanism
in your MongoDB Connector for BI configuration file, you must append the authenticating database to the username.Example
The user
myTestUser
is authenticated against thetest
database.- If you are using Username and Password (
SCRAM-SHA-1
) authentication, the expected authenticating database isadmin
. - If you are using LDAP (
PLAIN
) authentication, the expected authenticating database is$external
.
Password Type the password associated with the Username. - If you are using Username and Password (
Click Sign In.
Connect from Tableau with Authentication and TLS/SSL¶
To connect Tableau to the MongoDB Connector for BI using TLS/SSL:
Using Tableau 10.3 or Later¶
With Tableau versions 10.3 or later, Tableau sends passwords in clear text. To configure Tableau to use authentication and TLS/SSL:
Create a Tableau Datasource Connection file.¶
The TDC file allows you to specify the authentication mechanism.
Save this file as mongodb.tdc
in the My Tableau
Repository for your platform:
- Windows
- macOS
Important
Any time you change a .tdc
file, you must restart the Tableau
Desktop application for those changes to take effect.
Tableau applies the authentication settings in the .tdc
file to
every connection matching the named database vendor and driver.
Connect using Tableau.¶
In the left-side navigation under To a server, click on More… then click MongoDB BI Connector.
In the connection dialog box, provide values for these fields:
Field Action Server Type the hostname or IP address of the MongoDB Connector for BI host. Port Type the IANA port number for the MongoDB Connector for BI. The default is 3307
.Username Type the username for the user that can access the active MongoDB Connector for BI database.
Unless you specified a
defaultMechanism
in your MongoDB Connector for BI Configuration File, you must append the authenticating database to the username.Example
The user
reader
is authenticated against theadmin
database.- If you are using Username and Password (
SCRAM-SHA-1
) authentication, the expected authenticating database isadmin
. - If you are using LDAP (
PLAIN
) authentication, the expected authenticating database is$external
.
Password Type the password associated with the Username. Require SSL Select the checkbox. No custom configuration file specified (click to change)… Click this link to configure your SSL certificate. - If you are using Username and Password (
In the Configure and Use SSL Certificate dialog box:
Field Action Use the following custom SSL certificate file Select this to allow you to select an SSL certificate.
Example
The user is going to select an SSL certificate.
Browse… Choose an SSL certificate file on your computer. Click OK.
- Click Sign In.
Using Tableau 10.2 or Earlier¶
With Tableau versions 10.2 or earlier, you must configure Tableau to send passwords in clear text. To configure Tableau, you can either:
- Use a Tableau Datasource Connection (TDC) file, or
- Set the
LIBMYSQL_ENABLE_CLEARTEXT_PLUGIN
environment variable.
Use a TDC File¶
Create a Tableau Datasource Connection file.¶
The TDC file is a convenient
way to enable the cleartext plugin and specify all of
mongosqld
’s TLS/SSL certificates and keys.
To create a TDC file that can
connect to the MongoDB Connector for BI with authentication over TLS/SSL, modify the
following .tdc
file template. Substitute SSLKEY
, SSLCERT
,
and SSLCA
appropriately:
Save this file as mysql.tdc
in the My Tableau
Repository for your platform:
- Windows
- macOS
Important
Any time you change a .tdc
file, you must restart the Tableau
Desktop application for those changes to take effect.
Tableau applies the TLS/SSL, certificate, and cleartext plugin settings in
the .tdc
file to every connection matching the named database
vendor and driver.
Connect using Tableau.¶
In the left-side navigation under To a server, click on More… then click MongoDB BI Connector.
In the connection dialog box, provide values for these fields:
Field Action Server Type the hostname or IP address of the MongoDB Connector for BI host. Port Type the IANA port number for the MongoDB Connector for BI. The default is 3307
.Username Type the username for the user that can access the active MongoDB Connector for BI database.
Unless you specified a
defaultMechanism
in your MongoDB Connector for BI Configuration File, you must append the authenticating database to the username.Example
The user
biUser
is authenticated against theimf
database.- If you are using Username and Password (
SCRAM-SHA-1
) authentication, the expected authenticating database isadmin
. - If you are using LDAP (
PLAIN
) authentication, the expected authenticating database is$external
.
Password Type the password associated with the Username. - If you are using Username and Password (
Click Sign In.
Set an Environment Variable¶
Start Tableau.¶
- Windows
- macOS
Add the LIBMYSQL_ENABLE_CLEARTEXT_PLUGIN=1
environment variable
to your user environment.
To do this, open a Command Prompt. Press the Win
key,
type cmd.exe
, and press Enter
. Then execute the following
command:
SETX
should respond with the following:
SUCCESS: Specified value was saved.
Open a terminal window and execute the following command:
Then start Tableau.