google-bigquery - pyspark.sql.utils.IllegalArgumentException:要求失败:尚未设置临时 GCS 路径
问题描述
在 Google Cloud Platform 上,我正在尝试提交一个将数据帧写入 BigQuery 的 pyspark 作业。执行写入的代码如下:
finalDF.write.format("bigquery")\
.mode('overwrite')\
.option("table","[PROJECT_ID].dataset.table")\
.save()
我在标题中得到了提到的错误。如何设置 GCS 临时路径?
解决方案
正如spark-bigquery-connector的 github存储库所说
写的时候可以指定:
df.write
.format("bigquery")
.option("temporaryGcsBucket","some-bucket")
.save("dataset.table")
或者以全局方式:
spark.conf.set("temporaryGcsBucket","some-bucket")
推荐阅读
- react-native - 为什么 Youtube 视频没有在反应原生移动应用程序的 Webview 中显示?
- java - 使用 QueryDSL 和 PostgreSQL 数据库与 GroupBy 汇总
- odoo - 如何根据 Odoo 11 中的状态隐藏编辑按钮
- variables - 如何在 Informix 中检索活动 SAVEPOINT 的名称
- reactjs - 错误:在使用 react-redux 时,Provider 的钩子调用无效
- tensorflow - 对象检测:锚框的纵横比和比例
- c# - 命名空间“Microsoft”中不存在类型或命名空间名称“ServiceBus”?
- python - 我将 python 从 3.5 更新到 3.7,现在找不到 manage.py
- python - Pyinstaller 依赖项的许可证
- mysql - 具有事务正确语法和 in 参数的 MySQL SP