Overwrite data coming from source to lakehouse in data fabric

56 Views Asked by At

My data is coming from a source X. However, everyday the data is getting updated. So when that data is coming to lakehouse in data fabric, it is getting appended everytime. How do I overwrite the old with the new ones and also add new data.

Eg. This is my data:

enter image description here

When the value column is updated in source, the entire data is getting appended. Like below:

enter image description here

However, I want the values to be overwritten like below.

enter image description here

1

There are 1 best solutions below

3
Nikill On

I assume you're writing data to the lakehouse using a notebook in Fabric ? If yes, you should use the mode("overwrite") when writing the table : df.write.format("delta").mode("overwrite").saveAsTable("myTable")