[Druid] (9) E-MapReduce Druid cluster integrated Superset (data exploration and visualization platform)

I. Introduction

The E-MapReduce Druid cluster integrates the Superset tool. Superset has deeply integrated E-MapReduce Druid and also supports a variety of relational databases. Since E-MapReduce Druid also supports SQL, E-MapReduce Druid can be accessed in two ways through Superset, namely Apache Druid native query language or SQL.

2. What is Apache Superset?

Superset is an open source data exploration and visualization platform (formerly known as Panoramix, Caravel) of Airbnb (a well-known online short-term rental company). This tool is very distinctive in visualization, ease of use and interactivity, and users can easily visualize data analysis. Superset is also an enterprise-level business intelligence web application.

Superset has been donated to the Apache Software Foundation and is currently in the incubation stage.

Insert picture description here

Insert picture description here
core function:

  • Quickly create interactive data visualization dashboards

  • Rich visual chart templates, flexible and expandable

  • Fine-grained and highly scalable security access model, supporting major authentication providers (database, OpenID, LDAP, OAuth, etc.)

  • Concise semantic layer, which can control how data resources are displayed in the UI

  • Deeply integrated with Druid, can quickly analyze large-scale data sets

3. Prerequisites

Superset is installed on the emr-header-1node by default , and HA is not currently supported. Before using this tool, make sure that your host can access emr-header-1 normally. For specific steps, see Connecting to the master node using SSH .

Fourth, use Superset

  1. Log in to Superset.

Type in the address bar of the browser http://emr-header-1:18088and press Enter to open the Superset login interface. The default user name and password are both admin. Please change the password in time after logging in.

Insert picture description here

  1. Add E-MapReduce Druid cluster.

After logging in, the default interface is English. You can click the flag icon in the upper right corner to select the appropriate language. Next, select Data Source > Druid Cluster in the upper menu bar to add an E-MapReduce Druid cluster.

Insert picture description here

Configure the addresses of the Coordinator and Broker. Note that the default port in E-MapReduce is the corresponding open source port plus the number 1, for example, the open source Broker port is 8082, and in E-MapReduce it is 18082.

Insert picture description here

  1. Refresh or add a new data source.

After adding the E-MapReduce Druid cluster, you can click Data Source> Scan New Data Source , and the data source on the E-MapReduce Druid cluster can be automatically loaded.

You can also click on the interface data source> Druid data source to customize a new data source (which is equivalent to operating a data source ingestion write the json file), follow these steps.

Insert picture description here
When customizing the data source, you need to fill in the necessary information and save it.

Insert picture description here
After saving, click set on the left, edit the data source, and fill in the corresponding dimension columns and indicator columns.

Insert picture description here
4. Query E-MapReduce Druid.

After the data source is successfully added, click the data source name to enter the query page for query.

Insert picture description here

  1. (Optional) Use E-MapReduce Druid as the E-MapReduce Druid database.

Superset provides SQLAlchemy to support various databases in multiple dialects. The supported database types are shown in the following table. ,

Insert picture description here

Superset also supports this way to access E-MapReduce Druid. The SQLAlchemy URI corresponding to E-MapReduce Druid is druid://emr-header-1:18082/druid/v2/sql, as shown in the figure below, adding E-MapReduce Druid as a database.

Insert picture description here

Then you can use SQL to query in the SQL toolbox.

Guess you like

Origin blog.csdn.net/BeiisBei/article/details/107835094