The Information Schema service of MaxCompute contains the metadata of key objects in a project and provides historical information about job execution and data upload and download.

Note For more information about how to query metadata views, see Query a metadata view.
The following table describes the metadata views.
Category View Timeliness and retention period Delay
Metadata information TABLES Quasi-real-time view Online data is displayed in metadata views with a delay of about three hours.
PARTITIONS Quasi-real-time view
COLUMNS Quasi-real-time view
UDFS Quasi-real-time view
RESOURCES Quasi-real-time view
UDF_RESOURCES Quasi-real-time view
USERS Quasi-real-time view
ROLES Quasi-real-time view
USER_ROLES Quasi-real-time view
PACKAGE_OBJECTS Quasi-real-time view
INSTALLED_PACKAGES Quasi-real-time view
SCHEMA_PRIVILEGES Quasi-real-time view
TABLE_PRIVILEGES Quasi-real-time view
COLUMN_PRIVILEGES Quasi-real-time view
UDF_PRIVILEGES Quasi-real-time view
RESOURCE_PRIVILEGES Quasi-real-time view
TABLE_LABELS Quasi-real-time view
COLUMN_LABELS Quasi-real-time view
TABLE_LABEL_GRANTS Quasi-real-time view
COLUMN_LABEL_GRANTS Quasi-real-time view
Historical information TASKS_HISTORY Quasi-real-time view. Historical data is stored in a partitioned table, and data from the last 14 days is retained. Online data is displayed in metadata views with a delay of about three hours.
TUNNELS_HISTORY Quasi-real-time view. Historical data is stored in a partitioned table, and data from the last 14 days is retained.

TABLES

Displays information about a table in a project.
Parameter Type Description
table_catalog STRING Set the value to odps.
table_schema STRING The name of the project.
table_name STRING The name of the table.
table_type STRING The type of the table. Valid values:
  • MANAGED_TABLE
  • VIRTUAL_VIEW
  • EXTERNAL_TABLE
is_partitioned BOOLEAN Specifies whether the table is a partitioned table.
owner_id STRING The ID of the table owner.
owner_name STRING Optional. The Alibaba Cloud account of the table owner.
create_time DATETIME The time when the table was created.
last_modified_time DATETIME The last time when the table was modified.
data_length BIGINT If the table is a non-partitioned table, the value of this parameter is the size of the table data. If the table is a partitioned table, the system does not calculate the size of the table data. In this case, the value of this parameter is NULL. The PARTITIONS view includes the data size of each partition in a non-partitioned table. Unit: bytes.
table_comment STRING The comments on the table.
life_cycle BIGINT Optional. The lifecycle of the table.
is_archived BOOLEAN Specifies whether to archive data.
table_exstore_type STRING Optional. Specifies whether the table is a logical or physical table of the extreme storage table. Valid values: EXSTORE_TABLE_VIRTUAL and EXSTORE_TABLE_PHYSICAL.
cluster_type STRING The clustering type of the table. Valid values: HASH and RANGE.
number_buckets BIGINT Optional. The number of buckets in the clustering table. The value 0 indicates that the number dynamically changes during job execution.
view_original_text STRING The view text in the table if the table is of the VIRTUAL_VIEW type.

PARTITIONS

Displays information about a table partition in a project.
Parameter Type Description
table_catalog STRING Set the value to odps.
table_schema STRING The name of the project.
table_name STRING The name of the table.
partition_name STRING The name of the partition. Example: ds='20190130'.
create_time DATETIME The time when the partition was created.
last_modified_time DATETIME The last time when the table was modified.
data_length BIGINT The size of the data in the partition. Unit: bytes.
is_archived BOOLEAN Specifies whether to archive data.
is_exstore BOOLEAN Specifies whether the partition is an extreme storage partition. If it is an extreme storage partition, data is stored in physical partitions.
cluster_type STRING Optional. The clustering type of the table. Valid values: HASH and RANGE.
number_buckets BIGINT Optional. The number of buckets in the clustering table. The value 0 indicates that the number dynamically changes during job execution.

COLUMNS

Displays information about a table column in a project.
Parameter Type Description
table_catalog STRING Set the value to odps.
table_schema STRING The name of the project.
table_name STRING The name of the table.
column_name STRING The name of the column.
ordinal_position BIGINT The serial number of the column.
column_default STRING The default value of the column.
is_nullable STRING Optional. Set the value to YES.
data_type STRING The data type of the column.
column_comment STRING The comments on the column.
is_partition_key BOOLEAN Specifies whether the column is a partition key.

UDFS

Displays information about a user-defined function (UDF) in a project.
Parameter Type Description
udf_catalog STRING Set the value to odps.
udf_schema STRING The name of the project.
udf_name STRING The name of the UDF.
owner_id STRING The ID of the UDF owner.
owner_name STRING Optional. The Alibaba Cloud account of the UDF owner.
create_time DATETIME The time when the UDF was created.
last_modified_time DATETIME The last time when the UDF was modified.

RESOURCES

