

# Usage system tables reference

Both Amazon SageMaker Unified Studio usage system tables are append-only snapshot tables, partitioned by day on `snapshot_time`. `domain_entity` is sorted by `snapshot_time` and `category_enum`, and `user_profile` by `snapshot_time` and `user_id`.

## Schema changes
<a name="usage-system-tables-reference-schema-changes"></a>

AWS can add columns and `extended_metadata` keys to these tables, but never renames or removes an existing column. Every table includes a `schema_version` column. When AWS adds a column, rows that already exist have `NULL` in it. Use `schema_version` to tell a `NULL` that means the column doesn't apply apart from one written before the column existed.

## domain\_entity
<a name="usage-system-tables-reference-domain-entity"></a>

`domain_entity` holds one row for each entity in each snapshot, for every entity category in the domain. The `category_enum` column identifies the kind of entity. Filter or group by it when you work with one kind of entity.

**Row key:** An entity ID is unique only within its category, and every entity appears in every snapshot. The columns `snapshot_time`, `category_enum`, and `entity_id` identify a single row. Use them to remove duplicates in a query that spans several snapshots.


| Column | Type | Required | Description | 
| --- | --- | --- | --- | 
| snapshot\_time | timestamp with time zone | Yes | When the snapshot was captured. Partition key. Use it for point-in-time analysis, for example the state of the domain 30 days ago. | 
| domain\_id | string | Yes | ID of the domain the entity belongs to. | 
| category\_enum | string | Yes | Kind of entity. See Entity categories. | 
| entity\_id | string | Yes | ID of the entity, unique within domain\_id and category\_enum. | 
| entity\_version | string | No | Version of the entity as of snapshot\_time. It increases as the entity changes. NULL where the source didn't record a version. | 
| entity\_name | string | No | Display name of the entity. Its meaning depends on the category. Not a stable identifier. | 
| owning\_project\_id | string | No | ID of the project that owns the entity. Populated for NOTEBOOK, ASSET, and project-scoped CONNECTION rows. NULL for DOMAIN, DOMAIN\_UNIT, PROJECT\_PROFILE, domain-scoped connections, and PROJECT rows. | 
| owning\_project\_name | string | No | Name of the project in owning\_project\_id, as of snapshot\_time. Display only. | 
| domain\_unit\_id | string | No | ID of the domain unit the entity is filed under. | 
| domain\_unit\_name | string | No | Name of the domain unit, as of snapshot\_time. Display only. | 
| parent\_domain\_unit\_id | string | No | On DOMAIN\_UNIT rows, the entity\_id of the parent domain unit. NULL for every other category. | 
| status\_enum | string | No | Lifecycle state from the category's own state machine. Always combine with category\_enum. NULL for DOMAIN\_UNIT, CONNECTION, and ASSET. See Status values. | 
| created\_time | timestamp with time zone | No | When the entity was created. | 
| created\_by\_id | string | No | User or service identity that created the entity. | 
| updated\_time | timestamp with time zone | No | When the entity was last updated. | 
| updated\_by\_id | string | No | User or service identity that last updated the entity. | 
| description | string | No | Description of the entity, up to 2,048 characters. For ASSET rows, the asset's business description. | 
| extended\_metadata | map | No | Category-specific attributes that have no column of their own. See extended\_metadata keys. | 
| schema\_version | string | Yes | Version of the table schema that wrote the row. | 
| account\_id | string | No | 12-digit AWS account ID that the entity is provisioned in, including leading zeros. | 
| region\_name | string | No | AWS Region, for example us-east-1. | 
| domain\_name | string | No | Name of the domain, as of snapshot\_time. Display only. | 
| env\_blueprint\_id | string | No | ID of the environment blueprint behind the entity, where its category has one. | 
| env\_blueprint\_name | string | No | Name of the blueprint in env\_blueprint\_id. Display only. | 

### Entity categories
<a name="usage-system-tables-reference-categories"></a>

The following table lists the values of `category_enum`.


| category\_enum | Description | 
| --- | --- | 
| DOMAIN | The domain. | 
| DOMAIN\_UNIT | A domain unit, a node in the domain's organizational hierarchy. | 
| PROJECT | A project. | 
| PROJECT\_PROFILE | A project profile. | 
| PROJECT\_MEMBERSHIP | A user's or group's membership in a project. | 
| ENVIRONMENT | An environment in a project. | 
| ENVIRONMENT\_BLUEPRINT | An environment blueprint available in the domain. | 
| DESIGNATION | A designation, a role that can be assigned to project members. | 
| CONNECTION | A connection, scoped to the domain or to a project. | 
| SUBSCRIPTION | An approved subscription to a published asset. | 
| SUBSCRIPTION\_REQUEST | A subscription request. | 
| NOTEBOOK | A notebook. | 
| ASSET | A catalog asset of any type. For AWS Glue tables, Amazon Redshift tables, and Amazon S3 object collections, extended\_metadata includes the source coordinates. Other asset types include only resource\_type\_enum, resource\_id, and resource\_name. | 

