Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write a helper function to return the hash of a dolt table at a specific branch commit #68

Open
n8layman opened this issue Dec 5, 2023 · 0 comments

Comments

@n8layman
Copy link
Contributor

n8layman commented Dec 5, 2023

It would be useful to add a helper function, maybe dolthub_table_hash(), that can retrieve the hash of a specific table. This would allow for targets to check if a table has been updated as a part of the workflow. Checking a table hash can be done using the DOLT API via something like SELECT SHA1('aido_diseases') which could be combined with AS OF to check the hash of a table at one commit against the hash of a table at another. I don't think DOLT has checksum but SHA1() does work.

This might also be useful as a targets factory, i.e. tar_dolthub_table(),

from @noamross:

It would create two targets, the first checking the SHA of the table, and the second, depending on it, fetching the table.https://wlandau.github.io/targetopia/contributing.html#target-factories
R Targetopia

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant