All Products
Search
Document Center

Hologres:Apache Superset

Last Updated:Jun 06, 2023

This topic describes how to connect Apache Superset to Hologres and analyze data in a visualized manner.

Prerequisites

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

  1. Log on to Apache Superset and choose Sources > Databases in the top navigation bar. Then, the Databases page appears.databases

  2. On the Databases page, click the Add icon in the upper-right corner. On the Add Database page, set the parameters that are described in the following table.Add Database

    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.

  3. Click Test Connection to check whether the connection is established and whether the settings of the connection are valid.

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