gpt4 book ai didi

python - 使用elasticsearch的jupyter python笔记本

转载 作者:行者123 更新时间:2023-12-03 01:46:59 26 4
gpt4 key购买 nike

我在DSX中将Elasticsearch与jupyter python笔记本一起使用。将数据帧写入对象存储时,出现错误:

ratings_df.write.format("org.elasticsearch.spark.sql").save("swift://DSConnections.spark/ratings.es")

Py4JJavaError: An error occurred while calling o96.save.: java.lang.ClassNotFoundException: Failed to find data source: org.elasticsearch.spark.sql. Please find packages at http://spark-packages.org

最佳答案

您需要安装elasticsearch连接器。
import pixiedust
pixiedust.installPackage("org.elasticsearch:elasticsearch-spark_2.10:2.4.4")

PixiedustManager引用

http://datascience.ibm.com/docs/content/analyze-data/Package-Manager.html#installfrommavensearch

谢谢,
查尔斯

关于python - 使用elasticsearch的jupyter python笔记本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43191214/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com