全部產品
Search
文件中心

MaxCompute:GetMmsPartition - 擷取資料來源內的某個分區

更新時間:Feb 04, 2026

擷取MMA資料來源內的某個分區

調試

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

調試

授權資訊

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

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

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

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

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

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

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

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

操作

存取層級

資源類型

條件關鍵字

關聯操作

odps:GetMmsPartition

get

*project

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

請求文法

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

路徑參數

名稱

類型

必填

描述

樣本值

sourceId

integer

資料來源 ID

200018

partitionId

integer

分區 ID

2323

請求參數

名稱

類型

必填

描述

樣本值

當前API無需請求參數

返回參數

名稱

類型

描述

樣本值

object

ApiRes

requestId

string

請求 ID

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

data

object

分區對象

id

integer

分區 ID

2323

dbId

integer

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

12

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 名,如果目標 MaxCompute 專案沒有開啟 schema 層,該值為 null

default

dstTableName

string

目標 MaxCompute 表

test

dstValue

string

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

p1=1/p2=abc

sourceId

integer

資料來源 ID

200018

sourceName

string

資料來源名稱

demo

size

integer

資料量大小-單位 Bytes

12323

numRows

integer

行數

2323

updated

boolean

中繼資料是否有更新

false

lastDdlTime

string

lastDdlTime

2024-12-17 15:44:42

status

string

遷移狀態

枚舉值:

  • INIT :

    未遷移

  • DONE :

    遷移完成

  • DOING :

    正在遷移

  • FAILED :

    遷移失敗

DONE

樣本

正常返回樣本

JSON格式

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

錯誤碼

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

變更歷史

更多資訊,參考變更詳情