Querying
Compare two items
Read two items fresh from the table, see every attribute that differs, and copy values from one to the other as pending changes.
Compare puts two items side by side and marks every attribute that differs. Both items are read fresh from the table by key, so the dialog shows what DynamoDB holds now, not the copy the grid loaded earlier. Compare is part of the bulk actions in the selection row, which require the Pro plan.
Open the comparison
Select exactly two rows in the data grid. Then press Compare 2 items in the selection row, or run Compare two rows from the command palette. The Compare items dialog opens and shows Reading both items from the table… while it reads.
When a read fails, the dialog says why and offers Try again. An item the table no longer has, or a row without its full primary key, is named instead of compared.
Read the comparison
The dialog lists every attribute that either item holds, with its type, in an A column and a B column. Each column header shows that item’s key. Key attributes come first and are marked Key attribute. An attribute one item lacks reads absent on that side.
Each attribute that differs carries one of three marks:
- Differs means both items hold the attribute with different values.
- Only in A means only item A holds it.
- Only in B means only item B holds it.
Values compare by type. The numbers 1.50 and 1.5 match, but a Number and a String with the same text differ.
A count at the top reads N attributes differ. Turn on Only differences to hide the attributes that match. When nothing differs, the dialog says The two items hold the same attributes and values.
Look inside maps, lists and sets
When both items hold the same kind of container, its row expands to compare what is inside.
- A map compares key by key.
- A list compares by position. Extra elements show as only in A or only in B.
- A set compares by membership, so member order never matters. The numbers
1and1.0are one member.
A map or list nested inside opens the same way. A map against a list, or a string set against a number set, stays one row. Nested rows carry the same marks as attributes, and Only differences hides the matching ones too.
Copy values between the items
Arrow buttons between the columns copy a value from one item to the other. When the source item lacks the attribute, the arrow removes it from the other item instead. Key attributes never copy.
A copy is staged as a pending change on the other row. The dialog and the grid both mark it Staged, and it goes through the usual review sheet, revert and commit. See Review and commit. Copies build on each other, and a row stays open after a copy.
Nested rows have arrows too:
- A map entry or a list element copies across, or is removed where the source has none.
- A set member is added to the other item’s set, or removed from it. Taking out a set’s last member removes the set.
- A list element copies only where nothing after it would shift. That means in place, as the next element of a shorter list, or as the removal of the last element of a longer list.
A nested copy stages the whole attribute’s new value, so you review, revert and commit it like any other edit.
Beside each Staged mark, a revert button puts that attribute back the way the table holds it on that side. This works whether the change came from the dialog or from the grid. The row is then marked again against the fresh read, and a row with nothing else pending stops being pending.
When a copy is refused
The arrows into an item stay focusable but do nothing, and the dialog gives the reason, in two cases:
- The item is marked for deletion. The dialog says
Item B is marked for deletion. - The item has pending changes made before the table changed that attribute. The dialog says, for example,
Item B changed in the table since it was edited. Revert its pending edit for <name> to copy.
The revert button stays usable, so you can clear the old edit and copy again.
On a read-only result set, the dialog shows the comparison with no arrows and no revert, and the footer says This result set is read-only, so values cannot be copied.
Last updated on