带有SQLAlchemy的Docker中Clickhouse的超集 [英] Superset for Clickhouse in docker with SQLAlchemy

查看:285
本文介绍了带有SQLAlchemy的Docker中Clickhouse的超集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为Clickhouse设置Apache Superset.到目前为止,我的理解是我需要为Clickhouse安装SQLAlchemy https://github.com/xzkostyan/clickhouse-sqlalchemy

我在Ubuntu 16.04 LTS中,并使用Clickhouse和Superset的Docker Vanilla版本:

没有特殊设置

有什么主意如何将两个docker容器与clickhouse-sqlalchemy桥接?在那种情况下如何安装?(如果您有示例命令行,我可以重复使用,那将会很棒)

解决方案

您不需要桥接它们:您想要的是一个超集服务器(您恰好通过docker运行)来连接到Clickhouse数据库(您也恰巧通过docker运行).

您也不需要安装Clickhouse的SQLAlchemy:在数据库">"[新]"

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:

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 like clickhouse://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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