Analyzing your data with Apache Superset
You can use Apache Superset to analyze, explore, and visualize data stored in your Postgres clusters when using your own cloud account. (Apache Superset isn't supported on EDB Hosted Cloud Service.) You can open Superset from the EDB Postgres AI Console using the Analyze links.
Note
Contact Cloud Service Support to enable the Apache Superset feature.
Default permissions include the ability to view data and create dashboards. To add or modify data sources, you need additional permissions. For more information on permissions to access Superset, see Managing Superset access.
Connecting Superset to your cluster
To connect to Superset, in addition to your password, you need your user, host, port, and database name. To find this information for your cluster:
Sign in to the Console.
Go to the Clusters page.
Select the name of your cluster.
Select the Connect tab.
Note
To connect with Superset in a private network database cluster, both the cluster and Superset must be on the same network.
To connect to a Cloud Service cluster:
Sign in to the Console.
Select Analyze > Connections.
Select + Database.
In the Add Database dialog box, enter a value for Database Name.
To connect to the database, you need a database user with a password. Enter the connection string for your cluster in the SQLALCHEMY URI field, using the following format:
postgresql://{<username>}:{<password>}@{<host>}:{<port>}/{<dbname>}?sslmode=verify-full
Note
Your password is always encrypted before storage and never leaves your cloud environment. It's used only by the Superset software running in your Cloud Service infrastructure. As a defense-in-depth mechanism, we recommend using a Postgres user dedicated to Superset with a minimal set of privileges to just the database you're connecting. Never use your edb_admin superuser or equivalent user with Superset.
Check the connection by selecting Test Connection. Select Add if the connection was successful.
For more information on connecting to Superset, see the Superset documentation:
- Connecting Superset to a new database. Connecting Superset to a Cloud Service cluster is similar to connecting to any new database.
- Superset documentation on connecting to Postgres.
Upon successful connection, you can add datasets, charts, and dashboards.
Using Superset dashboards
You can use Superset dashboards to analyze data stored in your cluster. For a tutorial on creating a simple dashboard, see Creating Your First Dashboard.
To view all available Superset dashboards, select Analyze > Dashboards.
To create a dashboard for monitoring EDB Postgres Distributed, you can use the template we provide. See Configuring an EDB Postgres Distributed dashboard for more information.
Configuring an EDB Postgres Distributed dashboard
We provide a template for an EDB Postgres Distributed dashboard in JSON format (utils/superset/pgd_monitoring_template.json
) in the cloud-utilities repository. The JSON file includes the schema of the dashboard and the individual charts.
To add the dashboard:
Clone the cloud-utilities repository on your local system.
Using Python 3.4 or later, create an output JSON file:
Change your working directory:
Change the permissions on the script to make it executable:
Run the script:
For example:
To get more information on the
db_name_change
script, run:In Superset, import your output file by selecting Analyze > Dashboards > Import dashboard.
Using Superset charts
You can use Superset charts to visualize data stored in your cluster. See the Superset documentation for instructions and examples of creating Superset charts.
To view all available Superset charts, select Analyze > Charts.
Using Superset SQL Lab
You can use Superset SQL Lab to write queries to access and modify data stored in your cluster. To access SQL Lab, select Analyze > SQL Editor.
Could this page be better? Report a problem or suggest an addition!