[英]how add records to a partitioned delta table?
I am practicing with the partitioning of a table, I have this我正在练习分区表,我有这个
df.write.format("delta").mode("overwrite").partitionBy("Month").save(path)
But I'm not sure how add records, maybe something like this但我不确定如何添加记录,也许是这样的
df2.write.format("delta").mode("append").partitionBy("Month").save(path)
Yes, if you just need to append new records, you need to use append
mode instead of overwrite
.是的,如果您只需要追加新记录,则需要使用
append
模式而不是overwrite
。 In future, when you will need to update some records & insert other, then you need to look onto MERGE INTO command .将来,当您需要更新一些记录并插入其他记录时,您需要查看MERGE INTO 命令。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.