Tableau is a leading business intelligence (BI) and data visualization tool. Apache Doris is compatible with the MySQL protocol, so you can connect to it directly through Tableau's official MySQL connector (based on the MySQL JDBC Driver), without any dedicated plugin.
This document targets the following typical scenarios:
After completing the steps in this document, you will be able to:
Before you start, make sure the following requirements are met:
| Item | Requirement |
|---|---|
| Apache Doris cluster | Accessible, with the FE MySQL protocol port (default 9030) open |
| Database account | Has read permission on the target database |
| Tableau Desktop | Latest version installed (download page) |
| MySQL JDBC Driver | Version 8.3.0 (download link) |
Download and install Tableau Desktop.
Download MySQL JDBC Driver 8.3.0.
Place the JDBC driver jar file in the directory designated by Tableau:
| Operating System | Driver Path |
|---|---|
| macOS | ~/Library/Tableau/Drivers |
| Windows | %tableau_path%\Drivers\ (default tableau_path = C:\Program Files\Tableau) |
Restart Tableau Desktop so that the driver takes effect.
After installing the driver, you can create a data source in Tableau that connects to Doris (the example uses the tpch database).
The parameters required to connect to Apache Doris through JDBC are as follows:
| Parameter | Description | Example |
|---|---|---|
| Server | Host address of the Doris FE | 127.0.0.1 |
| Port | MySQL protocol port of the Doris FE | 9030 |
| Database | Database name | tpch |
| Username | User name | testuser |
| Password | Password | (fill in based on your account) |
| Init SQL Statement | Initialization SQL automatically executed after the connection is established | select * from database.table |
Start Tableau Desktop. If it is already running, restart it to load the driver.
In the left-hand menu, under To a Server, click More, then search for MySQL in the connector list:
Click MySQL to open the connection configuration dialog:
Fill in the connection information you prepared in the previous step, following the prompts in the dialog.
Click Sign In. After the connection succeeds, a new Tableau workbook opens:
The following example uses the TPC-H dataset to demonstrate how to build visualizations on top of a Doris data source. For instructions on building TPC-H data, see the TPC-H Benchmark documentation.
Drag the customer and orders tables into the workbook, and set the join field to Custkey in the panel below:
Drag the nation table into the workbook and set the join field with customer to Nationkey:
After joining the three tables, you have a data source ready for analysis. Click the Sheet 1 tab at the bottom of the workbook to enter the worksheet:
Drag OrderDate (from orders) into Columns, and drag customer(count) (from customer) into Rows. Tableau then generates a line chart:
:::note The TPC-H dataset is generated by a script using default rules and is not real business data. The results are intended only for feature demonstration and connectivity verification. :::
Click New Worksheet to create a new sheet.
Drag Name (from nation) into Rows.
Drag OrderDate (from orders) into Columns.
At this point, the table shows Abc placeholder values because no aggregated measure has been specified.
Drag Totalprice (from orders) into the center of the table. The default aggregation is SUM:
Click SUM and change Measure to Average:
In the same drop-down menu, choose Format, then set Numbers to Currency (Standard):
The final report matches the expected output:
At this point, you have successfully connected Tableau to Apache Doris and built data analysis and visualization dashboards.