带有SQLAlchemy的Docker中Clickhouse的超集 [英] Superset for Clickhouse in docker with SQLAlchemy
问题描述
我正在尝试为Clickhouse设置Apache Superset.到目前为止,我的理解是我需要为Clickhouse安装SQLAlchemy https://github.com/xzkostyan/clickhouse-sqlalchemy
我在Ubuntu 16.04 LTS中,并使用Clickhouse和Superset的Docker Vanilla版本:
- https://store.docker.com/community/images/yandex/clickhouse-server
- https://hub.docker.com/r/amancevice/superset/
没有特殊设置
有什么主意如何将两个docker容器与clickhouse-sqlalchemy桥接?在那种情况下如何安装?(如果您有示例命令行,我可以重复使用,那将会很棒)
您不需要桥接它们:您想要的是一个超集服务器(您恰好通过docker运行)来连接到Clickhouse数据库(您也恰巧通过docker运行).
您也不需要安装Clickhouse的SQLAlchemy:在 http://localhost:8088/
类似地,当您运行 $ docker run -d --name some-clickhouse-server --ulimit nofile = 262144:262144 -v/path/to/your/config.xml:/etc/clickhouse-server/config.xml yandex/clickhouse-server
,您应该最终获得一个Clickhouse实例,该实例可以通过SQLAlchemy在类似 clickhouse://default上进行访问:@ some-clickhouse-server/test
您需要根据config.xml修改该连接URI-您应该能够通过在python控制台中连接它来再次检查它是否有效. 然后,您应该能够以与连接任何其他数据库相同的方式将超集连接到Clickhouse db:导航到Superset的菜单>源">数据库">"[新]"
I'm trying to setup Apache Superset for Clickhouse. My understanding so far is that I need to install SQLAlchemy for Clickhouse https://github.com/xzkostyan/clickhouse-sqlalchemy
I'm in Ubuntu 16.04 LTS, and using the Docker vanilla version of Clickhouse and of Superset:
- https://store.docker.com/community/images/yandex/clickhouse-server
- https://hub.docker.com/r/amancevice/superset/
without special settings
Any idea how I can bridge the two docker containers with clickhouse-sqlalchemy ? Where and how in that case to install that? (if you have sample command line that I can reuse that will be great)
You don't need to bridge them: what you want is a superset server (that you happen to be running via docker) to connect to a clickhouse database (that you also happen to be running via docker).
You also shouldn't need to install SQLAlchemy for Clickhouse: looking at the dockerfile at https://hub.docker.com/r/amancevice/superset/~/dockerfile/ that image has already sqlalchemy-clickhouse
installed for you.
Your steps should be as follow:
When you
docker run --detach --name superset [options] amancevice/superset
you should have your superset instance running at http://localhost:8088/Similarly, when you run
$ docker run -d --name some-clickhouse-server --ulimit nofile=262144:262144 -v /path/to/your/config.xml:/etc/clickhouse-server/config.xml yandex/clickhouse-server
you should end-up with a clickhouse instance that you can access via SQLAlchemy at something likeclickhouse://default:@some-clickhouse-server/test
You'd need to modify that connection URI based on your config.xml - and you should be able to double-check that it works by connecting to it in your python console.You should then be able to connect superset to your clickhouse db in the same way you'd connect to any other DB: by navigating into Superset's menu > Sources > Databases > [new]
这篇关于带有SQLAlchemy的Docker中Clickhouse的超集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!