全部產品
Search
文件中心

MaxCompute:GetMmsTable - 擷取MMA資料來源內的某張表

更新時間:Feb 04, 2026

擷取MMA資料來源內的某張表

調試

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

調試

授權資訊

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

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

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

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

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

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

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

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

操作

存取層級

資源類型

條件關鍵字

關聯操作

odps:GetMmsTable

get

*project

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

請求文法

GET /api/v1/mms/datasources/{sourceId}/tables/{tableId} HTTP/1.1

路徑參數

名稱

類型

必填

描述

樣本值

sourceId

integer

資料來源 ID

12323

tableId

integer

表 ID

22

請求參數

名稱

類型

必填

描述

樣本值

當前API無需請求參數

返回參數

名稱

類型

描述

樣本值

object

ApiRes

requestId

string

請求 ID

E7FB14F1-4ACD-5C73-A755-B302D70AB9AD

data

object

返回資料

id

integer

table ID

22

dbId

integer

庫 ID

3

dbName

string

庫名

mms_test

name

string

表名

test

dstProjectName

string

目標 MaxCompute 專案名

mms_test

dstSchemaName

string

目標 MaxCompute schema 名,目標 MaxCompute 專案沒有開啟 schema 層時,該值為 null

default

dstName

string

目標 MaxCompute table 名,預設與原表名一致

test

type

string

表類型

MANAGED_TABLED

hasPartitions

boolean

是否是分區表

true

schema

object

表結構

name

string

表名

test

comment

string

表注釋

for mms test

columns

array<object>

所有普通列

object

普通列

name

string

列名

user_id

type

string

列類型

bigint

comment

string

列注釋

user id

defaultValue

string

列預設值

10

nullable

boolean

列是否可以為 null

false

partitions

array<object>

所有分區列

object

分區列

name

string

列名

p1

type

string

列類型

string

comment

string

列注釋

first partition level

defaultValue

string

列預設值

abc

nullable

boolean

列是否為空白

false

owner

string

表 owner

Hive

location

string

表格儲存體位置

| hdfs://master-1-1.c-c127cd184bb029ea.cn-zhangjiakou.emr.aliyuncs.com:9000/user/hive/warehouse/demo

inputFormat

string

inputFormat

org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat

outputFormat

string

outputFormat

org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat

serde

string

serde

org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe

extra

string

以 JSON 格式儲存的其他資訊

{"mapkey.delim":":","collection.delim":",","serialization.format":"|","field.delim":"|"}

partitions

integer

分區數

100

partitionsDoing

integer

正在遷移的分區數量

20

partitionsDone

integer

遷移完成的分區數量

80

partitionsFailed

integer

遷移失敗的分區數量

0

sourceId

integer

資料來源 ID

2000028

sourceName

string

資料來源名

demo

size

integer

資料大小-以 Bytes 為單位

23232

numRows

integer

行數

233232

updated

boolean

中繼資料是否有更新

false

lastDdlTime

string

lastDdlTime

2024-12-17 15:44:42

status

string

遷移狀態

枚舉值:

  • PART_DONE :

    部分遷移成功

  • INIT :

    未遷移

  • DONE :

    遷移成功

  • DOING :

    遷移中

  • FAILED :

    遷移失敗

DONE

樣本

正常返回樣本

JSON格式

{
  "requestId": "E7FB14F1-4ACD-5C73-A755-B302D70AB9AD\n",
  "data": {
    "id": 22,
    "dbId": 3,
    "dbName": "mms_test",
    "name": "test",
    "dstProjectName": "mms_test",
    "dstSchemaName": "default",
    "dstName": "test",
    "type": "MANAGED_TABLED",
    "hasPartitions": true,
    "schema": {
      "name": "test",
      "comment": "for mms test",
      "columns": [
        {
          "name": "user_id",
          "type": "bigint",
          "comment": "user id",
          "defaultValue": "10",
          "nullable": false
        }
      ],
      "partitions": [
        {
          "name": "p1",
          "type": "string",
          "comment": "first partition level",
          "defaultValue": "abc",
          "nullable": false
        }
      ]
    },
    "owner": "Hive\n",
    "location": "| hdfs://master-1-1.c-c127cd184bb029ea.cn-zhangjiakou.emr.aliyuncs.com:9000/user/hive/warehouse/demo\n",
    "inputFormat": "org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat \n",
    "outputFormat": "org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat\n",
    "serde": "org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe\n",
    "extra": "{\"mapkey.delim\":\":\",\"collection.delim\":\",\",\"serialization.format\":\"|\",\"field.delim\":\"|\"}   \n",
    "partitions": 100,
    "partitionsDoing": 20,
    "partitionsDone": 80,
    "partitionsFailed": 0,
    "sourceId": 2000028,
    "sourceName": "demo",
    "size": 23232,
    "numRows": 233232,
    "updated": false,
    "lastDdlTime": "2024-12-17 15:44:42\n",
    "status": "DONE"
  }
}

錯誤碼

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

變更歷史

更多資訊,參考變更詳情