Hubert-Dudek
Databricks MVP

You can change a column’s type or name or drop a column by rewriting the table. To do this, use the

overwriteSchema option. But please back up your table first.

spark.read.table("table_name") \
.write \
.format("delta") \
.mode("overwrite") \
.option("overwriteSchema", "true") \
.saveAsTable("table_name")


My blog: https://databrickster.medium.com/

View solution in original post