Skip to main content

View the version history of a table

The version history lists every saved version of a table, newest first. Use it to find when the data changed and which write caused it.

Prerequisites​

  • Your role includes time_machine:read. The portal_admin, data_engineer, and data_analyst roles have it.
  • You can read the table in Data Security.
  • The table is a Lakehouse table, not a view.

Open the version history​

  1. Select Data Explorer.
  2. Select the table in the catalog tree. See Browse the catalog tree.
  3. Select the Time Machine tab, after Properties.

Time Machine tab with the version summary, four cards, filters, and the list of versions

The tabs of a table are Schema, Sample data, Properties, and Time Machine. If the pane is narrow, use the > arrow next to the tabs to reach Time Machine.

If you move to another tab of the table and come back, Time Machine keeps your filters, your selection, and the comparison step you were on.

Read the history​

The top of the tab shows how many versions the table has and when the latest one was saved, for example 128 versions · latest 5 hours ago. View data as of a time… and Compare versions sit on the right. Compare versions stays off until you select two versions in the list.

Four cards sum up the table:

CardWhat it shows
Rows nowNumber of rows in the current version, the same as Total rows after in its details.
Data sizeSize of the data in the current version.
Data filesNumber of data files in the current version.
Versions keptNumber of versions the table has, and how old the oldest one is.

A card shows — when the table does not report that number. This is not an error.

Each row of the list is one version:

ColumnWhat it shows
WhenHow long ago the version was saved, and the date and time to the minute in your local time zone.
What happenedThe kind of change, the Current label on the version that queries read today, and the last 6 digits of the version ID with a button to copy the full ID.
RowsRows the write added, in green (+120), rows it deleted, in red (−15), and the number of rows in the table after the write (19,284 after). — means the version has no count of added or deleted rows to show.

At the end of each row, View data opens the data of the version, and the Details icon opens its details.

What happened uses these labels:

LabelWhat the write did
Rows addedAdded new rows. The first version of a new table also has this label.
Data replacedReplaced existing data, for example when rows were updated.
Rows deletedDeleted rows.
Data rewrittenRewrote the stored data files without changing the rows, for example after an OPTIMIZE run on the table.
Other changeThe kind of change is not recorded.

To spot a bad write, look for Data replaced, or for a row count very different from the writes before it.

If the table does not report which version is current, no row shows Current. The rest of the history is still correct.

The list shows 20 versions per page by default. Use the page controls under the list to show 50 or 100.

Filter the versions​

Filters help you find a version in a long history:

  • Select Rows added, Data replaced, or Rows deleted to show only that kind of change. You can select one at a time. Data replaced also shows the versions labeled Data rewritten. Select All to show every version again.
  • Pick a date in From, To, or both. From starts at 00:00 of that day and To ends at the end of that day, in your local time zone.

The filter bar shows how many versions match, for example Showing 12 of 128 versions, and the time zone it uses. When no version matches, the list shows No versions match these filters. with a Clear filters link that removes every filter.

Time Machine loads the latest 500 versions first. When a table has more, select Load older versions to load the next 500. Filters only search the versions already loaded.

See the details of a version​

  1. Select the Details icon at the end of the row of the version.

Version details panel with the version ID, save time, kind of change, row counts, and buttons

The Version details panel shows:

FieldWhat it shows
Version IDThe full ID of the version, with a button to copy it.
Saved atDate and time with seconds, and how long ago.
What happenedThe kind of change, with the system's own name for it, for example append.
Rows added, Rows deletedRows this write added or deleted, or — when no count was recorded.
Total rows afterNumber of rows in the table after this write.
Data size, Data filesSize and number of data files after this write.
Delete filesNumber of files that record deleted rows.
Previous versionThe version before this one, or First version.
Branches / tagsNames given to this version with their type, for example main (branch), or None.

From the panel you can:

The compare buttons appear only if you can compare versions. Compare with previous version is off on the first version and when the previous version is not loaded yet. Compare with current version is off on the current version.

When the history is empty or does not load​

You seeWhat it meansWhat to do
No Time Machine tabThe object is a view or a table in another format, or your role does not include time_machine:read.Pick a Lakehouse table, or ask your Admin for the permission.
1 versionYou can view its data, but you need 2 versions to compare.Wait for the next write.
No versions match these filters.No loaded version matches the filters.Select Clear filters, or select Load older versions if the table has more than 500 versions.
We could not load the version history.The history did not load. View data as of a time… and Compare versions are off.Select Try again. For the meaning of each message, see Time Machine limits and messages.

Next steps​