Apr 27, 2024
In case its existing column then we need to run just alter command or still need to run this also.
df = spark.read.table("sales")
df.write.format("delta")
.mode("overwrite")
.option("overwriteSchema", "true")
.partitionBy("SnapshotDate")
.saveAsTable("sales")