Consulta metatabelas com base em condições específicas.
Descrição da operação
Apenas tabelas de engine MaxCompute e EMR são suportadas para pesquisa.
Experimente agora
Testar
Autorização RAM
|
Ação |
Nível de acesso |
Tipo de recurso |
Chave de condição |
Ação dependente |
|
dataworks:* |
get |
*All Resource
|
Nenhuma | Nenhuma |
Parâmetros da solicitação
|
Parâmetro |
Tipo |
Obrigatório |
Descrição |
Exemplo |
| PageNumber |
integer |
Não |
O número da página. |
1 |
| PageSize |
integer |
Não |
O número de entradas por página. Valor padrão: 10. Valor máximo: 100. |
10 |
| AppGuid |
string |
Não |
O GUID do workspace onde as metatabelas residem. |
odps.engine_name |
| Keyword |
string |
Sim |
A palavra-chave com base na qual as metatabelas são consultadas. Durante a consulta, o sistema tokeniza os nomes das metatabelas e faz a correspondência dos nomes com a palavra-chave. Se nenhum nome for correspondido, o valor null é retornado. Por padrão, o sistema usa underscores (_) para tokenizar os nomes. |
test |
| EntityType |
integer |
Não |
O tipo das metatabelas. Valores válidos: 0 e 1. O valor 0 indica que tabelas são consultadas. O valor 1 indica que views são consultadas. Se você não configurar este parâmetro, todos os tipos de metatabelas serão consultados. |
0 |
| ClusterId |
string |
Não |
O ID do cluster EMR. Este parâmetro é obrigatório apenas se você definir o parâmetro DataSourceType como emr. Você pode fazer login no console do EMR para obter o ID. |
abc |
| DataSourceType |
string |
Não |
O tipo da fonte de dados. Valores válidos: odps e emr. |
emr |
| Schema |
string |
Não |
As informações de schema da tabela. Você deve configurar este parâmetro se habilitar o modelo de três camadas do MaxCompute. |
default |
Elementos de resposta
|
Elemento |
Tipo |
Descrição |
Exemplo |
|
object |
Os parâmetros de resposta. |
||
| HttpStatusCode |
integer |
O código de status HTTP. |
200 |
| ErrorMessage |
string |
A mensagem de erro. |
The specified parameters are invalid. |
| RequestId |
string |
O ID da solicitação. |
0bc1ec92159376**** |
| Success |
boolean |
Indica se a solicitação foi bem-sucedida. |
true |
| ErrorCode |
string |
O código de erro. |
1031203110005 |
| Data |
object |
Os resultados da pesquisa. |
|
| PageNumber |
integer |
O número da página. |
1 |
| PageSize |
integer |
O número de entradas por página. |
10 |
| TotalCount |
integer |
O número total de metatabelas. |
100 |
| DataEntityList |
array<object> |
A lista de metatabelas. |
|
|
object |
|||
| TableName |
string |
The name of the metatable. |
test_name |
| DatabaseName |
string |
The name of the metadatabase. |
abc |
| EntityType |
integer |
The type of the metatable. Valid values:
|
0 |
| ProjectName |
string |
The name of the workspace. |
test |
| ProjectId |
integer |
The ID of the workspace. |
323 |
| TableGuid |
string |
The GUID of the metatable. |
odps.engine_name.test_name |
| OwnerId |
string |
The ID of the Alibaba Cloud account used by the workspace owner. |
123 |
| ClusterId |
string |
The ID of the EMR cluster. |
abc |
| EnvType |
integer |
The type of the environment. Valid values:
|
1 |
| TenantId |
integer |
The tenant ID. |
12345 |
| Schema |
string |
The schema information of the table. You must configure this parameter if you enable the three-layer model of MaxCompute. |
default |
Exemplos
Resposta de sucesso
JSON formato
{
"HttpStatusCode": 200,
"ErrorMessage": "The specified parameters are invalid.",
"RequestId": "0bc1ec92159376****",
"Success": true,
"ErrorCode": "1031203110005",
"Data": {
"PageNumber": 1,
"PageSize": 10,
"TotalCount": 100,
"DataEntityList": [
{
"TableName": "test_name",
"DatabaseName": "abc",
"EntityType": 0,
"ProjectName": "test",
"ProjectId": 323,
"TableGuid": "odps.engine_name.test_name",
"OwnerId": "123",
"ClusterId": "abc",
"EnvType": 1,
"TenantId": 12345,
"Schema": "default"
}
]
}
}
Códigos de erro
|
Código de status HTTP |
Código de erro |
Mensagem de erro |
Descrição |
|---|---|---|---|
| 400 | Invalid.Meta.TableNotExist | The table does not exist. | The table does not exist. |
| 400 | InvalidParameter.Meta.CommonError | The specified parameter is invalid. | The request parameter is invalid. |
| 400 | InvalidParameter.Meta.Illegal | The app guid parameter is invalid. | The app guid parameter is invalid. |
| 400 | InvalidParameter.Meta.IllegalDate | The date format is invalid. | The date format is invalid. |
| 400 | InvalidParameter.Meta.IllegalPageError | The parameter for paging is invalid. | The parameter for paging is invalid. |
| 400 | InvalidParameter.Meta.NotExist | The object does not exist. | |
| 400 | InternalError.UserId.Missing | An internal system error occurred. Try again later. | |
| 400 | InternalError.Meta.NoCalcEngine | An error occurred while retrieving the compute engine based on the MaxCompute project. | Incorrect project entered by user |
| 500 | InternalError.System | An internal system error occurred. Try again later. | |
| 500 | InternalError.Meta.TenantTimeOut | Failed to connect to the interface network. | Failed to connect to the interface network. |
| 500 | InternalError.Meta.Unknown | An unknown error occurred while processing your request. | An unknown error occurred while processing your request. |
| 403 | ResourceNotAuthorized.Api | You are not authorized to access the resources. | |
| 403 | Forbidden.Meta.NoTenant | The user is not the owner of any tenants. | The user is not the owner of any tenants. |
| 403 | Forbidden.Access | Access is forbidden. Please first activate DataWorks Enterprise Edition or Flagship Edition. | No permission, please authorize |
| 429 | Throttling.Api | The request for this resource has exceeded your available limit. | |
| 429 | Throttling.Api.Risk | The request for this resource has exceeded your daily available limit. | |
| 429 | Throttling.System | The DataWorks system is busy. Try again later. | |
| 429 | Throttling.User | Your request is too frequent. Try again later. |
Consulte Códigos de Erro para uma lista completa.
Notas de versão
Consulte Notas de Versão para uma lista completa.