Julian Gimbel on 05 Sep 2024 10:02:04
Is your feature request related to a problem? Please describe:
When deleting a File in a Lakehouse Folder unintentionally it should be possible to restore it via a simple python command. The data should still be avalailable because OneLake works with softdelete for 7 days. (https://learn.microsoft.com/en-us/fabric/onelake/onelake-disaster-recovery#soft-delete-for-onelake-files)
Describe the solution you'd like:
I would like to see a function like restore_deleted_file_from_onelake(path="Files/bronze/datasource1/data.csv")
Describe alternatives you've considered:
Restoring individual files currently works with the use of powershell for restoring the data, but that is much more complicated than running a notebook in the Fabric Web UI.
Additional context:
This function could be the basis for a future restore concept for a Lakehouse.
The users would need to store the folder structures and the paths to the Delta Log files (e.g. /Tables/table_name/_delta_log/00000000000000000000.json
With that information it should be possible to restore the delta log file and that json file contains the paths for the individual parquet files with the data (e.g. /Tables/table_name/part-00000-22e5716c-23e3-44fe-90ee-a9a858a5c10c-c000.snappy.parquet). After restoring those the tables should be completely restored.