GetMmsTable - 获取MMA数据源内的某张表

获取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

返回参数

名称

类型

描述

示例值

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

dstSchemaName

string

dstName

string

type

string

表类型

MANAGED_TABLED

hasPartitions

boolean

是否是分区表

true

schema

object

表结构

name

string

表名

test

comment

string

表注释

for mms test

columns

array<object>

所有普通列

object

普通列

nullable

boolean

列是否可以为 null

false

defaultValue

string

列默认值

10

name

string

列名

user_id

comment

string

列注释

user id

type

string

列类型

bigint

partitions

array<object>

所有分区列

object

分区列

nullable

boolean

列是否为空

false

defaultValue

string

列默认值

abc

name

string

列名

p1

comment

string

列注释

first partition level

type

string

列类型

string

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

迁移状态

DONE

示例

正常返回示例

JSON格式

{
  "requestId": "E7FB14F1-4ACD-5C73-A755-B302D70AB9AD\n",
  "data": {
    "id": 22,
    "dbId": 3,
    "dbName": "mms_test",
    "name": "test",
    "dstSchemaName": "",
    "dstName": "",
    "type": "MANAGED_TABLED",
    "hasPartitions": true,
    "schema": {
      "name": "test",
      "comment": "for mms test",
      "columns": [
        {
          "nullable": false,
          "defaultValue": "10",
          "name": "user_id",
          "comment": "user id",
          "type": "bigint"
        }
      ],
      "partitions": [
        {
          "nullable": false,
          "defaultValue": "abc",
          "name": "p1",
          "comment": "first partition level",
          "type": "string"
        }
      ]
    },
    "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"
  }
}

错误码

访问错误中心查看更多错误码。

变更历史

更多信息,参考变更详情