Azure Databricks 上的 PySpark Kusto 连接器

问题描述 投票:0回答:2

我使用 Azure databricks 与 LTS 7.3 和 Spark 3.0 (PySpark) 与 com.microsoft.azure.kusto:kusto-spark_3.0_2.12:2.9.1 连接器已经有一段时间了,但最近我的作业失败并出现以下错误 (随机地,有时它们会运行,有时它们只是失败)

df = pyKusto.read                                                        \
           .format("com.microsoft.kusto.spark.datasource")               \
           .option("kustoCluster", kustoOptions["kustoCluster"])          \
           .option("kustoDatabase", kustoOptions["kustoDatabase"])         \
           .option("kustoQuery", Query)                                    \
           .option("kustoAadAppId", kustoOptions["kustoAadAppId"])           \
           .option("kustoAadAppSecret", kustoOptions["kustoAadAppSecret"])    \
           .option("kustoAadAuthorityID", kustoOptions["kustoAadAuthorityID"]) \
           .load()
java.lang.ClassNotFoundException: Failed to find data source: com.microsoft.kusto.spark.datasource. Please find packages at http://spark.apache.org/third-party-projects.html

我已经在集群上安装了该库,并且它已经运行了一段时间,没有出现任何问题,但不确定最近发生了什么。如果有人看到这个问题,请建议任何解决方法?

谢谢

azure pyspark spark-streaming azure-data-explorer kusto-java-sdk
2个回答
0
投票

在 Databricks 中尝试将 kusto-spark 库从

kusto-spark_3.0_2.12:2.9.1
升级到
kusto-spark_3.0_2.12:3.0.0
:

Libraries -> Install New -> Maven -> 复制以下坐标:

com.microsoft.azure.kusto:kusto-spark_3.0_2.12:3.0.0

如果还是不行,你可以创建新问题这里

参考 - https://github.com/Azure/azure-kusto-spark#Linking


0
投票

有点晚了,但这对我有用:

df = spark.read                                                        \
           .format("com.microsoft.kusto.spark.datasource")               \
           .option("kustoCluster", kustoOptions["kustoCluster"])          \
           .option("kustoDatabase", kustoOptions["kustoDatabase"])         \
           .option("kustoQuery", Query)                                    \
           .option("kustoAadAppId", kustoOptions["kustoAadAppId"])           \
           .option("kustoAadAppSecret", kustoOptions["kustoAadAppSecret"])    \
           .option("kustoAadAuthorityID", kustoOptions["kustoAadAuthorityID"]) \
           .load()

所以,spark而不是pykusto

© www.soinside.com 2019 - 2024. All rights reserved.