python - 将 ElasticSearch 连接到超集
问题描述
我需要将 ElasticSearch 连接到 Superset 以进行可视化。当我在 Sources> Databases 中签入 Superset 时,它提到使用 SQLAlchemy URI 和 Database 来测试连接。
在我们的例子中,ElasticSearch 与 Python 库连接,而不是使用 SQLAlchemy。
是否有任何方法可以使用 Python 库将 Elastic Search 与 Superset 连接起来,如果可以,请您通过提及连接方式来提供帮助。
提前致谢。
问候,纳文。
解决方案
您可以通过文档中提到的方式进行连接。您需要添加超集安装程序文档中提到的 dbapi python 包,这将帮助您使用 url elasticsearch+http://{user}:{password 连接到 elk }@{主机}:9200/
pip install elasticsearch-dbapi
推荐阅读
- facebook - 如何将标题和描述等信息添加到帖子中的链接
- ios - 如何在数据库中保存 Apple 应用内购买的收据?
- c# - 尝试序列化异常时忽略自定义解析器
- reactjs - 截取全日历时间网格视图的正确方法
- keystore - 如何应对异常“不是 JKS 或 JCEKS 密钥库(幻数错误;预期 FEEDFEED 或 CECECECE)”
- javascript - sinon.match() 不匹配对象与 Json.stringify 响应
- angular - 你将如何解决这个“承诺
' 不提供签名匹配 '(value: any): {} | PromiseLike<{}>" 错误 - c++ - 如何迭代没有开始/结束的容器?
- python-3.x - 通过 REST API 在 Google Cloud Platform 中更新 Cloud Armor 中的规则的 Python 脚本
- bash - 如果条件在 bash 脚本中为真,如何重新启动进程