Displays information about a resource in a project.
Parameter Type Description
resource_catalog STRING Set the value to odps.
resource_schema STRING The name of the project.
resource_name STRING The name of the resource.
resource_type STRING The type of the resource. Valid values: Py and Jar.
owner_id STRING The ID of the resource owner.
owner_name STRING Optional. The Alibaba Cloud account of the resource owner.
create_time DATETIME The time when the resource was created.
last_modified_time DATETIME The last time when the resource was modified.
size BIGINT The storage space used by the resource.
comment STRING The comments on the resource.
is_temp_resource BOOLEAN Specifies whether the resource is a temporary resource.

UDF_RESOURCES

Displays information about the dependent resource of a UDF in a project.
Parameter Type Description
udf_catalog STRING Set the value to odps.
udf_schema STRING The name of the project.
udf_name STRING The name of the UDF.
resource_schema STRING The name of the project to which the resource belongs.
resource_name STRING The name of the resource.

USERS

Displays information about a user in a project.
Parameter Type Description
user_catalog STRING Valid values: ALIYUN and RAM.
user_schema STRING The name of the project.
user_name STRING Optional. The name of the user.
user_id STRING The ID of the user.
user_label STRING The label of the user.

ROLES

Displays information about a role in a project.
Parameter Type Description
role_catalog STRING Set the value to odps.
role_schema STRING The name of the project.
role_name STRING The name of the role.
role_label STRING The label of the role.
comment STRING The comments on the role.

USER_ROLES

Displays information about a role that a user assumes in a project.
Parameter Type Description
user_role_catalog STRING Set the value to odps.
user_role_schema STRING The name of the project.
role_name STRING The name of the role.
user_name STRING The name of the user.
user_id STRING The ID of the user.

PACKAGE_OBJECTS

Displays information about a package object in a project.
Parameter Type Description
package_catalog STRING Set the value to odps.
package_schema STRING The name of the project.
package_name STRING The name of the package.
object_type STRING The type of the package object.
object_name STRING The name of the package object.
column_name STRING The name of the table column.
allowed_privileges VECTOR<STRING> The shared permissions.
allowed_label STRING The shared label.

INSTALLED_PACKAGE

Displays information about an installed package in a project.
Parameter Type Description
installed_package_catalog STRING Set the value to odps.
installed_package_schema STRING The name of the project.
package_project STRING The name of the project in which the package was created.
package_name STRING The name of the package.
installed_time DATETIME Reserved. The time when the package was installed.
allowed_label STRING The shared label.

SCHEMA_PRIVILEGES

Displays information about a schema permission in a project.
Parameter Type Description
user_catalog STRING Set the value to odps.
user_schema STRING The name of the project.
grantee STRING The name of the user.
user_id STRING The ID of the Alibaba Cloud account.
grantor STRING The account who grants the permission. The current value is NULL.
privilege_type STRING The type of the permission.

TABLE_PRIVILEGES

Displays information about a table permission in a project.
Parameter Type Description
table_catalog STRING Set the value to odps.
table_schema STRING The name of the project to which the table belongs.
table_name STRING The name of the table.
grantee STRING The name of the user.
user_id STRING The ID of the Alibaba Cloud account.
grantor STRING The account who grants the permission. The current value is NULL.
privilege_type STRING The type of the permission.
user_schema STRING The name of the project to which the user belongs.

COLUMN_PRIVILEGES

Displays information about a column permission in a project.
Parameter Type Description
table_catalog STRING Set the value to odps.
table_schema STRING The name of the project to which the table belongs.
table_name STRING The name of the table.
column_name STRING The name of the column.
grantee STRING The name of the user.
user_id STRING The ID of the Alibaba Cloud account.
grantor STRING Optional. The current value is NULL.
privilege_type STRING The type of the permission.
user_schema STRING The name of the project to which the user belongs.

UDF_PRIVILEGE

Displays information about a UDF permission in a project.
Parameter Type Description
udf_catalog STRING Set the value to odps.
udf_schema STRING The name of the project.
udf_name STRING The name of the UDF.
user_schema STRING The name of the project to which the user belongs.
grantee STRING The name of the user.
user_id STRING The ID of the Alibaba Cloud account.
grantor STRING The account who grants the permission. The current value is NULL.
privilege_type STRING The type of the permission.

RESOURCE_PRIVILEGES

Displays information about a resource permission in a project.
Parameter Type Description
resource_catalog STRING Set the value to odps.
resource_schema STRING The name of the project.
resource_name STRING The name of the resource.
user_schema STRING The name of the project to which the user belongs.
grantee STRING The name of the user.
user_id STRING The ID of the Alibaba Cloud account.
grantor STRING The account who grants the permission. The current value is NULL.
privilege_type STRING The type of the permission.

TABLE_LABELS

Displays information about a table label in a project.
Parameter Type Description
table_catalog STRING Set the value to odps.
table_schema STRING The name of the project.
table_name STRING The name of the table.
label_type STRING The type of the label. Set the value to NULL.
label_level STRING The level of the label.

COLUMN_LABELS

Displays information about a table column label in a project.
Parameter Type Description
table_catalog STRING Set the value to odps.
table_schema STRING The name of the project.
table_name STRING The name of the table.
column_name STRING The name of the column.
label_type STRING The type of the label. Set the value to NULL.
label_level STRING The level of the label.

