alibabacloud-odps-information-schema
ODPS Information Schema
This skill is for Information Schema (IS) metadata queries ONLY. If the user's question is about DDL/DML, listing tables, or general MaxCompute usage (not IS views), do NOT use this skill — use MCP tools (list_tables, get_table_schema) or odpscmd instead.
Query MaxCompute metadata through INFORMATION_SCHEMA views for storage, cost, permission, task, and governance analysis.
Prerequisites
MANDATORY: Every IS query MUST set namespace flag. Without it, ALL queries fail with "Table not found".
- MCP:
hints={"odps.namespace.schema":"true"}inexecute_sql- odpscmd:
SET odps.namespace.schema=true;before each query- No exceptions. Applies to ALL
SYSTEM_CATALOG.INFORMATION_SCHEMA.*queries.
IS views require tenant-level permission. If you get access errors, the user needs tenant-level role — see references/ram-policies.md for Policy template.
Data freshness: History views (TASKS_HISTORY, TUNNELS_HISTORY) have ~5 min delay, realtime views ~3 hours. For yesterday's data, query after 06:00 to ensure completeness.
Tenant-level vs Project-level IS: MaxCompute has two IS levels. Tenant-level (
SYSTEM_CATALOG.INFORMATION_SCHEMA.*) is the default — it covers all projects under the same metadata center and is recommended. Project-level (Information_Schema.*) is per-project only, requiresinstall package Information_Schema.systables, and is being deprecated (since 2024-03 new projects no longer auto-install). Key differences: (1) project-level has fewer views (no CATALOGS, VOLUMES, FOREIGN_SERVERS, SCHEMAS, PARTITION_ACCESS_INFO, TABLE_ACCESS_INFO, QUOTA_USAGE; has SCHEMA_PRIVILEGES which tenant lacks); (2) project-level TASKS_HISTORY hastask_schemawhile tenant-level does NOT; (3) project-leveltable_catalogis alwaysodpswhile tenant-level is the actual project name. See Project-level IS Adaptation for transformation rules.