Obtains tables in a MaxCompute project.
Debugging
Authorization information
There is currently no authorization information disclosed in the API.
Request syntax
GET /api/v1/projects/{projectName}/tables
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
projectName | string | Yes | The name of the MaxCompute project. | projectA |
prefix | string | No | The names of the returned resources. The names must start with the value specified by the prefix parameter. If the prefix parameter is set to a, the names of the returned resources must start with a. | a |
marker | string | No | Specifies the marker after which the returned list begins. | Y29tbWlzc2lvbl9leHRlcm5hbF91cmdlXzFfd3Ih |
maxItem | integer | No | The maximum number of entries to return on each page. | 10 |
type | string | No | The type of the table. Enumeration Value:
| internal |
schemaName | string | No | The name of the schema. | default |
Response parameters
Examples
Sample success responses
JSON
format
{
"requestId": "0a06dd4516687375802853481ec9fd",
"data": {
"tables": [
{
"name": "dim_odps\n",
"owner": "1887853961230110",
"type": "internal\n",
"schema": "default",
"creationTime": 0,
"viewText": "select shop_name, sum(total_price) \nfrom sale_detail group by shop_name",
"displayName": "sale_detail",
"projectName": "projectA\n",
"lastDDLTime": 0,
"lastModifiedTime": 0,
"lastAccessTime": 0,
"lifecycle": "-1",
"isExternalTable": true,
"size": 5372,
"tableComment": "sale_detail",
"tableLabel": "0",
"createTableDDL": "create table if not exists sale_detail(\n shop_name STRING,\n customer_id STRING,\n total_price DOUBLE)\npartitioned by (sale_date STRING, region STRING); ",
"nativeColumns": [
{
"name": "shop_name",
"type": "STRING",
"label": "0",
"comment": "Store name\n"
}
],
"partitionColumns": [
{
"name": "sale_date",
"type": "STRING",
"label": "0",
"comment": "Sale date\n"
}
],
"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
}
],
"marker": "cHlvZHBzX3VkZl8xMDExNV8xNDU3NDI4NDkzKg==",
"maxItem": 10
}
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||||||
---|---|---|---|---|---|---|---|---|
2023-11-14 | The request parameters of the API has changed. The response structure of the API has changed | see changesets | ||||||
|