### Status values
<a name="usage-system-tables-reference-status"></a>

The shared values of `status_enum` are `ACTIVE`, `MOVING`, `DELETING`, `DELETE_FAILED`, `UPDATING`, `UPDATE_FAILED`, `AVAILABLE`, `ENABLED`, and `DISABLED`. Each category uses part of this set, and a category can also report other states.


| category\_enum | Values you can see | 
| --- | --- | 
| PROJECT | ACTIVE, MOVING, DELETING, DELETE\_FAILED, UPDATING, UPDATE\_FAILED | 
| DOMAIN | AVAILABLE, CREATING, CREATION\_FAILED, DELETED, DELETION\_FAILED | 
| PROJECT\_PROFILE | ENABLED, DISABLED | 
| NOTEBOOK | ACTIVE, SYNC\_IN\_PROGRESS, SYNC\_FAILED | 
| DOMAIN\_UNIT, CONNECTION, ASSET | Always NULL (no lifecycle state) | 

### extended\_metadata keys
<a name="usage-system-tables-reference-metadata"></a>

A key with no value is left out rather than set to `NULL`, and the map itself can be missing on a row. Read keys with `element_at(extended_metadata, 'key')`, which returns `NULL` in both cases. New keys can be added without a schema change.


| Key | Present on | Description | 
| --- | --- | --- | 
| ancestor\_domain\_unit\_ids | DOMAIN\_UNIT | The full chain of ancestor domain unit IDs, so you can rebuild the hierarchy without a recursive query. | 
| name\_entry\_type | DESIGNATION, PROJECT\_PROFILE | How the descriptive name was set: ACCEPTED, AUTO\_ACCEPTED, or MANUAL. | 
| connection\_scope | CONNECTION | DOMAIN or PROJECT. | 
| project\_category, project\_profile\_id | PROJECT | The project's category, and the project profile it was created from. | 
| entity\_subtype | Categories that define a subtype | The entity's subtype within its category. | 
| environment\_id | Entities that belong to an environment | The environment the entity belongs to. | 
| is\_user\_scoped | Entities that can be user-scoped | Whether the entity is scoped to a single user. | 
| resource\_type\_enum, resource\_id, catalog, namespace, resource\_name, resource\_description | ASSET | Source coordinates of the asset, plus other attributes recorded for that resource type. | 

## user\_profile
<a name="usage-system-tables-reference-user-profile"></a>

`user_profile` holds one row for each user profile in the domain, in each snapshot.

**Row key:** The columns `snapshot_time` and `user_id` identify a single row.

**Important**  
This table contains personal information, including user names and email addresses. Restrict read access to it. For more information, see [Security and data governance for usage system tables](usage-system-tables-security.md).


| Column | Type | Required | Description | 
| --- | --- | --- | --- | 
| snapshot\_time | timestamp with time zone | Yes | When the snapshot was captured. Partition key. | 
| schema\_version | string | Yes | Version of the table schema that wrote the row. | 
| domain\_id | string | Yes | ID of the domain the profile belongs to. | 
| user\_id | string | Yes | ID of the user, unique within the domain. Join it to created\_by\_id and updated\_by\_id in domain\_entity. | 
| entity\_id | string | Yes | ID of the user profile record, distinct from user\_id. | 
| user\_name | string | No | For SSO users, the UserName from the AWS IAM Identity Center identity store. For IAM users, the IAM principal ARN. Captured when the profile was created and not refreshed. Sensitive. | 
| email | string | No | Email address recorded on the profile. NULL where none is recorded. Sensitive. | 
| user\_type\_enum | string | No | How the user authenticates: IAM or SSO. | 
| user\_status\_enum | string | No | ASSIGNED, NOT\_ASSIGNED, ACTIVATED, or DEACTIVATED. Use it to exclude profiles without domain access from counts. | 
| iam\_principal\_arn | string | No | ARN of the IAM principal behind the profile. Populated for IAM users only. | 
| group\_profile\_id | string | No | ID of the group profile the user is associated with, if any. | 
| created\_time | timestamp with time zone | No | When the profile was created. | 
| updated\_time | timestamp with time zone | No | When the profile was last updated. | 
| extended\_metadata | map | No | Profile attributes that have no column of their own. Read with element\_at. | 
| domain\_name | string | No | Name of the domain, as of snapshot\_time. Display only. | 