【问题标题】:Error while Loading a Pyspark dataframe into a table in postgres RDS将 Pyspark 数据帧加载到 postgres RDS 中的表中时出错
【发布时间】:2022-01-09 10:21:54
【问题描述】:

尝试将数据帧写入 RDS 中的 postgres 表时出现以下错误

将 DataFrame 写入 RDS 中的 active_user 表

clean_user_df.write.jdbc(url=jdbc_url, table='active_user', mode=mode, properties=config)

【问题讨论】:

标签: dataframe jdbc pyspark load amazon-rds


【解决方案1】:

你需要下载 JDBC 驱动(你可以使用评论中的那个),然后按照 official instruction 使用那个 jar 文件

./bin/spark-shell --driver-class-path postgresql-9.4.1207.jar --jars postgresql-9.4.1207.jar

【讨论】:

  • 感谢您的回复。实际问题出在 RDS 的配置设置上。当我修复它时,我的代码工作了。
猜你喜欢
  • 2019-02-12
  • 2016-01-28
  • 1970-01-01
  • 1970-01-01
  • 2019-11-08
  • 1970-01-01
  • 1970-01-01
  • 2021-03-19
  • 1970-01-01
相关资源
最近更新 更多