Tableau

更新时间: 2026-05-08 03:05:35

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

  1. 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.

  2. 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:

    1. Download the Tableau Datasource Customization (TDC) file.

    2. Copy the TDC file to the installation directory.

      • For Tableau Desktop, copy the TDC file to the relevant installation directory. The default path is Documents\My Tableau Repository\Datasources.

      • For Tableau Server, copy the TDC file to the following folder on each server node:

        • Windows: ProgramData\Tableau\Tableau Server\data\tabsvc\vizqlserver\Datasources.

        • Linux: /var/opt/tableau/tableau_server/data/tabsvc/vizqlserver/Datasources/.

    3. Restart Tableau Desktop and Tableau Server.

    For more information about TDC files, see the Tableau Help.

  3. Connect to Hologres.

    1. After installing the client, open it.

    2. In the left navigation bar, in the Connection > To a Server 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.

    3. (Recommended) Click Initial SQL and use the following command to set the application_name parameter:

      SET application_name='tableau'

      Setting the application_name parameter allows you to quickly identify SQL queries from Tableau in your query logs and running SQL statements.

    4. Click Sign in.

  4. 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:

  1. Download and install Tableau Server.

    Go to the official Tableau website, download the appropriate Tableau Server client, and follow the installation instructions.

  2. Connect to Tableau Server from Tableau Desktop.

    1. Open the Tableau Desktop client and select Server > Sign in from the top menu.

    2. In the dialog box that opens, enter the address of your Tableau Server and click Connection.Sign In

    3. On the sign-in page, enter the username and password for Tableau Server and click Sign in.

  3. Publish a workbook to Tableau Server.

    1. After you sign in to Tableau Server, select Server > Publish Workbook from the top menu.

    2. 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.

    3. 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.

      Note

      This 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";

        初始化SQL

      • If a connection between Tableau and Hologres already exists, follow these steps:

        1. Click Initial SQL.初始化SQL

        2. In the Initial SQL dialog box, enter the following SQL command.

          SET TIME ZONE "PRC";
        3. Click OK.

        4. 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 TIMESTAMP or TIMESTAMPTZ when you create the table in Hologres. This prevents unnecessary data type conversions.时间类型维度设置

上一篇: Connect to Hologres from SAP BusinessObjects 下一篇: Yonghong BI
阿里云首页 实时数仓 Hologres 相关技术圈