Assign primary keys to tables
Data-model setup · Step 3
Assign a stable identifier to each relevant table so NIM can recognize every record and connect related data correctly.
A primary key is the main identifier for a row in a data table. NIM uses it for intra-system relations, filter relation items, and primary-key Vault queries. For the conceptual difference between primary and reference keys, see Keys.
Select the right columnDirect link to Select the right column
Choose a column that is unique, populated, and unlikely to change. An immutable system-generated ID is usually the best option.
| Strong primary-key choices | Avoid when possible |
|---|---|
| Permanent employee, student, or person ID | Display name |
| Immutable directory object ID | Email address or user principal name |
| Connector-specific record ID | Department name, job title, or location |
| A stable identifier supplied by the source system | A value built from other changing attributes |
Assign a primary key in NIMDirect link to Assign a primary key in NIM
- Expand the system’s table list.
- Open a table that needs a stable record identity.
- Select the Columns tab.
- Mark the selected identifier column as the table’s Key.
- Select Save.
- Repeat for every table that will participate in relations, matching, or a workflow that needs reliable record identity.
Validate the key before using itDirect link to Validate the key before using it
- Collect and load the system.
- Review sample rows and confirm that every applicable record has a value.
- Check that the value is unique and uses a consistent format.
- If the key will support a relation, compare its values with the foreign-key values in the related table.
Do not use a column with duplicate, blank, or routinely changing values as a primary key. It can cause incorrect joins, missing relation results, and hard-to-diagnose filtering behavior.
Next stepDirect link to Next step
After keys are set, specify intra-system relations to connect the related tables in this system. If an additional unique lookup is needed, assign reference keys.