Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
amaaiia
Contributor III

Which is the correct way to write a previous version of a Delta Table?

Hi.

I want to set T1 table old version as current version. One way is to read the old version with a notebook and overwrite the table with that version. Is there any other approach?

Thanks

1 ACCEPTED SOLUTION
nilendraFabric
Honored Contributor

Hello @amaaiia 

The RESTORE command is designed to roll back a Delta Table to an earlier state. This operation updates the table metadata to point to the specified version, effectively making it the current version. However, it does not delete other versions, so you can still access them if needed.

nilendraFabric_0-1738156595886.png

This approach is more efficient than manually reading an old version and overwriting the table. The RESTORE command allows you to revert the table to a specific version or timestamp directly, without creating a new version through manual operations.


Thanks 




View solution in original post

3 REPLIES 3
nilendraFabric
Honored Contributor

Hello @amaaiia 

The RESTORE command is designed to roll back a Delta Table to an earlier state. This operation updates the table metadata to point to the specified version, effectively making it the current version. However, it does not delete other versions, so you can still access them if needed.

nilendraFabric_0-1738156595886.png

This approach is more efficient than manually reading an old version and overwriting the table. The RESTORE command allows you to revert the table to a specific version or timestamp directly, without creating a new version through manual operations.


Thanks 




What occurs when you restore a table to a previous version then have an update operation like append rows? Does it append to the current/restored version or does it append to the most recent (pre-restored) version?

new data will be appended to the restored version, which becomes the current state of the table.

Helpful resources

Announcements
Users online (25)