Deleting & truncating tables

Safely delete a table or truncate all its items, with type-to-confirm guards.

Tablyne offers two destructive table actions — truncate (empty a table) and delete (remove it entirely) — both gated behind an AWS-style type-to-confirm dialog.

Where to find them

Right-click a table in the table list. At the bottom of the context menu:

  • Truncate — deletes every item but keeps the table, its keys, indexes and settings.
  • Delete table — removes the whole table (shown in red).

The type-to-confirm guard

Both actions open a confirmation dialog modeled on the AWS console. To enable the confirm button you must type the exact table name into the input. This prevents one-click accidents on the wrong table.

Enable confirmType the table name exactly
ConfirmClick the button, or press Enter when it matches
CancelClick Cancel, press Esc, or click outside the dialog

Delete uses a red (danger) confirm button; truncate uses the standard accent.

Truncate — how it works

Truncate empties the table by deleting every item:

  1. Tablyne reads the table’s key schema (PK and optional SK).
  2. It scans the table page by page (up to 1000 items per page) so memory stays bounded — it never loads the whole table at once.
  3. For each page it extracts just the key attributes and issues BatchWriteItem delete requests in chunks of 25.
  4. Unprocessed items are retried with exponential backoff (up to several attempts) so throttling on large tables doesn’t silently leave rows behind.

Truncate reuses the same robust bulk-delete path as bulk operations, and reports how many items were actually deleted.

Truncate can take a while and consume write capacity on large tables, since every item is individually deleted. On a provisioned table this counts against your WCU.

Delete — how it works

Delete issues a single DynamoDB DeleteTable call. The table, all its items, and its indexes go away together.

Deletion protection

If the table has deletion protection enabled, AWS refuses DeleteTable and Tablyne surfaces the error. Turn protection off first in table settings, then delete. This is a separate, server-side safeguard on top of the type-to-confirm guard.

After the action

On success, the table list refreshes — the table disappears (delete) or stays but empty (truncate). Any organization metadata (pins, labels, group) is keyed by table name and stored locally; deleting a table on AWS doesn’t remove that local metadata.

Truncate vs. delete vs. filtered bulk delete

ActionKeeps table?Scope
TruncateYesEvery item
Delete tableNoThe whole table
Bulk deleteYesOnly items matching a filter

If you only want to remove some items, use a filtered bulk delete instead of truncating.

Choosing the right tool

  • Resetting a dev table between test runs → truncate (or point at DynamoDB Local).
  • Decommissioning a table for good → delete (disable protection first if set).
  • Pruning a subset of rows → filtered bulk delete.

For the reasoning behind these guards, see the delete-and-truncate learn guide.