【问题标题】:jupyter python notebook using elasticsearch使用 elasticsearch 的 jupyter python notebook
【发布时间】:2023-05-17 05:39:01
【问题描述】:

我在 DSX 中将 elasticsearch 与 jupyter python notebook 一起使用。当我将数据框写入对象存储时,出现错误:

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

Py4JJavaError:调用 o96.save 时出错。 :java.lang.ClassNotFoundException:找不到数据源:org.elasticsearch.spark.sql。请在http://spark-packages.org查找包

【问题讨论】:

    标签: python elasticsearch data-science-experience


    【解决方案1】:

    您需要安装 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

    谢谢, 查尔斯。

    【讨论】:

      最近更新 更多