当前位置:网站首页>[报错]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()边栏推荐
- mother
- Bash shell learning notes (III)
- Introduction to authoringrealm
- JVM基本概念及内存管理模型
- PyQt5快速开发与实战 第1章 认识PyQt5
- Shell script fails to execute repeatedly automatically
- Scrapy ip代理无响应
- 1748. Sum of unique elements
- Logging learning final edition - configured different levels of log printing colors
- 数据可视化-《白蛇2:青蛇劫起》(2)
猜你喜欢
随机推荐
Bash shell learning notes (II)
Bash shell学习笔记(一)
How the ThreadPoolExecutor performs tasks
35. Search the insertion position
复现php一句话木马
线程之间的几种通信方式
1837. Sum of digits under k-ary representation
承认吧 投新能源就是为了安全感
Analysis of C # delegation and anonymous method
Software Testing Overview: the background, essence and process of software testing
Visual conversion of nmap vulnerability scanning results
C#笔记
pytest conftest.py和fixture的配合使用
Multipartfil to file
产品无力销量下滑 上汽名爵还能否走出阴霾
Logging advanced use
Logging learning final edition - configured different levels of log printing colors
pytest pytest.ini配置 用例分组 用例跳过
Classic Bluetooth connection process
ESXi6.5补丁更新









