mongodb - 将 Spark 数据帧写入 MongoDB 时出错
问题描述
当我尝试使用从 spark 写入 MongoDB 时
MongoSpark.save(df.write.option("collection", "hundredClub").mode("overwrite"))
MongoDB 中现有的旧数据不会被覆盖,它保持不变。在追加模式下,数据帧行在 MongoDB 中追加。
覆盖模式时出错:
couldn't find collection(hundredClub) using single partition.
它无法找到该集合
解决方案
推荐阅读
- javascript - 反应构建中的错误:本机代码不是函数
- python - 所有可能的组合与可能的最大集合,但受一个值的限制
- java - Java 程序获取素数列表并将符号字符串作为输出提供给相应的 G ̈odel 语句
- html - 如何在 index.html 中包含 sub-index.html
- typescript - Visual Studio Code 自动完成显示了很多选项
- python - 为什么 Tensorflow 转置在某种情况下会失败?
- react-native - 是否可以规模化
随着缩放的增加和减少? - python - 类型提示中的可选联合
- java - 在Java中使用正则表达式查找非数字的索引
- docker - 以桥接模式部署 Mesos docker 容器,但端口固定且超出预定义范围