标签:mode write tin const controls span rgba ble control
pyspark有个bug, 虽然下面代码写了 write.mode("overwrite")但是不生效
spark.conf.set("hive.exec.dynamic.partition.mode", "constrict") db_df.repartition(1).write.mode("overwrite").insertInto("TABLE")
所以会导致TABLE内数据有重复的现象。
如何去重插入数据表?
在insertInto("TABLE", True) 加上True参数即可,表示的同样是"isOverwrite".
[Spark] pyspark insertInto 去重插入数据表
标签:mode write tin const controls span rgba ble control
原文地址:https://www.cnblogs.com/shiyublog/p/14430394.html