ListMmsTables - 列出数据源内的表

列出MMA数据源内的表

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

调试

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。

  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。

  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:

    • 对于必选的资源类型,用前面加 * 表示。

    • 对于不支持资源级授权的操作,用全部资源表示。

  • 条件关键字:是指云产品自身定义的条件关键字。

  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。

操作

访问级别

资源类型

条件关键字

关联操作

odps:ListMmsTables

list

*project

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

请求语法

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

请求参数

名称

类型

必填

描述

示例值

sourceId

integer

数据源 ID

2000015

onlyName

boolean

只获取表的名字

false

dbId

integer

库 ID

197

dbName

string

库名

mms_test

name

string

表名

test

type

string

表类型

MANAGED_TABLE

hasPartitions

boolean

分区表

true

status

array

迁移状态

string

迁移状态

["DONE", "FAILED"]

lastDdlTimeStart

string

lastDdlTime 开始时间

2024-12-17 15:44:42

lastDdlTimeEnd

string

lastDdlTime 结束时间

2024-12-19 15:44:42

pageNum

integer

页码

1

pageSize

integer

分页大小。

10

sorter.numRows

string

根据行数排序

desc

sorter.size

string

根据数据大小排序

asc

sorter.lastDdlTime

string

根据 lastddltime 排序

desc

返回参数

名称

类型

描述

示例值

object

返回值

requestId

string

请求 ID。

E7FB14F1-4ACD-5C73-A755-B302D70AB9AD

data

object

返回数据。

total

integer

总记录数。

100

objectList

array<object>

table 列表

object

table 信息

schema

object

表结构

partitions

array<object>

所有分区列

object

分区列

nullable

boolean

列是否为空

false

defaultValue

string

列默认值

abc

name

string

列名

p1

comment

string

列注释

第一分区

type

string

列类型

string

columns

array<object>

所有表普通列

object

表普通列

nullable

boolean

列是否可以为 null

false

defaultValue

string

列默认值

""

name

string

列名

user_id

comment

string

列注释

user id

type

string

列类型

bigint

name

string

表名

test

comment

string

表注释

for mms test

sourceId

integer

数据源 ID

2000028

hasPartitions

boolean

是不是分区表

true

dstName

string

numRows

integer

行数

232323

dbName

string

库名

demo

type

string

表类型

MANAGED_TABLE

partitionsDone

integer

迁移完成的分区数量

60

dbId

integer

库 ID

196

extra

string

以 JSON 格式存储的其他信息

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

lastDdlTime

string

lastDdlTime

2024-12-17 15:44:42

id

integer

table ID

1003476

outputFormat

string

outputFormat

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

dstSchemaName

string

owner

string

表 owner

Hive

partitions

integer

分区数量

100

serde

string

serde

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

partitionsDoing

integer

正在迁移的分区数量

20

inputFormat

string

inputFormat

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

partitionsFailed

integer

迁移失败的分区数量

40

size

integer

数据大小-以 Bytes 为单位

2985028

name

string

表名

test

location

string

表存储位置

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

sourceName

string

数据源名

demo

updated

boolean

元数据是否有更新

true

status

string

迁移状态

DONE

pageNum

integer

1

pageSize

integer

分页大小

20

示例

正常返回示例

JSON格式

{
  "requestId": "E7FB14F1-4ACD-5C73-A755-B302D70AB9AD",
  "data": {
    "total": 100,
    "objectList": [
      {
        "schema": {
          "partitions": [
            {
              "nullable": false,
              "defaultValue": "abc",
              "name": "p1",
              "comment": "第一分区",
              "type": "string"
            }
          ],
          "columns": [
            {
              "nullable": false,
              "defaultValue": "\"\"",
              "name": "user_id",
              "comment": "user id",
              "type": "bigint"
            }
          ],
          "name": "test",
          "comment": "for mms test"
        },
        "sourceId": 2000028,
        "hasPartitions": true,
        "dstName": "",
        "numRows": 232323,
        "dbName": "demo",
        "type": "MANAGED_TABLE",
        "partitionsDone": 60,
        "dbId": 196,
        "extra": "{\"mapkey.delim\":\":\",\"collection.delim\":\",\",\"serialization.format\":\"|\",\"field.delim\":\"|\"}   ",
        "lastDdlTime": "2024-12-17 15:44:42\n",
        "id": 1003476,
        "outputFormat": "org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat",
        "dstSchemaName": "",
        "owner": "Hive",
        "partitions": 100,
        "serde": "org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe",
        "partitionsDoing": 20,
        "inputFormat": "org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat ",
        "partitionsFailed": 40,
        "size": 2985028,
        "name": "test",
        "location": "| hdfs://master-1-1.c-c127cd184bb029ea.cn-zhangjiakou.emr.aliyuncs.com:9000/user/hive/warehouse/demo",
        "sourceName": "demo ",
        "updated": true,
        "status": "DONE"
      }
    ],
    "pageNum": 1,
    "pageSize": 20
  }
}

错误码

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

变更历史

更多信息,参考变更详情