superset安装与使用

superset安装与使用

2018年05月29日 17:22:23

阅读数:568

 

本文介绍superset的安装(linux环境)与简单使用

环境准备

1.linux(这里是以centos7为示例)

2.docker环境

安装superset

1.查找superset相关的镜像

docker search superset

superset安装与使用

2.拉取镜像

docker pull amancevice/superset

superset安装与使用

3.查看镜像是否下载完成

docker images

superset安装与使用

4.创建superset容器

docker run -d -p 8888:8088 amancevice/superset

superset安装与使用

6.查看容器是否运行成功

docker ps

superset安装与使用

7.初始化数据库

docker exec -it 容器ID superset db upgrade

superset安装与使用

8.superset初始化

docker exec -it 容器ID superset init

superset安装与使用

9.设置用户名和密码

docker exec -it 容器ID fabmanager create-admin --app superset

superset安装与使用

这里应该已经可以访问superset,使用刚刚创建的用户名、密码

http://ip:port

superset安装与使用

superset使用

连接Mysql数据库

1.点击添加按钮

superset安装与使用

2.填写数据库信息,点击测试连接,应该会出现seems ok!提示,页面底部会显示所有表记录

superset安装与使用

superset安装与使用

superset安装与使用

3.编辑角色,给admin角色赋刚刚添加的数据库权限

superset安装与使用

superset安装与使用

4.添加数据表,在列列表和指标列可以添加自己的统计维度和指标

superset安装与使用

superset安装与使用

5.添加完后在回到表列表视图,点击刚刚添加的表名即可产生报表

superset安装与使用

6.报表操作

superset安装与使用

连接druid数据源

1.点击添加按钮

superset安装与使用

2.填写druid集群信息

superset安装与使用

3.扫描新的数据源

superset安装与使用

4.此时会出现数据源列表,可以视其为mysql数据表一样操作即可

superset安装与使用

5.点击编辑

superset安装与使用

6.这里可以根据业务需求编辑指标和维度等信息

superset安装与使用

7.druid数据源展示列表信息

superset安装与使用

8.druid数据源展示分组统计信息

superset安装与使用

再跟大家贴上superset官网文档链接: