The information_schema 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 Overview.
The following table lists the metadata views.
Category View Timeliness and retention period Delay
Metadata information TABLES Quasi-real-time view Online data is displayed in metadata views about 3 hours later.
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 about 3 hours later.
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 of a table in a project.
Parameter Type Description
table_catalog STRING The catalog of the table. 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 partitioned.
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_tim DATETIME The time when the table was last modified.
data_length BIGINT The size of data in the 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. 0 indicates that the number dynamically changes during job execution.
view_original_text STRING The view text in the table of the VIRTUAL_VIEW type.

PARTITIONS

Displays information of a table partition in a project.
Parameter Type Description
table_catalog STRING The catalog of the table. 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 time when the table was last modified.
data_length BIGINT N/A.
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. 0 indicates that the number dynamically changes during job execution.

COLUMNS

Displays information of a table column in a project.
Parameter Type Description
table_catalog STRING The catalog of the table. 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 of a user-defined function (UDF) in a project.
Parameter Type Description
udf_catalog STRING The catalog of the UDF. 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 time when the UDF was last modified.

RESOURCES

Displays information of a resource in a project.
Parameter Type Description
resource_catalog STRING The catalog of the resource. 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 time when the resource was last 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 temporary.

UDF_RESOURCES

Displays the dependent resource of a UDF in a project.
Parameter Type Description
udf_catalog STRING The catalog of the UDF. 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 of 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 of a role in a project.
Parameter Type Description
role_catalog STRING The catalog of the role. 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 of a role that a user assumes in a project.
Parameter Type Description
user_role_catalog STRING The catalog of the role. 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 of a package object in a project.
Parameter Type Description
package_catalog STRING The catalog of the package. 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 of an installed package in a project.
Parameter Type Description
installed_package_catalog STRING The catalog of the installed package. 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 of a schema permission in a project.
Parameter Type Description
user_catalog STRING The catalog of the user. 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 user.
grantor STRING The account of the permission grantor. The current value is NULL.
privilege_type STRING The type of the permission.

TABLE_PRIVILEGES

Displays information of a table permission in a project.
Parameter Type Description
table_catalog STRING The catalog of the table. 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 user.
grantor STRING The account of the permission grantor. 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 of a column permission in a project.
Parameter Type Description
table_catalog STRING The catalog of the table. 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 user.
grantor STRING Optional. The account of the permission grantor. 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 of a UDF permission in a project.
Parameter Type Description
udf_catalog STRING The catalog of the UDF. 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 user.
grantor STRING The account of the permission grantor. The current value is NULL.
privilege_type STRING The type of the permission.

RESOURCE_PRIVILEGES

Displays information of a resource permission in a project.
Parameter Type Description
resource_catalog STRING The catalog of the resource. 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 user.
grantor STRING The account of the permission grantor. The current value is NULL.
privilege_type STRING The type of the permission.

TABLE_LABELS

Displays information of a table label in a project.
Parameter Type Description
table_catalog STRING The catalog of the table. 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 of a table column label in a project.
Parameter Type Description
table_catalog STRING The catalog of the table. 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 of a table label in a project.
Parameter Type Description
table_label_grant_catalog STRING The catalog of the table label authorization. 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 of the permission grantor. The current value is NULL.
label_level STRING The granted level of the label.
expired DATETIME The time when the authorization expires.

COLUMN_LABEL_GRANTS

Displays the authorization information of a table column label in a project.
Parameter Type Description
column_label_grant_catalog STRING The catalog of authorization of the table column label. Set the value to odps.
column_label_grant_schema STRING The name of the project to which the user belongs.
principal_type STRING The type of the user. Valid values: user and role.
principal_id STRING The ID of the role name or 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 of the permission grantor. The current value is NULL.
label_level STRING The granted level of the 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 The catalog of the job. 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 include 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 has not ended on the current day, this value 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 usage of the job. 100 indicates 1 CPU core per second. For example, if 10 CPU cores run for 5s, cost_cpu is 5000, which is calculated by using the following formula: 10 × 100 × 5.
cost_mem DOUBLE The memory consumed by the job. Unit: MB/s.
settings STRING The information that is scheduled by the upper layer or passed by users. The information is saved in JSON format. The information includes the useragent, bizid, skynet_id, and skynet_nodename fields.
ds STRING The data collection date. Example: 20190101.

TUNNELS_HISTORY

Displays massive historical data uploaded and downloaded through a data tunnel. Data from the last 14 days is retained.
Parameter Type Description
tunnel_catalog STRING The catalog of the tunnel. 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.
table_name STRING The name of the table that you manage.
partition_spec STRING The name of the partition field. Example: time = 20130222, loc = beijing.
data_size BIGINT The number of bytes of data. Unit: bytes. This parameter is valid only when the operation type is UPLOADLOG, DOWNLOADLOG, or FILEDOWNLOADLOG. Otherwise, this parameter is left empty.
block_id BIGINT The ID of the block uploaded by the tunnel. This parameter is valid only when the operation type is 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 data collection date. Example: 20190101.