Tableau
This topic describes how to connect Tableau to Hologres for visual analysis.
Background
Tableau is a secure and flexible end-to-end data analysis platform that provides a full suite of features, from connection to collaboration. Hologres is compatible with PostgreSQL, allowing you to directly connect Tableau for visual analysis.
Connect Tableau Desktop to Hologres
-
Download and install Tableau.
Go to the official Tableau website, download the appropriate Tableau client, and follow the installation instructions. This guide uses Tableau Desktop.
-
Configure the TDC file.
For optimal performance and experience, configure a Tableau Datasource Customization (TDC) file to customize the connection to the Hologres data source. Follow these 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 the Tableau Help.
-
-
Connect to Hologres.
-
After installing the client, open it.
-
In the left navigation bar, in the section, select PostgreSQL, and configure the Hologres connection information.
The following table describes the connection parameters.
Parameter
Description
Server
The public endpoint of the Hologres instance.
Go to the Instance Details page in the Hologres console and find the public endpoint in the Network Information section.
Port
The port of the Hologres instance.
Go to the Instance Details page in the Hologres console and find the port in the Network Information section.
Database
The name of the database that you created in Hologres.
Go to the Instance Details page in the Hologres console and find the database name under Database Management.
Authentication
Select Username and Password.
Username
The AccessKey ID of your Alibaba Cloud account.
You can click AccessKey management to obtain your AccessKey ID.
Password
The AccessKey Secret of your Alibaba Cloud account.
You can click AccessKey management to obtain your AccessKey Secret.
Require SSL
Clear this checkbox.
-
(Recommended) Click Initial SQL and use the following command to set the
application_nameparameter:SET application_name='tableau'Setting the
application_nameparameter allows you to quickly identify SQL queries from Tableau in your query logs and running SQL statements. -
Click Sign in.
-
-
Analyze data in Tableau.
After connecting Tableau to Hologres, you can visually analyze data in your tables. For details, see the Tableau official tutorials.
Publish to Tableau Server
To publish a workbook from Tableau Desktop to Tableau Server for analysis and management, follow these steps:
-
Download and install Tableau Server.
Go to the official Tableau website, download the appropriate Tableau Server client, and follow the installation instructions.
-
Connect to Tableau Server from Tableau Desktop.
-
Open the Tableau Desktop client and select from the top menu.
-
In the dialog box that opens, enter the address of your Tableau Server and click Connection.

-
On the sign-in page, enter the username and password for Tableau Server and click Sign in.
-
-
Publish a workbook to Tableau Server.
-
After you sign in to Tableau Server, select from the top menu.
-
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 browsing the server. Separate tags with commas or spaces.
Permissions
Accept the default project settings.
Data Sources
Tableau Server supports two types of data source authentication:
-
Prompt user
-
Embedded password
When you select Embedded password, Tableau saves the connection information within the workbook, allowing any user with viewing permissions to access the data. Because connecting to Hologres requires an AccessKey ID and AccessKey Secret, embedding the password is the recommended method.
-
-
After configuring the parameters, click Publish. You can then view your published workbook on Tableau Server.
-
FAQ
-
Problem: TIMESTAMPTZ data shows an incorrect time zone in query results.
-
Cause: Hologres uses PRC (China Standard Time) as the default time zone for TIMESTAMPTZ data, while Tableau defaults to UTC. This mismatch can cause time values to be displayed incorrectly.
-
Solution: Set the time zone for the data source connection by using an Initial SQL command in Tableau.
NoteThis configuration applies only to the specified data source.
You can configure the Initial SQL command in two scenarios:
-
When you first connect to Hologres:
If you are connecting to Hologres for the first time, see the following steps.
When connecting Tableau to Hologres, enter the following SQL statement in Initial SQL.
SET TIME ZONE "PRC";
-
If a connection between Tableau and Hologres already exists, follow these steps:
-
Click Initial SQL.

-
In the Initial SQL dialog box, enter the following SQL command.
SET TIME ZONE "PRC"; -
Click OK.
-
In the upper-left corner of the page, click the
icon to apply the settings.
-
-
-
-
Best practice: Setting time-based dimensions.
When using time-based dimensions, set the correct data type in Hologres to avoid conversions in Tableau. For example, if you want to use the l_shipdate column as a date and time value, set the column type to
TIMESTAMPorTIMESTAMPTZwhen you create the table in Hologres. This prevents unnecessary data type conversions.