Data modeling
Schema Explorer
See every attribute path Dynomatic has captured for a table, with its types, how often it is present, and example values, and sample more items when the picture is thin.
Schema Explorer is a mode of every query tab. It lists every attribute path that the schema registry has captured for the tab’s table, one row per path. The list covers top-level attributes, the members of maps up to four levels down, and the elements of lists. Schema Explorer is available on every plan.
To open it, click Schema Explorer in the query tab’s mode bar, or run Switch to Schema Explorer from the command palette.
The summary line
A line above the list counts what the registry has seen, for example 42 fields from 1,250 items observed. The item count is every item the registry has profiled for the table, from your reads and from samples.
The field list
The list has five columns.
| Column | What it shows |
|---|---|
| Field | The attribute name. Key attributes come first and carry a Key badge. Hover a field name to see its full path. |
| Observed types | Each DynamoDB type the registry has seen for the path, with the number of items that had it. The most common type comes first. Hover a type to see its full name, for example String: 1,180. |
| Present | The share of items that had the path, as a percentage and a bar. Hover it for the counts, for example 1,180 of 1,250 items. |
| Missing | How many items could have had the path but did not, with the percentage. |
| Examples | Up to three example values. A +N marker counts the rest, and hovering the examples lists all of them. A path with no stored values shows No examples. |
After the key attributes, top-level attributes are sorted by how many items had them, most first. Each one is followed by its nested paths, indented under it in the same order.
Nested paths and list elements
A map attribute’s members appear under it, one row per member, so address is followed by city and zip for the path address.city and address.zip. The members of a nested map are indented one more step.
A list attribute’s elements appear under it as one [*] row labeled List elements. Its types are the element types, each counted once per item that had it. The [*] row has no examples, and Dynomatic does not look inside list elements, so the members of a list of maps are not listed.
A vector attribute, one that a vector index covers, gets a row with its type and presence only, with no examples and no [*] row.
A nested path is counted against the items where its parent could hold it, not against every item:
- A map member is counted against the items whose parent attribute was a map.
- A
[*]row is counted against the items whose attribute was a list. An empty list counts as missing its elements.
So a member that every address map carries reads 100% even when half the items have no address at all. The Missing header says the same on hover: Items that have the parent field but not this one. If the registry never captured a path’s parent, Missing shows a dash, and Present shows only the item count.
Sample items to fill the list
The registry learns a table’s attributes from the items your reads return. If nothing has been read from the table yet, Schema Explorer shows No captured fields yet and offers a sample instead of a list.
To sample, type a count in Items to sample and click Sample items. The count starts at 500 and accepts any whole number from 1 to 100,000. Dynomatic then runs one capture scan of the table that reads at most that many items. When the scan finishes, a toast reports how many items it scanned, and the list appears.
Once the list has fields, the same control sits at the top right with the button Sample more. Each sample adds to what the registry already knows, so use Sample more when the counts rest on few items or a rare attribute is missing.
A sample is a real scan, and it consumes read capacity. It stops when it has read the number of items you asked for, or when it has used the table’s capture read budget, 500 read capacity units by default. The button reads Sampling… while the scan runs. The scan keeps running if you switch to another mode, and only one sample can run on a table at a time.
Where captured attributes appear
The attributes in Schema Explorer are the same ones the rest of the app knows for the table. Because the registry keeps them, these lists include them before your first read in a tab:
- The Add filter attribute list in the query builder, and the map paths it suggests for a nested condition.
- Attribute completions in the PartiQL editor.
- The destination attributes on the Mapping step of Import.
- The attribute checklist in the Export dialog.
A sample from Schema Explorer also feeds Data Model inference, which works from the same observations.
Keep the list current
The registry adds to its record each time a read returns items from the table, so the list grows as you work. Switch to Schema Explorer again to see the latest counts. To capture a part of the table your reads have not touched, run Sample more.
Schema Explorer shows attributes only. The table’s key schema, indexes, TTL, and streams come from DynamoDB’s own description of the table, which Table settings shows and refreshes.
To discard what the registry has captured for a table and start over, see Clear what a table has learned.
Last updated on