Choose a Stable Table Key
Data model · Key
Give every identifiable API record a stable identity so NIM can collect, relate, and update it reliably.
What key doesDirect link to what-key-does
The optional key property names the resource that uniquely identifies a row in this NIM table. In most connector tables you should define one, and the NIM Studio table key should match it.
"users": {
"key": "id",
"resources": {
"id": "string*",
"displayName": "string*",
"email": "string"
}
}
key must refer to a resource defined in the same table's resources object.
Choose the right identifierDirect link to Choose the right identifier
| Prefer | Avoid |
|---|---|
| An immutable API-generated ID | A display name or other editable label |
| A value returned for every record | A value that can be blank or omitted |
| A value unique across the table | A department, location, or other repeated attribute |
| A value accepted by detail, update, or delete endpoints | An identifier usable only in a list response |
An email address can be a useful business identifier, but it is usually a poor table key because people change it. Prefer the API's internal ID and collect email as a normal resource.
Validate before enabling writesDirect link to Validate before enabling writes
- Collect a representative sample of records.
- Confirm the chosen value is present and unique for every row.
- Confirm it remains stable after an update such as a name or email change.
- Confirm the API uses the same value in its detail, update, and delete paths.
- Set the matching key in the NIM data model.
Changing a key after collections, relations, or mappings are configured can break record matching. Treat a key change as a data-model migration and test it in a non-production environment first.
When no key existsDirect link to When no key exists
Some API responses represent junction data, events, or transient results rather than a single identifiable record. You can omit key in those cases. For example, a group-membership table uses its group membership configuration to relate users and groups instead of declaring one table key.
Next: define the table's operations.