当前位置:网站首页>[报错]Exception: Found duplicate column(s) in the data schema: `value`;
[报错]Exception: Found duplicate column(s) in the data schema: `value`;
2022-07-26 11:00:00 【胖胖学编程】
val value_path="file:///Users/kelisiduofu/Desktop/UIS/value1"
val conf=new SparkConf().setAppName("UIS_TMP").setMaster("local[*]")
val spark=SparkSession.builder().config(conf).getOrCreate()
val frame1=spark.read.json(value_path)
frame1.createTempView("t1")
spark.sql("select * from t1").show()
检查json串,发现有两个value

设置大小写敏感即可
val value_path="file:///Users/kelisiduofu/Desktop/UIS/value1"
val conf=new SparkConf().setAppName("UIS_TMP").setMaster("local[*]")
val spark=SparkSession.builder().config(conf).getOrCreate()
spark.sql("set spark.sql.caseSensitive=true")---这里
val frame1=spark.read.json(value_path)
frame1.createTempView("t1")
spark.sql("select * from t1").show()边栏推荐
- Logging learning final edition - configured different levels of log printing colors
- Visual conversion of nmap vulnerability scanning results
- 3Dunity游戏项目实战——第一人称射击游戏
- 菜鸟看源码之SparseArray
- 实时流式协议--RTSP
- -bash: ./build. Sh: /bin/bash^m: bad interpreter: no that file or directory
- pytest fixture装饰器
- Pyqt5 rapid development and practice 3.1 QT designer quick start
- easyui05
- 二分模板总结
猜你喜欢

C#笔记

Linkedblockingqueue of novice source code

3Dunity游戏项目实战——第一人称射击游戏

Bash shell学习笔记(七)

Bash shell学习笔记(四)

0x00007ffd977c04a8 (qt5sqld.dll) (in a.exe): 0xc0000005: an access violation occurred when reading position 0x0000000000000010

MySQL死锁分析

Many people don't know whether they are looking for Kanban software or Kanban software

Bash shell学习笔记(三)

232. Implement queue with stack
随机推荐
[开发工具] IEDA报红
A new technical director asked me to do an IP territorial function~
Traversal recursion + iteration of binary tree
3Dunity游戏项目实战——第一人称射击游戏
36.【const函数放在函数前后的区别】
Newbie sees the source code arraydeque
easyui03
349. Intersection of two arrays
产品无力销量下滑 上汽名爵还能否走出阴霾
Bash shell学习笔记(三)
MySQL死锁分析
Drbl diskless startup + Clonezilla network backup and restore system
Bash shell学习笔记(二)
Att request of ble
Access rights - private, public, protected
Bash shell学习笔记(六)
How to configure the jdbcrealm data source?
如何配置JdbcRealm数据源呢?
Bash shell learning notes (VII)
找工作4个月,面试15家,终于拿到3个offer,定级P7+