View a markdown version of this page

Usage system tables reference - Amazon SageMaker Unified Studio

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

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

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

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

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 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

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.

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.