Data were analyzed using the advanced -superset

Foreword

Previous blog has been deployed on the cloud server Ali good superset, concrete can view this link , then try the hands ~

Use superset of

superset of features

superset supports multiple databases, can configure itself, but requires a corresponding installation package before use, the following is a functional diagram superset
Here Insert Picture Description

MySQL deployment

Ali deployed in the cloud and realize the content outside the network, this will not go into details, refer to this link , there are detailed procedures but also on the problems that may arise in connection Navicat made a corresponding solution

superset configuration MySQL
各个数据库的安装都可以使用pip,下面以MySQL作为例子
pip3 install mysqlclient

However, given the goose, as follows:

Complete output from command python setup.py egg_info:
    /bin/sh: 1: mysql_config: not found
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-7qo1k7as/mysqlclient/setup.py", line 18, in <module>
        metadata, options = get_config()
      File "/tmp/pip-install-7qo1k7as/mysqlclient/setup_posix.py", line 53, in get_config
        libs = mysql_config("libs_r")
      File "/tmp/pip-install-7qo1k7as/mysqlclient/setup_posix.py", line 28, in mysql_config
        raise EnvironmentError("%s not found" % (mysql_config.path,))
    OSError: mysql_config not found
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-7qo1k7as/mysqlclient/

This time you lose the following command

sudo apt-get install mysql-server mysql-client
# 然后mysql -V查看mysql是否安装成功
sudo apt-get install libmysqlclient-dev
# 再次安装
pip3 install mysqlclient
# 这个时候就成功了
superset connect to MySQL

Select source-database, then the + sign to the top right corner
Here Insert Picture Description
then required to enter the following URI and tested, e.g.

# 不同的数据库前缀不一,可自行看文档
mysql://用户名:密码@IP/数据库名

If successful, the following figure appears, may be unsuccessful according to one of the debug prompt
Here Insert Picture Description
follow-up are some restrictions on the operation of the database, because this is a test database, so I just used, after saving you can see just set up a database
Here Insert Picture Description
connection down is to extract the data and visual operation, go to SQL Lab-SQL Editor can see our database, and can write SQL statements to extract (also a preview of our data table), can also be stored on SQL, more convenient
Here Insert Picture Description
may additionally add to the source-tables table in the database, can be performed subsequent group, filter, count, sum, min, max and other operations
Here Insert Picture Description

superset Visualization

Which comes with a variety of charts to choose from
Here Insert Picture Description

Published 55 original articles · won praise 30 · views 90000 +

Guess you like

Origin blog.csdn.net/Totoro1745/article/details/104262828