You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Low priority because we don't expect to use this more than once a year, and there might be a native rollback function/button someday (see most closely-related ticket PLFM-4607). But for anyone interested in contributing to the package and making a "real" function out of this, here is the code in Python:
importsynapseclientfromsynapseclientimportTablesyn=synapseclient.Synapse()
syn.login()
# Note: this is a simple case where the rollback version applied has the same schema as the current# When rolling back to a different schema, will have to update the schema of the current table first# Table of interesttable_id="syn16787123"# To replace a table, first delete all rowstb_current=syn.tableQuery(f"select * from {table_id}")
tb_current=syn.delete(tb_current)
# Get data from desired snapshotrollback_version=syn.tableQuery(f"select * from {table_id}.154", includeRowIdAndRowVersion=False)
# Update with the snapshot's datatable=syn.store(Table(table_id, rollback_version.filepath))
The text was updated successfully, but these errors were encountered:
Low priority because we don't expect to use this more than once a year, and there might be a native rollback function/button someday (see most closely-related ticket PLFM-4607). But for anyone interested in contributing to the package and making a "real" function out of this, here is the code in Python:
The text was updated successfully, but these errors were encountered: