Loading...
Loading...
Runs SQL analytics on SageMaker Catalog asset metadata tables exported as Apache Iceberg in S3 Tables. Covers governance queries, asset growth tracking, ownership audits, time-travel over catalog state, and metadata quality analysis. Applies when querying catalog inventory, finding assets without descriptions, comparing catalog snapshots, or auditing data ownership. Trigger phrases: catalog inventory SQL, how many assets, assets without descriptions, asset growth over time, who owns this data, catalog governance, data quality audit, catalog analytics.
npx skill4agent add aws/agent-toolkit-for-aws querying-aws-sagemaker-catalogaws-sagemaker-catalogsnapshot_time| User intent | Use this skill? | Alternative |
|---|---|---|
| SQL analytics on catalog state (counts, governance, trends) | Yes | — |
| Historical comparison ("what changed in catalog last week") | Yes — time travel via | — |
| Find assets without owners or descriptions | Yes | — |
| Find a specific table by name or concept | No | |
| Browse/enumerate catalog interactively | No | |
| Run a query on a table's data | No | |
| Manage catalog metadata (add descriptions, tags) | No | Glue Discovery |
aws datazone get-data-export-configuration \
--domain-identifier <DOMAIN_ID> \
--region <REGION>aws datazone list-domains --region <REGION>aws s3tables list-table-buckets --region <REGION> \
--query "tableBuckets[?name=='aws-sagemaker-catalog']"aws datazone put-data-export-configuration \
--domain-identifier <DOMAIN_ID> \
--region <REGION> \
--enable-export \
--encryption-configuration kmsKeyArn=<KMS_KEY_ARN>,sseAlgorithm=aws:kmsNote: Encryption cannot be changed after creation. Always specify KMS for sensitive catalog data.
aws datazone put-data-export-configuration \
--domain-identifier <DOMAIN_ID> \
--region <REGION> \
--enable-exports3tablescatalogaws lakeformation grant-permissions \
--principal DataLakePrincipalIdentifier=<ROLE_ARN> \
--resource '{"Table": {"CatalogId": "<ACCOUNT>:s3tablescatalog/aws-sagemaker-catalog", "DatabaseName": "asset_metadata", "Name": "asset"}}' \
--permissions DESCRIBE SELECT \
--region <REGION>"s3tablescatalog/aws-sagemaker-catalog"."asset_metadata"."asset"snapshot_timeDATE(snapshot_time) = CURRENT_DATEget-tablesaws glue get-tables --catalog-id "<ACCOUNT>:s3tablescatalog/aws-sagemaker-catalog" --database-name "asset_metadata" --region <REGION>| Column | What it holds | Usage |
|---|---|---|
| Partition key — daily snapshot timestamp | Always filter on this |
| Unique catalog asset identifier | Primary key for lookups |
| GlueTable, RedshiftTable, S3Collection, etc. | Filter by asset type |
| ARN or native identifier | Cross-reference with source systems |
| Business-friendly name | Display, search |
| Technical name (table name, prefix) | Filtering |
| Business context (NULL if not provided) | Governance gaps |
| | Use bracket notation: |
| When asset first appeared in catalog | Growth analysis |
| Last modification time | Freshness checks |
SELECT resource_type_enum, COUNT(*) as count
FROM "s3tablescatalog/aws-sagemaker-catalog"."asset_metadata"."asset"
WHERE DATE(snapshot_time) = CURRENT_DATE
GROUP BY resource_type_enum
ORDER BY count DESC;SELECT asset_name, resource_name, resource_type_enum, account_id
FROM "s3tablescatalog/aws-sagemaker-catalog"."asset_metadata"."asset"
WHERE DATE(snapshot_time) = CURRENT_DATE
AND business_description IS NULL;SELECT DATE(snapshot_time) as date, COUNT(*) as total_assets
FROM "s3tablescatalog/aws-sagemaker-catalog"."asset_metadata"."asset"
WHERE DATE(snapshot_time) >= CURRENT_DATE - INTERVAL '30' DAY
GROUP BY DATE(snapshot_time)
ORDER BY date DESC;SELECT t.asset_id, t.resource_name,
p.business_description as before,
t.business_description as now
FROM "s3tablescatalog/aws-sagemaker-catalog"."asset_metadata"."asset" t
JOIN "s3tablescatalog/aws-sagemaker-catalog"."asset_metadata"."asset" p
ON t.asset_id = p.asset_id
WHERE DATE(t.snapshot_time) = CURRENT_DATE
AND DATE(p.snapshot_time) = CURRENT_DATE - INTERVAL '7' DAY
AND p.business_description IS NULL
AND t.business_description IS NOT NULL;SELECT extended_metadata['owningEntityId'] as owner, COUNT(*) as count
FROM "s3tablescatalog/aws-sagemaker-catalog"."asset_metadata"."asset"
WHERE DATE(snapshot_time) = CURRENT_DATE
AND extended_metadata['owningEntityId'] IS NOT NULL
GROUP BY extended_metadata['owningEntityId']
ORDER BY count DESC;SELECT *
FROM "s3tablescatalog/aws-sagemaker-catalog"."asset_metadata"."asset"
WHERE DATE(snapshot_time) = CURRENT_DATE
AND extended_metadata['<metadata-form-name>.<field-name>'] = '<field-value>';snapshot_time| Error | Cause | Fix |
|---|---|---|
| Export not enabled | Run |
Empty results with | First export hasn't run yet (takes up to 24h) | Wait; try yesterday's date |
| Missing Lake Formation grants | Grant SELECT + DESCRIBE on the table |
| S3 Tables not registered in Glue | Enable integration: S3 console > Table buckets > Enable integration |
| Duplicate rows in results | Missing | Add |
| Key doesn't exist for that asset | Check available keys: |
| Cannot update export encryption | Encryption set at creation time only | Delete and recreate export config |
asset_metadata.assetaws-sagemaker-catalogPutDataExportConfigurationGetDataExportConfigurationStartQueryExecutionGetQueryResults