Todos os produtos
Search
Central de documentação

MaxCompute:ListMmsJobs

Última atualização: Jul 04, 2026

Lista os trabalhos de migração.

Experimente agora

Experimente esta API no OpenAPI Explorer, sem necessidade de assinatura manual. Chamadas bem-sucedidas geram automaticamente código SDK correspondente aos seus parâmetros. Faça o download com segurança de credenciais integrada para uso local.

Testar

Autorização RAM

A tabela abaixo descreve a autorização necessária para chamar esta API. Você pode defini-la em uma política do Resource Access Management (RAM). As colunas da tabela estão detalhadas abaixo:

  • Ação: As ações que podem ser usadas no elemento Action das instruções de política de permissão do RAM para conceder permissões para executar a operação.

  • API: A API que você pode chamar para executar a ação.

  • Nível de acesso: O nível de acesso predefinido concedido para cada API. Valores válidos: create, list, get, update e delete.

  • Tipo de recurso: O tipo de recurso que suporta autorização para executar a ação. Indica se a ação suporta permissão em nível de recurso. O recurso especificado deve ser compatível com a ação. Caso contrário, a política será ineficaz.

    • Para APIs com permissões em nível de recurso, os tipos de recursos obrigatórios são marcados com um asterisco (*). Especifique o Nome de Recurso Alibaba Cloud (ARN) correspondente no elemento Resource da política.

    • Para APIs sem permissões em nível de recurso, é exibido como Todos os Recursos. Use um asterisco (*) no elemento Resource da política.

  • Chave de condição: As chaves de condição definidas pelo serviço. A chave permite controle granular, aplicando-se somente a ações ou a ações associadas a recursos específicos. Além das chaves de condição específicas do serviço, o Alibaba Cloud fornece um conjunto de chaves de condição comuns aplicáveis a todos os serviços compatíveis com RAM.

  • Ação dependente: As ações dependentes necessárias para executar a ação. Para concluir a ação, o usuário RAM ou a função RAM deve ter permissões para executar todas as ações dependentes.

Ação

Nível de acesso

Tipo de recurso

Chave de condição

Ação dependente

odps:ListMmsJobs

list

*project

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

Nenhuma Nenhuma

Sintaxe da solicitação

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

Parâmetros de caminho

Parâmetro

Tipo

Obrigatório

Descrição

Exemplo

sourceId

integer

Sim

O ID da fonte de dados.

2000002

Parâmetros da solicitação

Parâmetro

Tipo

Obrigatório

Descrição

Exemplo

name

string

Não

O nome da fonte de dados.

demo

srcDbName

string

Não

O nome do banco de dados de origem.

test_db_1

srcTableName

string

Não

O nome da tabela de origem.

test_table_1

dstDbName

string

Não

O projeto MaxCompute de destino.

mms_test

dstTableName

string

Não

A tabela MaxCompute de destino.

test_table_1

status

string

Não

O status do trabalho de migração.

Valores válidos:

  • INIT :

    A migração não foi iniciada.

  • DONE :

    A migração foi bem-sucedida.

  • DOING :

    A migração está em andamento.

  • FAILED :

    A migração falhou.

DOING

stopped

integer

Não

Indica se o trabalho está parado.

false

timerId

integer

Não

O ID do temporizador.

1

pageNum

integer

Não

O número da página a ser retornada.

1

pageSize

integer

Não

O número de itens a serem retornados por página.

Valores válidos:

  • asc :

    Ascending order.

  • desc :

    Descending order.

10

sorter.status

string

Não

Classificação por status.

Valores válidos:

  • asc :

    Crescente.

  • desc :

    Decrescente.

desc

Elementos de resposta

Elemento

Tipo

Descrição

Exemplo

object

Os dados retornados.

requestId

string

O ID da solicitação.

1112E7C7-C65F-57A2-A7C7-3B178AA257B6

data

object

Os detalhes dos dados retornados.

total

integer

O número total de registros.

100

objectList

array<object>

A lista de trabalhos de migração.

array<object>

O objeto do trabalho de migração.

id

integer

The migration job ID.

18

name

string

The name of the migration job.

migrate_db_1

sourceId

integer

The data source ID.

2000015

dbId

integer

The source database ID.

196

sourceName

string

The name of the data source.

demo

srcDbName

string

The name of the source database.

test_db_1

srcSchemaName

string

The source schema name. This is the schema in a Layer 3 namespace.

test_table_1

dstDbName

string

The destination MaxCompute project.

mms_test

dstSchemaName

string

The destination MaxCompute schema.

test_table_1

status

string

The status of the migration job.

Valores válidos:

  • INIT :

    The job has not started.

  • DONE :

    The job is complete.

  • DOING :

    The job is running.

  • FAILED :

    The job failed.

DONE

type

string

The migration scope. Valid values: Database, Tables, and Partitions.

