ODBC TUTORIAL
How to Build Tableau reports on MongoDB using the DataDirect MongoDB Driver for ODBC
Updated: 19 Aug 2024
Introduction
The DataDirect ODBC drivers can connect any ODBC application to a wide range of data sources. This tutorial demonstrates how to use a Progress DataDirect MongoDB connection from within the Tableau Desktop application. These same steps can be used for any ODBC connection from within Tableau.
Prerequisites
This tutorial assumes that you have ODBC drivers installed and a data source configured. If you have not yet done these steps, please follow these instructions:
1.
Downloadand install the Progress DataDirect MongoDB ODBC driver for your database using the 15-day trial software. In this tutorial, we are connecting to MongoDB
2. Configure a data source for your database. See the
DataDirect documentation for assistance with setting up your data source. The sample below uses a
MongoDB data source.
1. After the DataDirect MongoDB ODBC driver has been installed, open ODBC Administrator to configure the connection and click on Add.
2. Choose the “DataDirect X.X MongoDB” driver and click on “Finish”.
3. You should now see the DataDirect MongoDB DSN Configuration Manager launched in your browser. Add your Data Source Name, server name, user, password, and other credentials, and click on “Save.”
4. Click on the “Test Connect” button. Now you should see the list of tables available in your MongoDB instance.
Connect to an ODBC Data Source
- Start Tableau and select “Other Databases (ODBC)” option.
- In the popup window select the “DSN” radial button and choose the data source previously configured to connect to MongoDB in the dropdown.
- Select “Connect” and a new Logon Dialog tab will appear in your browser.
- Enter any additional parameters required to connect to your MongoDB source, such as a username and password, and select “OK.” The original connection screen will now display the connection attributes.
- Select “Sign In” and the Tableau configuration screen should now appear.
You can use Tableau's schema and table drop-down list to browse and select your data. Or you can execute SQL statements by clicking on the "New Custom SQL" option.
- For example, you can execute a statement such as "Select * from schema_name.table_name" and then click on the "Sheet 1" option at the bottom of the Tableau screen.
This screen will allow you to select data and create tables or charts, such as
the sample below:
Conclusion