This topic describes how to connect Tableau to Hologres and perform visual analytics on your data.
Background information
Tableau is a secure and flexible end-to-end data analytics platform that provides a full range of features, from connection to collaboration. Because Hologres is compatible with PostgreSQL, you can directly connect Tableau to Hologres for visual analytics.
Connect Tableau Desktop to Hologres
-
Download and install Tableau.
Go to the official Tableau website, download the required Tableau client, and follow the instructions to install it. This topic uses Tableau Desktop as an example.
-
Configure the TDC file.
For better performance and user experience, configure a Tableau Datasource Customization (TDC) file to customize and optimize the connection to the Hologres data source. Perform the following steps:
-
Download the Tableau Datasource Customization (TDC) file.
-
Copy the TDC file to the installation directory.
-
Restart Tableau Desktop and Tableau Server.
For more information about TDC files, see Tableau Help.
-
-
Connect to Hologres.
-
After the client is installed, open it.
-
In the section of the navigation pane on the left, select PostgreSQL and configure the connection to Hologres.
The following table describes the parameters.
Parameter
Description
Server
The public endpoint of the Hologres instance.
Go to the instance details page in the Hologres console. In the Network Information section, obtain the public endpoint.
Port
The port of the Hologres instance.
Go to the instance details page in the Hologres console. In the Network Information section, obtain the port.
Database
The name of the database that you created in Hologres.
Authentication
Select Username and Password.
Username
The AccessKey ID of your Alibaba Cloud account.
Click AccessKey Management to obtain the AccessKey ID.
Password
The AccessKey secret of your Alibaba Cloud account.
Click AccessKey Management to obtain the AccessKey secret.
Require SSL
Do not select this option.
-
(Recommended) Click Initial SQL and set the
application_nameparameter using the following command.SET application_name='tableau'After you set the
application_nameparameter, you can quickly identify SQL statements sent from Tableau in query logs and running SQL statements. -
Click Logon.
-
-
Visualize data in Tableau.
After you connect Tableau to Hologres, you can perform visual analytics on your table data. For more information, see the Tableau Tutorials.
Publish to Tableau Server
If you want to publish reports from Tableau Desktop to Tableau Server for analysis and management, perform the following steps:
-
Download and install Tableau Server.
Go to the official Tableau website, download the required Tableau Server client, and follow the instructions to install it.
-
Access Tableau Server from Tableau Desktop.
-
Open the Tableau Desktop client. From the top menu, choose .
-
In the dialog box, enter the address of your Tableau Server and click Connect.

-
On the logon page, enter the username and password for Tableau Server and click Logon.
-
-
Publish the workbook to Tableau Server.
-
After you log on to Tableau Server, from the top menu, choose .
-
In the Publish Workbook dialog box, configure the following parameters.

Parameter
Description
Project
Select the destination project.
Name
Enter a name for the workbook.
Tags
Tags help users find related workbooks when they browse the server. Separate tags with a comma or a space.
Permissions
Accept the default project settings.
Data Sources
Tableau Server supports two types of data source authentication:
-
Prompt user
-
Embed password
If you select Embed password, Tableau embeds the data source connection information in the report. This allows any user who can view the workbook to see the data. Because connecting to Hologres requires an AccessKey ID and an AccessKey secret, which can be cumbersome, we recommend that you use the embedded password mode.
-
-
After you configure the parameters, click Publish. You can then view the published report in Tableau Server.
-
FAQ
-
The time zone for data of the TIMESTAMPTZ type is incorrect in query results.
-
Cause: The default time zone in Hologres is PRC, and the default time zone in Tableau is UTC. This inconsistency causes the time to be displayed incorrectly for data of the TIMESTAMPTZ type.
-
Solution: Set an initial SQL statement in Tableau to resolve the time zone inconsistency.
NoteThis configuration takes effect only for the specified data source.
You can set the initial SQL statement in the following two scenarios:
-
Connecting to Hologres for the first time.
If this is your first time connecting to Hologres, follow these steps.
When you create the data connection, enter the following SQL statement in the Initial SQL field.
SET TIME ZONE "PRC";
-
Now that you have connected Tableau to Hologres, you can perform the following steps.
-
Click Initial SQL.

-
In the Initial SQL dialog box, enter the following SQL command.
SET TIME ZONE "PRC"; -
Click OK to save the initial SQL settings.
-
In the upper-left corner of the page, click the
icon to apply the settings.
-
-
-
-
Settings for time-type dimensions.
When you use time-type dimensions in Tableau, we recommend that you avoid secondary transformations. For example, if you want to use l_shipdate with a date and time format, set the column to the TIMESTAMP or TIMESTAMPTZ format when you create the table in Hologres. This avoids unnecessary field type conversions.
