Skip to main content

Time Machine overview

Time Machine shows how a table looked in the past and what changed between two points in time. Use it to check a nightly job that wrote wrong data, or to show an auditor the data as it was on a given day.

Time Machine only reads data. You do not need special SQL, and you do not need to restore or copy the table.

How versions work​

Every time data is written to a table, the Lakehouse saves a new version. A version is a fixed, read-only state of the whole table at that moment. You can go back to an older version as long as it is kept.

A table gets its first version when it is created, before any row is written. Changing only the structure of a table, for example adding a column, dropping a column, or changing its type, saves no version. The new structure shows in the next version that writes data.

Each version records when it was saved, what kind of change the write made, for example Rows added or Data replaced, and the row counts recorded for the write. The version that queries read today is marked Current.

Versions are not kept forever. When Lakehouse Janitor removes old versions of a table, they no longer appear in Time Machine.

What you can do​

Time Machine is the Time Machine tab of a table in Data Explorer. It has no menu item of its own.

TaskWhat it answersPage
View the version historyWhen did the table change, and what kind of change was it?View the version history of a table
View past dataWhat did the rows look like at that version or at that time?View data as of a version or a time
Compare two versionsWhich columns changed, and which rows were added, removed, or changed? Download the differences as CSV.Compare two versions of a table

A typical investigation​

  1. Open the version history of the table and find the version where the numbers changed. The Data replaced filter and the Rows column help here.
  2. View the data of the version just before it to see the data as it was.
  3. Start a comparison of the two versions. The first step shows at once whether columns were added, removed, or changed.
  4. Match the rows by a key column, check the size, and run the comparison to get the exact rows that changed.
  5. Download the result as CSV for your incident report.

Comparing rows reads a lot more data than the other tasks. Time Machine estimates the size first and asks you to run the comparison within a few minutes of that check.

Which tables work​

Time Machine works with Lakehouse tables, the tables in the Lakehouse table format, which keeps versions. Views and tables in other formats have no Time Machine tab.

A table needs at least 2 versions before you can compare. A new table has 1 version with no rows until data is first written to it.

Your data access applies​

Time Machine reads data with your own account. The same rules as in Query Editor apply: the tables you can read, the columns you can see, row filters, and masked columns from Data Security. Time Machine never shows more than you can query yourself.

Limits keep large reads from slowing down the shared Lakehouse. For the default values, see Time Machine limits and messages.

Who can use Time Machine​

PermissionLets youRoles that have it
time_machine:readOpen the Time Machine tab, view the version history, and view past data.portal_admin, data_engineer, data_analyst
time_machine:metadata_diffStart a comparison and see the structure changes between two versions.portal_admin, data_engineer, data_analyst
time_machine:data_diffStart a comparison, match rows, check the size, run the comparison, and download the CSV.portal_admin, data_engineer, data_analyst

What you see depends on the permissions you have:

  • Without time_machine:read, the table has no Time Machine tab.
  • With time_machine:read only, you can view the history and the data, but the list has no check boxes and no Compare versions button.
  • Without time_machine:metadata_diff, the first step of a comparison shows a message instead of the structure changes.
  • Without time_machine:data_diff, a comparison stops at the first step.

To open Data Explorer, your role also needs data_explorer:browse. See Portal roles and permissions.

Next steps​