Obtém uma tabela de uma fonte de dados do MaxCompute Migration Assist (MMA).
Experimente agora
Testar
Autorização RAM
|
Ação |
Nível de acesso |
Tipo de recurso |
Chave de condição |
Ação dependente |
|
odps:GetMmsTable |
get |
*project
|
Nenhuma | Nenhuma |
Sintaxe da solicitação
GET /api/v1/mms/datasources/{sourceId}/tables/{tableId} HTTP/1.1
Parâmetros de caminho
|
Parâmetro |
Tipo |
Obrigatório |
Descrição |
Exemplo |
| sourceId |
integer |
Sim |
O ID da fonte de dados. |
12323 |
| tableId |
integer |
Sim |
O ID da tabela. |
22 |
Parâmetros da solicitação
|
Parâmetro |
Tipo |
Obrigatório |
Descrição |
Exemplo |
Nenhum parâmetro necessário.
Elementos de resposta
|
Elemento |
Tipo |
Descrição |
Exemplo |
|
object |
ApiRes |
||
| requestId |
string |
O ID da solicitação. |
E7FB14F1-4ACD-5C73-A755-B302D70AB9AD |
| data |
object |
Os dados retornados. |
|
| id |
integer |
O ID da tabela. |
22 |
| dbId |
integer |
O ID do banco de dados. |
3 |
| dbName |
string |
O nome do banco de dados. |
mms_test |
| name |
string |
O nome da tabela. |
test |
| dstProjectName |
string |
O nome do projeto MaxCompute de destino. |
mms_test |
| dstSchemaName |
string |
O nome do schema do MaxCompute de destino. Este valor é nulo se o projeto do MaxCompute de destino não tiver a camada de schema ativada. |
default |
| dstName |
string |
O nome da tabela do MaxCompute de destino. Por padrão, este nome corresponde ao nome da tabela original. |
test |
| type |
string |
O tipo da tabela. |
MANAGED_TABLED |
| hasPartitions |
boolean |
Indica se a tabela é uma tabela particionada. |
true |
| schema |
object |
O schema da tabela. |
|
| name |
string |
The table name. |
test |
| comment |
string |
The comment of the table. |
for mms test |
| columns |
array<object> |
All common columns. |
|
|
object |
A common column. |
||
| name |
string |
The column name. |
user_id |
| type |
string |
The data type of the column. |
bigint |
| comment |
string |
The comment of the column. |
user id |
| defaultValue |
string |
The default value of the column. |
10 |
| nullable |
boolean |
Indicates whether the column can be null. |
false |
| partitions |
array<object> |
All partition key columns. |
|
|
object |
A partition key column. |
||
| name |
string |
The column name. |
p1 |
| type |
string |
The data type of the column. |
string |
| comment |
string |
The comment of the column. |
first partition level |
| defaultValue |
string |
The default value of the column. |
abc |
| nullable |
boolean |
Indicates whether the column can be null. |
false |
| owner |
string |
O proprietário da tabela. |
Hive |
| location |
string |
O local de armazenamento da tabela. |
| hdfs://master-1-1.c-c127cd184bb029ea.cn-zhangjiakou.emr.aliyuncs.com:9000/user/hive/warehouse/demo |
| inputFormat |
string |
O formato de entrada. |
org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat |
| outputFormat |
string |
O formato de saída. |
org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat |
| serde |
string |
O serializador/desserializador (SerDe). |
org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe |
| extra |
string |
Outras informações armazenadas no formato JSON. |
{"mapkey.delim":":","collection.delim":",","serialization.format":"|","field.delim":"|"} |
| partitions |
integer |
O número de partições. |
100 |
| partitionsDoing |
integer |
O número de partições que estão sendo migradas. |
20 |
| partitionsDone |
integer |
O número de partições que foram migradas. |
80 |
| partitionsFailed |
integer |
O número de partições que falharam na migração. |
0 |
| sourceId |
integer |
O ID da fonte de dados. |
2000028 |
| sourceName |
string |
O nome da fonte de dados. |
demo |
| size |
integer |
O tamanho dos dados em bytes. |
23232 |
| numRows |
integer |
O número de linhas. |
233232 |
| updated |
boolean |
Indica se os metadados estão atualizados. |
false |
| lastDdlTime |
string |
A hora da última DDL. |
2024-12-17 15:44:42 |
| status |
string |
O status da migração. Valores válidos:
|
DONE |
Exemplos
Resposta de sucesso
JSON formato
{
"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"
}
}
Códigos de erro
Consulte Códigos de Erro para uma lista completa.
Notas de versão
Consulte Notas de Versão para uma lista completa.