Skip to main content

Compare the structure of two snapshots

Comparing structure shows what changed in a table between two snapshots, such as added columns, a new partitioning, or a jump in the record count. It does not read the rows, so it is fast and a good first check before you compare data.

Prerequisites​

  • Your role includes time_machine:metadata_diff. The portal_admin, data_engineer, and data_analyst roles have it.
  • You can read the table in Data Security.
  • The table has at least 2 snapshots.

Choose the order of the snapshots​

You pick two snapshots: Snapshot A and Snapshot B. Time Machine treats A as "before" and B as "after", and calculates every change as B minus A. It does not sort them by time for you.

Pick the older snapshot as A and the newer one as B. If you swap them, the numbers are still right, but they read backwards. A table that grew by 500 records shows as -500.

Compare the structure​

  1. Open the Time Machine tab of the table.
  2. Select the older snapshot in Snapshot A.
  3. Select the newer snapshot in Snapshot B. It must be different from A.
  4. Select Compare.

Structure comparison of two snapshots with six result sections

Read the result​

The result has six sections.

SectionWhat it compares
SnapshotThe two snapshots: ID, time, and kind of write.
SchemaColumns added, removed, or changed in type.
PartitionHow the table is split into partitions.
PropertiesThe technical settings of the table.
FilesThe number and size of data files.
RecordsThe number of records, and the change from A to B.

A section can show Not available with a reason. For example, the partition layout of an old snapshot may no longer be stored. This is not an error. The other sections are still correct.

If something goes wrong​

SituationWhat it meansWhat to do
The snapshot pair is not validYou picked the same snapshot twice, or one of them does not exist.Pick two different snapshots from the timeline.
Access deniedYour role or your data access does not allow it.Ask your administrator for time_machine:metadata_diff or for access to the table.

Next steps​