Valores válidos:

  • Partitions :

    Migrates multiple partitions.

  • Database :

    Migrates a single database.

  • Tables :

    Migrates multiple tables.

Tables

taskNum

integer

The number of migration tasks in the job.

10

stopped

boolean

Indicates whether the migration job is stopped.

false

createTime

string

Indicates whether the migration job is stopped.

2024-12-17 15:44:17

taskDone

integer

The number of completed migration tasks.

10

config

object

The configuration of the migration job.

partitions

array

When type is set to Partitions, specify the partition IDs of the tables to migrate.

integer

The partition ID of a table to migrate.

[123, 132]

tables

array

When type is set to Tables, specify the names of the tables to migrate.

string

The name of a table to migrate.

["student", "scores"]

taskType

string

Deprecated. Valid values: MOCK, HIVE (hive udtf task), HIVE_DATAX (hive datax task), COPY_TASK (ODPS Copy Task), ODPS_INSERT_OVERWRITE (ODPS simple insert overwrite task), MC2MC_VERIFY, OSS, HIVE_OSS, HIVE_SPARK, and BIGQUERY.

BIGQUERY

tableBlackList

array

When type is set to Database, specify the tables to exclude from migration.

string

When type is set to Database, the table to exclude from migration.

["student", "scores"]

tableWhiteList

array

When type is set to Database, specify the tables to migrate. If you do not specify tableWhiteList, all tables in the specified database are migrated.

string

When type is set to Database, the table to migrate.

["student", "scores"]

partitionFilters

object

The partition filter expression. Specify the partition filter expression for each table.

string

The partition filter expression. Example: p1 >= '2022-03-04' and (p2 = 10 or p3 > 20) and p4 in ('abc', 'cde'). Notes:

p1, p2, and p3 are partition names.

Partition values are strings or numbers. Strings are enclosed in double or single quotes.

Only string values are allowed for partition columns other than INT and BIGINT types.

Comparison operators include the following: >, >=, =, <, <=, and <>.

The IN operator is supported.

Logical operators include AND and OR.

Use parentheses to group conditions.

{ "student": "p1 >= '2022-03-04' and (p2 = 10 or p3 > 20) and p4 in ('abc', 'cde')" }

schemaOnly

boolean

Deprecated.

false

tableMapping

object

The mapping from source table names to destination table names.

string

The mapping from a source table name to a destination table name.

{'a': 'a1'}

increment

boolean

Enable incremental migration. Only new or modified partitions are migrated. Modified partitions are re-migrated.

true

enableVerification

boolean

Enable verification. The current method runs SELECT COUNT on both the source and destination and compares the row counts.

true

tunnelQuota

string

Deprecated.

Depcreated

columnMapping

object

The mapping from source column names to destination column names.

string

The mapping from a source column name to a destination column name.

{"c-1": "c_1"}

others

object

Other configuration settings.

{"spark.executor.mem": "2g"}

eta

string

The estimated completion time of the migration. A smaller eta value increases the priority of the migration job.

2025-05-06

pageNum

integer

O número da página.

1

pageSize

integer

O número de entradas retornadas em cada página.

10

Exemplos

Resposta de sucesso

JSON formato

{
  "requestId": "1112E7C7-C65F-57A2-A7C7-3B178AA257B6",
  "data": {
    "total": 100,
    "objectList": [
      {
        "id": 18,
        "name": "migrate_db_1",
        "sourceId": 2000015,
        "dbId": 196,
        "sourceName": "demo",
        "srcDbName": "test_db_1",
        "srcSchemaName": "test_table_1",
        "dstDbName": "mms_test",
        "dstSchemaName": "test_table_1",
        "status": "DONE",
        "type": "Tables",
        "taskNum": 10,
        "stopped": false,
        "createTime": "2024-12-17 15:44:17\n",
        "taskDone": 10,
        "config": {
          "partitions": [
            0
          ],
          "tables": [
            "[\"student\", \"scores\"]"
          ],
          "taskType": "BIGQUERY",
          "tableBlackList": [
            "[\"student\", \"scores\"]"
          ],
          "tableWhiteList": [
            "[\"student\", \"scores\"]"
          ],
          "partitionFilters": {
            "key": "{\n\"student\": \"p1 >= '2022-03-04' and (p2 = 10 or p3 > 20) and p4 in ('abc', 'cde')\" \n}"
          },
          "schemaOnly": false,
          "tableMapping": {
            "key": "{'a': 'a1'}"
          },
          "increment": true,
          "enableVerification": true,
          "tunnelQuota": "Depcreated",
          "columnMapping": {
            "key": "{\"c-1\": \"c_1\"}"
          },
          "others": {
            "spark.executor.mem": "2g"
          }
        },
        "eta": "2025-05-06"
      }
    ],
    "pageNum": 1,
    "pageSize": 10
  }
}

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.