【发布时间】:2021-12-14 20:14:20
【问题描述】:
我刚刚开始使用 dataproc 在 bigquery 中对大数据进行机器学习。当我尝试运行此代码时:
df = spark.read.format('bigquery').load('bigquery-public-data.samples.shakespeare')
我收到了这样的部分错误:
java.lang.ClassNotFoundException: Failed to find data source: bigquery. Please find packages at http://spark.apache.org/third-party-projects.html
我在这个 git repo 中找到了一些类似的教程:https://github.com/GoogleCloudDataproc/spark-bigquery-connector
但是不知道在哪里编写和运行这些脚本。你能让我明白吗?
提前致谢
【问题讨论】:
-
感谢您的回复。它让我明白了一点,但我还没有找到解决方案。我需要在 dataproc 集群下的 jupyter notebook 上工作。
-
Github 自述页面包含如何启用 biquery API 和安装 jars (github.com/GoogleCloudDataproc/spark-bigquery-connector) 的步骤。您完成安装步骤了吗?
标签: apache-spark dataproc