This topic describes how to use Tableau to connect to a Hologres instance and analyze data in a visualized manner.
Background information
Tableau is a secure and flexible end-to-end data analysis platform. Tableau provides a complete set of features from connection setup to collaboration. Hologres is compatible with PostgreSQL. You can connect Tableau to a Hologres instance for data analysis in a visualized manner.
Use Tableau Desktop to connect to Hologres
Download and install Tableau.
Configure a Tableau Datasource Customization (TDC) file.
For better performance and experience, configure a TDC file to customize and optimize the connection to the Hologres data source. To configure a TDC file, perform the following steps:
Download the TDC file.
Copy the TDC file to the related directories of Tableau Desktop and Tableau Server.
For Tableau Desktop, copy the TDC file to the Datasources directory of Tableau Desktop. The default directory is Documents\My Tableau Repository\Datasources
.
For Tableau Server, copy the TDC file to the following directory on each node of Tableau Server:
Restart Tableau Desktop and Tableau Server.
Connect to a Hologres instance.
Start Tableau Desktop.
In the left-side navigation pane, choose > PostgreSQL. In the PostgreSQL dialog box, configure the parameters for connecting to a Hologres instance.
The following table describes the parameters.
Parameter | Description |
Server | The public endpoint of the Hologres instance. You can obtain the endpoint of the Hologres instance in the Network Information section of the Instance Details page in the Hologres console. |
Port Number | The port number of the Hologres instance. You can obtain the port number of the Hologres instance in the Network Information section of the Instance Details page in the Hologres console. |
Database | The name of the Hologres database. |
Authentication | The authentication method. Select User Name and Password. |
Username | The AccessKey ID of the Alibaba Cloud account. You can obtain the AccessKey ID from the AccessKey Pair page. |
Password | The AccessKey secret of the Alibaba Cloud account. You can obtain the AccessKey secret from the AccessKey Pair page. |
Require SSL | Specifies whether an SSL certificate is required to connect to the Hologres instance. Do not select this check box. |
(Recommended) Click Initial SQL and configure the application_name
parameter. Sample command:
SET application_name='tableau'
After you configure the application_name
parameter, you can quickly identify SQL statements that are initiated by Tableau in query logs and running SQL statements.
Click Sign In.
Analyze data in a visualized manner by using Tableau Desktop.
After you use Tableau Desktop to connect to your Hologres instance, you can analyze data of existing tables in the instance in a visualized manner. For more information, see Get started with Tableau.
Publish workbooks of Tableau Desktop to Tableau Server
To publish a workbook of Tableau Desktop to Tableau Server for analytics and management, perform the following steps:
Download and install Tableau Server.
Download a Tableau Server client from the Tableau official website based on your business requirements and install the client.
Use Tableau Desktop to connect to Tableau Server.
Start Tableau Desktop and choose in the top navigation bar.
In the dialog box that appears, enter the URL of Tableau Server and click Connect.
On the logon page, enter the username and password used to connect to Tableau Server and click Sign In.
Publish a workbook to Tableau Server.
Log on to Tableau Server and choose in the top navigation bar.
In the Publish Workbook to Tableau Server dialog box, configure the parameters that are described in the following table.
![发布工作薄](https://help-static-aliyun-doc.aliyuncs.com/assets/img/en-US/5445334161/p236693.png)
Parameter | Description |
Project | The name of the project for which you want to publish a workbook. |
Name | The name of the workbook that you want to publish. |
Tags | Tags that help you find the related workbooks when you browse the server. Separate tags with commas (,) or spaces. |
Permissions | Use the default settings. |
Data Sources | Tableau Server provides the following two authentication methods for data sources: Prompt user Embedded password
If you select Embedded password from the drop-down list, Tableau embeds the information about the connection between the workbook and the data source into the workbook and allows all users who are granted the required permissions to view the workbook. When you use Tableau to connect to a Hologres instance, the AccessKey ID and AccessKey secret are required. We recommend that you use the Embedded password method. |
After you configure the parameters, click Publish. Then, you can view the published workbook in Tableau Server.