我想将数据从kibana(Elasticsearch)发送到mysql。
有没有简单的方法可以直接执行此操作,或者可以通过python进行操作吗?
最佳答案
我认为整个任务可以分为两个部分:
如何从elasticsearch获取数据(您可以通过python进行操作):https://elasticsearch-py.readthedocs.io/en/master/
如何向mysql添加数据(您可以通过python来完成):
https://dev.mysql.com/doc/connector-python/en/connector-python-example-cursor-transaction.html
顺便说一句,您可以检查此页面以找到用于通过python从ES中的一个索引获取所有文档的示例脚本:https://discuss.elastic.co/t/get-all-documents-from-an-index/86977
关于python - 如何将Elasticsearch数据复制到SQL Server,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/52739989/