json - 如何通过 spark 读取带有重复列的 json?
问题描述
我正在通过 spark 阅读 json,没有什么特别的:
spark.read.option('compression', 'gzip').option('dropFieldIfAllNull', True)\
.json(source_final)
但它失败了: Found duplicate column(s) in the data schema
。500 Mb 文件中没有连接,只有 2 个 JSON 行有重复的字段,整个 spark 作业失败。任何解决方法?
解决方案
推荐阅读
- c++ - C++ 构造函数查询
- javascript - 在jquery中撤消mouseleave上的substr函数
- c# - 我的 mySQL Delete 命令无法正常工作
- .net - 如何使用 MimeKit 从电子邮件中排除签名和引用部分?
- twilio - 在 twilio 函数中获取回调函数错误
- php - LARAVEL Eloquent: BelongsTo 关系 - 批量更新
- amazon-web-services - 不使用 .htaccess 的新 Elastic Beanstalk 实例
- r - 如何计算两个日期之间的持续时间
- javascript - 如何使用自定义 Axios 实例取消令牌?
- excel - Excel 中不同工作表的超链接下拉列表