Query AWS SageMaker Catalog System Tables
Overview
Works best with the AWS MCP server for sandboxed execution and audit logging. All commands below use the AWS CLI and work in any environment with configured AWS credentials.
Amazon SageMaker Unified Studio (whose catalog feature is referred to below as SageMaker Catalog) exports asset metadata as a daily-snapshot
Apache Iceberg table in the AWS-managed aws-sagemaker-catalog table bucket. This
enables SQL queries over your entire data catalog inventory — asset counts, governance
gaps, ownership audits, and historical comparisons — without building custom ETL.
Data is partitioned by snapshot_time and exported once daily (around midnight per
region). The table is read-only.
Decision Tree
Common Tasks
1. Check If Configured
- If no domain exists:
aws datazone list-domains --region <REGION> - If export not enabled: guide user to enable.
- One domain per account per region.
Verify table bucket exists:
2. Enable
With KMS encryption (recommended for production):
Note: Encryption cannot be changed after creation. Always specify KMS for sensitive catalog data.
Without encryption (for quick testing only):
First data available within 24 hours. See: Exporting asset metadata
3. Verify Permissions for Querying
Requires:
- S3 Tables federated catalog registered in Glue (
s3tablescatalog) - Lake Formation SELECT + DESCRIBE grants on the table
Grant access:
4. Query
Query syntax:
Constraints:
-
You MUST always filter by
snapshot_time— without it, the query scans all historical snapshots and returns duplicates -
You MUST confirm workgroup and output location before executing
-
Default to
DATE(snapshot_time) = CURRENT_DATEfor current state -
You SHOULD use the key columns documented in this skill to build queries. If you need the full schema, run
get-tablesonce:
Key columns:
Current catalog state:
Assets without business descriptions:
Asset growth over last 30 days:
Time travel — compare current vs 7 days ago (new descriptions added):
Assets by owner:
Filter by metadata form field:
Key Behaviors
- Daily snapshots — exported around midnight per region
- Always filter by
snapshot_time— without it you get all history (duplicates, slow) - One domain per account per region — to switch domains, delete config first
- No additional charge beyond S3 Tables storage + Athena queries
- Read-only — to update asset metadata, use Glue Discovery APIs or SageMaker Unified Studio
Troubleshooting
Security Considerations
Data sensitivity: Catalog metadata exposes organizational structure including asset names, ownership, account IDs, naming conventions, and internal resource identifiers. Treat query results as sensitive by default.
Encryption at rest: Always enable KMS encryption when creating the export configuration. Encryption cannot be changed after creation. Additionally, configure SSE-KMS on your Athena workgroup output bucket.
Least-privilege access: Grant Lake Formation SELECT + DESCRIBE only on the specific asset_metadata.asset table to roles that need catalog analytics. Avoid granting access to the entire aws-sagemaker-catalog bucket.
Audit trail: Enable CloudTrail logging for DataZone (PutDataExportConfiguration, GetDataExportConfiguration), Athena (StartQueryExecution, GetQueryResults), and S3 Tables API calls to track who queries catalog metadata.
Credential hygiene: Use IAM roles with temporary credentials for querying. Avoid long-lived access keys for users accessing catalog metadata. Scope down or rotate principals when access is no longer needed.

