When you start Tableau, under Connect, you can see the file and database types that are supported by Tableau Desktop. Select More to see the complete list. For supported files and databases, Tableau provides built-in connectors that are built for and optimized for those data sources.
Important: If your file or database type is listed under Connect, use that named connector to connect to your data.
If your file or database type is not listed on under Connect, you might be able to connect to it using the Other Databases (JDBC) connector. JDBC (Java Database Connectivity) is a standard way to connect to a database. If the database driver you want to connect with implements the JDBC standard, you can connect Tableau to your data using the JDBC driver for your database and the Tableau Other Databases (JDBC) connector.
When you use the Other Databases (JDBC) connector, you might notice significant performance differences between this "generic" connector and a named Tableau connector because the generic JDBC connection doesn't take advantage of the many connection-specific features used in a named connector to optimize performance.
Specify the right JDBC driver
JDBC drivers are self-contained .jar files. Place the .jar files in the folder for your operating system. (You need to create the folder if it doesn't already exist.)
- Windows: C:\Program Files\Tableau\Drivers
- Mac: ~/Library/Tableau/Drivers
- Linux: /opt/tableau/tableau_driver/jdbc
Note: If the driver includes only a single .jar file, simply copy it to C:\Program Files\Tableau/Drivers. If the driver includes multiple files, create a subfolder "A" under C:\Program Files\Tableau/Drivers, then copy all files to folder "A".
Also note these requirements:
- You must have read permissions on the .jar file.
- Tableau requires a JDBC 4.0 or later driver.
- Tableau requires a Type 4 JDBC driver.
- Install the latest 64-bit version of Java 8.
Note: To prevent secrets from logging you need to enter the secrets for JDBC connectors in either the password field on the dialog or in the driver properties.
The Other Databases (JDBC) connector supports the following dialects, which are used to establish how Tableau translates the SQL queries that are sent to the database:
- Generic SQL-92
Gather connection information
Gather the following connection information:
- JDBC connection string to enter in the URL field when you connect. Refer to the driver's documentation to make sure you use the correct format for your JDBC driver. Here is one example:
jdbc- always use the jdbc prefix, or else you'll disable the sign in button.
postgresql- defines the class of the JDBC driver you're using. Tableau checks for a matching driver in the Tableau driver folder. The JDBC driver has a subprotocol associated with it, such as postgresql for PostgreSQL or mysql for MySQL.
www.exampledatabase.com- the network address to your database server. You can use a host name or an IP address.
5432– the port that the database is responding to at the network address specified.
databasename- the name of the database or schema on your database server.
- The dialect you're using: MySQL, PostgreSQL, or SQL-92.
- Credentials for signing in to the server: user name and password.
(Optional) JDBC properties file to customize the driver behavior. For more information, see Customize JDBC Connections Using a Properties File(Link opens in a new window) in Tableau Community.
To connect to your data using the JDBC driver, do the following:
- Start Tableau and under Connect, select Other Databases (JDBC). For a complete list of data connections, select More under To a Server.
- Enter the JDBC connection string in URL field.
- Select the Dialect from the drop-down list.
- Enter the user name and password for signing in to the server.
- (Optional) Browse to the JDBC properties file. When you use a properties file, it overrides class-level properties.
- Select Sign in.
Important: When you use Other Databases (JDBC) to connect to a database, the outcome may vary and compatibility with Tableau Desktop features is not guaranteed.
If your connection works as you need it to, you can begin your analysis. If, however, you need to customize your JDBC connection to improve functionality and performance, refer to the articles under See also.
When you work with a generic JDBC connection, additional configuration is required to make sure that the workbooks and data sources you create can be used on different computers and platforms.
For publishing and for cross-platform portability, the driver must be installed to match the workbook or data source connection.
As an example, Ashley Garcia creates an Other Databases (JDBC) data source that connects using the associated JDBC driver installed on her Windows computer.
Ashley can do a couple of things with this data source to make it available for others to use.
- She can publish it to Tableau Server. When she does this, Ashley needs to ask the Tableau Server administrator to install the associated JDBC driver on the Tableau Server computer so that the data source can be accessed by Ashley and by others.
- She can email the data source to coworkers. Ashley needs to tell the coworkers to install the associated JDBC driver on their computers so that they can open the data source in Tableau Desktop.
When you try to open a workbook or data source created using the Other Databases (JDBC) connector and you don't have the JDBC driver installed, you'll see an error that includes the message
No suitable driver. To resolve this error, contact the workbook or data source publisher or the Tableau Server administrator to get the JDBC driver that matches the workbook or data source. Then install the driver on your computer.
Tableau probably hasn't tested the database your connecting to using the Other Databases (JDBC) connector, so it's important that you take some time to review your data to ensure that it reflects what you expect.
To check the metadata, review the data tab and the data grid on the data source page to ensure that you see the right tables and columns, and that the data types are correct.
When you connect to data using Other Databases (JDBC), you specify the database that you are connecting to in the JDBC connection string in the URL field. After you connect, if you want to change to another database, you need to edit the connection string or add a new connection with the new string. Otherwise you will receive an error and see results like the following examples:
|Tableau Desktop||Tableau Prep Builder|
Tableau provides limited customer support for connections using Other Databases (JDBC). For example, Support will help you if your connection works in Tableau Desktop, but doesn't work in Tableau Server. However, Tableau does not support creating or debugging JDBC properties files. For help, you can review the documentation listed under See also, and you can submit questions and ask for help on the Tableau Developer Community forums(Link opens in a new window).
Tableau and JDBC – Provides tips for improving performance and solving common problems.
Customize JDBC Connections Using a Properties File(Link opens in a new window) in Tableau Community
Customizing JDBC Connections(Link opens in a new window) in Tableau Knowledge Base