Can lakeFS in the current release find difference ...
# help
a
Can lakeFS in the current release find difference between the same file in two different commits or branches? If I have json file in one commit, can I diff this file in another commit and see what has changed in this file?
e
Hi @Alex Treyvus, the diff functionality in lakeFS provides the list of files that changed. It does not provide a diff of the data itself within the file. With open table formats such as Iceberg or Delta lakel lakeFS provides additional information on the diff, but not with Jason.
a
Thank you, Einat! We actually want to be able to compare coco json in different commits. Do you know if there are any plans to implement comparison of actual data in different commits or branches in future releases of lakeFS?
e
I don't believe there is. However, you can use the lakeFS hooks mechanism to call your own implementation of diff for the data.
i
Einat is right. I wanted to add that lakeFS does show a text-like diff in the UI. If you want to enrich that, you can customize some hooks to give you that. Or read the files locally and compare them using your own tools, something like this for downloading and comparing:
Copy code
lakectl fs download lakefs://<repo>/<commit1>/<path> commit1_foo.json
lakectl fs download lakefs://<repo>/<commit2>/<path> commit2_foo.json
jd commit1_foo.json commit2_foo.json
heart lakefs 1