开源BI工具superset+trino

参考地址:https://hub.docker.com/r/trinodb/trino
目前使用的版本是 docker pull trinodb/trino:391
1.docker run -p 8080:8080 --name trino trinodb/trino
2.docker exec -it trino /bin/bash
3.cd /data/trino/etc/catalog
touch mongodb.properties
里面的内容
connector.name=mongodb
mongodb.connection-url=mongodb://root:aabvb@192.168.2.2408:27017/
mongodb.case-insensitive-name-matching=true

4.进入容器执行客户端
docker exec -it trino trino


show catalogs;

show schemas from tpch; // tpch 是具体catlog名字

use tpch.sf1; // tpch为catalog名字,sf1为schema名字

show tabls;

show tables from tpch.sf1;

show create table tpch.sf1.customer;

select * from tpch.sf1.customer limit 5 \G;

5.连接superset,目前使用的版本是1.5.1
先要安装superset 官方提供的驱动,记得安装驱动要在virtualenv环境下安装,然后要重启,当superset上面出现了trino,才算安装成功
连接 trino://trino@192.168.2.245:8080/mongodb

posted @ 2022-08-02 08:32  学亮  阅读(674)  评论(0编辑  收藏  举报