全部產品
Search
文件中心

MaxCompute:ListMmsPartitions - 列出資料來源內的分區

更新時間:Feb 04, 2026

列出MMA資料來源內的分區

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

調試

授權資訊

下表是API對應的授權資訊,可以在RAM權限原則語句的Action元素中使用,用來給RAM使用者或RAM角色授予調用此API的許可權。具體說明如下:

  • 操作:是指具體的許可權點。

  • 存取層級:是指每個操作的存取層級,取值為寫入(Write)、讀取(Read)或列出(List)。

  • 資源類型:是指操作中支援授權的資源類型。具體說明如下:

    • 對於必選的資源類型,用前面加 * 表示。

    • 對於不支援資源級授權的操作,用全部資源表示。

  • 條件關鍵字:是指雲產品自身定義的條件關鍵字。

  • 關聯操作:是指成功執行操作所需要的其他許可權。操作者必須同時具備關聯操作的許可權,操作才能成功。

操作

存取層級

資源類型

條件關鍵字

關聯操作

odps:ListMmsPartitions

list

*project

acs:odps:{#regionId}:{#accountId}:mmsdatasource/{#sourceId}

請求文法

GET /api/v1/mms/datasources/{sourceId}/partitions HTTP/1.1

路徑參數

名稱

類型

必填

描述

樣本值

sourceId

integer

資料來源 ID

200018

請求參數

名稱

類型

必填

描述

樣本值

dbId

integer

庫 ID

2

dbName

string

庫名

d1

updated

boolean

過濾出中繼資料有更新的分區

false

tableName

string

表名

t1

tableId

integer

分區所在表的 ID

20323

value

string

分區值

p1=1/p2=abc

status

array

遷移狀態

string

遷移狀態

枚舉值:

  • INIT :

    未遷移

  • DONE :

    遷移成功

  • DOING :

    正在遷移

  • FAILED :

    遷移失敗

["DONE", "FAILED"]

lastDdlTimeStart

string

lastDdlTime 最小值

2024-12-17 15:44:42

lastDdlTimeEnd

string

lastDdlTime 最大值

2024-12-17 19:44:42

pageNum

integer

頁碼

1

pageSize

integer

分頁大小

100

sorter.numRows

string

按行數排序

枚舉值:

  • asc :

    升序

  • desc :

    降序

desc

sorter.size

string

按資料量排序

枚舉值:

  • asc :

    升序

  • desc :

    降序

asc

sorter.lastDdlTime

string

按 lastDdlTime 排序

枚舉值:

  • asc :

    升序

  • desc :

    降序

desc

返回參數

名稱

類型

描述

樣本值

object

傳回值

requestId

string

請求 ID

D9F872FD-5DDE-30A6-8C8A-1B8C6A81059F

data

object

資料

total

integer

分區總數

1000

objectList

array<object>

返回分區列表

object

分區對象

id

integer

分區 ID

2323

dbId

integer

分區所在“庫”的 id, “庫”在不同資料來源中對應的中繼資料層級名稱不同。 如,在 BigQuery,對應 Dataset; 在 Hive 中對應 Databse; 在 Databricks 中對應"Schema"; 在 MaxCompute 中對應"Schema"。

196

tableId

integer

表 ID

23

dbName

string

庫名。 “庫”在不同資料來源中對應的中繼資料層級名稱不同。 如,在 BigQuery,對應 Dataset; 在 Hive 中對應 Databse; 在 Databricks 中對應"Schema"; 在 MaxCompute 中對應"Schema"。

d1

tableName

string

表名

t1

value

string

分區值

p1=1/p2=abc

dstProjectName

string

目標 MaxCompute 專案名

mms_test

dstSchemaName

string

目標 MaxCompute schema 名,對於沒有開啟 schema 的 MaxCompute 專案,該值為空白

default

dstTableName

string

目標 MaxCompute 表名

default

dstValue

string

目標 MaxCompute 分區值,預設與來源資料分割值一致

p1=1/p2=abc

sourceId

integer

資料來源 ID

200018

sourceName

string

資料來源名稱

demo

size

integer

資料量大小-單位 Bytes

23223

numRows

integer

行數

2323

updated

boolean

中繼資料是否有更新

false

lastDdlTime

string

lastDdlTime

2024-12-17 15:44:42

status

string

遷移狀態

枚舉值:

  • INIT :

    未遷移

  • DONE :

    遷移成功

  • DOING :

    正在遷移

  • FAILED :

    遷移失敗

DONE

pageNum

integer

頁碼

1

pageSize

integer

分頁大小

10

樣本

正常返回樣本

JSON格式

{
  "requestId": "D9F872FD-5DDE-30A6-8C8A-1B8C6A81059F",
  "data": {
    "total": 1000,
    "objectList": [
      {
        "id": 2323,
        "dbId": 196,
        "tableId": 23,
        "dbName": "d1",
        "tableName": "t1",
        "value": "p1=1/p2=abc\n",
        "dstProjectName": "mms_test",
        "dstSchemaName": "default",
        "dstTableName": "default",
        "dstValue": "p1=1/p2=abc",
        "sourceId": 200018,
        "sourceName": "demo",
        "size": 23223,
        "numRows": 2323,
        "updated": false,
        "lastDdlTime": "2024-12-17 15:44:42\n",
        "status": "DONE"
      }
    ],
    "pageNum": 1,
    "pageSize": 10
  }
}

錯誤碼

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情