TABLE_LABEL_GRANTS

Displays authorization information about a table label in a project.
Parameter Type Description
table_label_grant_catalog STRING Set the value to odps.
table_label_grant_schema STRING The name of the project to which the user belongs.
user STRING The name of the user.
user_id STRING The ID of the user.
table_schema STRING The name of the project to which the table belongs.
table_name STRING The name of the table.
grantor STRING The account who grants the permission. The current value is NULL.
label_level STRING The level of the granted label.
expired DATETIME The time when the authorization expires.

COLUMN_LABEL_GRANTS

Displays authorization information about a table column label in a project.
Parameter Type Description
column_label_grant_catalog STRING Set the value to odps.
column_label_grant_schema STRING The name of the project to which the user belongs.
user STRING The name of the user.
user_id STRING The ID of the user.
table_schema STRING The name of the project to which the table belongs.
table_name STRING The name of the table.
column_name STRING The name of the column.
grantor STRING The account who grants the permission. The current value is NULL.
label_level STRING The level of the granted label.
expired DATETIME The time when the authorization expires.

TASKS_HISTORY

Displays the job execution history in a MaxCompute project. Data from the last 14 days is retained.
Parameter Type Description
task_catalog STRING Set the value to odps.
task_schema STRING The name of the project.
task_name STRING The name of the job.
task_type STRING The type of the job. Valid values: SQL, MAPREDUCE, and GRAPH.
inst_id STRING The ID of the instance.
status STRING The running state of the job at the time when data is collected. This is not a real-time state.
owner_id STRING The ID of the Alibaba Cloud account.
owner_name STRING The name of the Alibaba Cloud account.
result STRING The error information displayed if an error occurs in an SQL job.
start_time DATETIME The start time of the job.
end_time DATETIME The end time of the job. If the job is not completed on the current day, the value of this parameter is NULL.
input_records BIGINT The number of records read by the job.
output_records BIGINT The number of records generated by the job.
input_bytes BIGINT The actual amount of data scanned, which is the same as that of Logview.
output_bytes BIGINT The number of output bytes.
input_tables STRING The job input tables in the [project.table1,project.table2] format.
output_tables STRING The job output tables in the [project.table1,project.table2] format.
operation_text STRING source_xml of the query statement. If the source_xml value exceeds 256 KB, set the value to NULL.
signature STRING Optional. The job signature.
complexity DOUBLE Optional. The job complexity. This parameter is available only for SQL jobs.
cost_cpu DOUBLE The CPU utilization of the job. The value 100 indicates 1 CPU core per second. For example, if 10 CPU cores run for five seconds, cost_cpu is 5000, which is calculated by using the following formula: 10 × 100 × 5.
cost_mem DOUBLE The memory consumed by the job per second. Unit: MB.
settings STRING The information that is scheduled by the upper layer or specified by users. The information is saved in JSON format. The information includes the useragent, bizid, skynet_id, and skynet_nodename fields.
ds STRING The date when the data was collected. Example: 20190101.

TUNNELS_HISTORY

Displays historical data uploaded and downloaded in batches over a data tunnel. Data from the last 14 days is retained.
Parameter Type Description
tunnel_catalog STRING Set the value to odps.
tunnel_schema STRING The name of the project.
session_id STRING The session ID, which is saved in the format of TIMESTAMP (YYYYMMDDHHmmss, 14 characters) + IP address (8 characters) + numHex (8 characters). Example: 2013060414484474e5e60a00000002.
operate_type STRING The type of the operation. Valid values:
  • UPLOADLOG
  • DOWNLOADLOG
  • FILEDOWNLOADLOG
  • FILEUPLOADLOGDLOG
  • FILEUPLOADLOG
tunnel_type STRING The type of the tunnel. Valid values: TUNNEL LOG and TUNNEL FILE LOG.
request_id STRING The ID of the request.
object_type STRING The type of the object on which the operation was performed. Valid values: TABLE and INSTANCE.
object_name STRING The table name or instance ID.
partition_spec STRING The name of the partition field. Examples: time = 20130222 and loc = beijing.
data_size BIGINT The size of data. Unit: bytes. This parameter is valid only when the operate_type parameter is set to UPLOADLOG, DOWNLOADLOG, or FILEDOWNLOADLOG. Otherwise, this parameter is left empty.
block_id BIGINT The ID of the block uploaded by using the tunnel. This parameter is valid only when the operate_type parameter is set to UPLOADLOG, FILEUPLOADLOGDLOG, or FILEUPLOADLOG. Otherwise, this parameter is left empty.
offset BIGINT The number of records to skip before data is downloaded. The download starts from record 0 by default.
length BIGINT The number of records to download or upload in the current session. The number of records to download is the specified number of rows.
owner_id STRING N/A.
owner_name STRING Optional.
start_time DATETIME N/A.
end_time DATETIME N/A.
client_ip STRING N/A.
user_agent STRING Optional.
ds STRING The date when the data was collected. Example: 20190101.