Views the information about MaxCompute internal tables, views, external tables, clustered tables, or transactional tables.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
odps:GetTableInfo | get | *Project acs:odps:{#regionId}:{#accountId}:projects/{#ProjectName} |
| none |
Request syntax
GET /api/v1/projects/{projectName}/tables/{tableName} HTTP/1.1
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
projectName | string | Yes | The name of the project to which the table or view belongs. | projectA |
schemaName | string | No | The name of the schema to which the table or view belongs. | default |
tableName | string | Yes | The name of the table or view that you want to view. | sale_detail |
type | string | No | The type of the table or view that you want to view. Valid values:
| internal |
Response parameters
Examples
Sample success responses
JSON
format
{
"requestId": "0a06dd4516687375802853481ec9fd",
"data": {
"name": "sale_detail",
"owner": "188785396123****",
"type": "internal",
"schema": "default",
"creationTime": 0,
"viewText": "select shop_name, sum(total_price) from sale_detail group by shop_name",
"displayName": "project_name.schema_name.table_name",
"projectName": "projectA",
"lastDDLTime": 0,
"lastModifiedTime": 0,
"lastAccessTime": 0,
"lifecycle": "-1",
"isExternalTable": false,
"size": 5372,
"comment": "sale_detail",
"tableLabel": "0",
"createTableDDL": "create table if not exists sale_detail( shop_name STRING, customer_id STRING, total_price DOUBLE) partitioned by (sale_date STRING, region STRING);",
"nativeColumns": [
{
"name": "shop_name",
"type": "STRING",
"label": "0",
"comment": "The name of shop."
}
],
"partitionColumns": [
{
"name": "sale_date",
"type": "STRING",
"label": "0",
"comment": "Sale date."
}
],
"materializedView": false,
"rewriteEnabled": false,
"autoRefreshEnabled": false,
"isOutdated": false,
"physicalSize": 2763,
"fileNum": 200,
"storageHandler": "com.aliyun.odps.CsvStorageHandler",
"location": "oss://oss-cn-hangzhou-internal.aliyuncs.com/oss-mc-test/Demo1/",
"odpsPropertiesRolearn": "acs:ram::xxxxx:role/aliyunodpsdefaultrole",
"tablestoreColumnsMapping": ":o_orderkey,:o_orderdate,o_custkey,o_orderstatus,o_totalprice",
"tablesotreTableName": "ots_tpch_orders",
"odpsSqlTextOptionFlushHeader": true,
"odpsTextOptionHeaderLinesCount": 1,
"clusterInfo": {
"clusterType": "Hash",
"clusterCols": [
"col_1"
],
"sortCols": [
{
"name": "col_2",
"order": "DESC"
}
],
"bucketNum": 1024
}
}
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-11-05 | The response structure of the API has changed | View Change Details |