This topic describes how to connect Apache Superset to Hologres and analyze data in a visualized manner.
Prerequisites
A Hologres instance is purchased. For more information, see Purchase a Hologres instance.
Apache Superset is installed. For more information, visit the Apache Superset official website.
Background information
Apache Superset (incubating) is an open source BI tool that is used for data exploration and visualized data analytics. Apache Superset is developed based on Python by using components such as Flask, Pandas, and SQLAlchemy. Hologres is compatible with PostgreSQL. In this example, Apache Superset version 0.38.0 is connected to Hologres for data analytics.
Procedure
Log on to Apache Superset and choose in the top navigation bar. Then, the Databases page appears.
On the Databases page, click the icon in the upper-right corner. On the Add Database page, set the parameters that are described in the following table.
Parameter
Description
Database
The custom name of the connection.
SQLAlchemy URI
The connection string that is used to connect to the Hologres database. An SQLAlchemy URI is in the following format:
postgresql+psycopg2://{AccessKey ID}:{AccessKey Secret}@{host}:{port}/{database}
An SQLAlchemy URI contains the following parameters:
AccessKey ID and AccessKey Secret: the AccessKey ID and AccessKey secret of your Alibaba Cloud account. For more information about how to obtain the AccessKey pair, see Create an Alibaba Cloud account.
host: 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: 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.
For more information about the connection information, see Engine Configuration in the SQLAlchemy documentation.
Click Test Connection to check whether the connection is established and whether the settings of the connection are valid.
If the connection is successful, click Save in the lower part of the page.
After the configurations are saved, you can connect Apache Superset to Hologres to analyze and display data in a visualized manner. For more information, see Postgres in the Apache Superset documentation.