Transmitir um argumento de ambiente de execução para um job de replicação
Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Esta página descreve como transmitir argumentos de execução em jobs de replicação do Cloud Data Fusion.
Transmitir um argumento do Debezium para um job de replicação
Para transmitir um argumento de um aplicativo Debezium para um trabalho de replicação do MySQL ou do SQL Server no Cloud Data Fusion, especifique um argumento de execução usando o prefixo source.connector.
Console
Acesse sua instância:
No console Google Cloud , acesse a página do Cloud Data Fusion.
Para abrir a instância no Cloud Data Fusion Studio, clique em Instâncias e em Ver instância.
Para transmitir um parâmetro JDBC a um job de replicação do MySQL ou do SQL Server,
especifique o argumento de execução com o prefixo source.connector.database.
Por exemplo, para configurar o parâmetro JDBC sessionVariables como
MAX_EXECUTION_TIME=43200000, defina um argumento de execução
com a chave source.connector.database.sessionVariables e o valor
MAX_EXECUTION_TIME=43200000.
Para configurar vários parâmetros JDBC, defina um argumento de execução para
cada parâmetro. Por exemplo, para configurar os parâmetros JDBC
encrypt=true&trustServerCertificate=true, transmita os seguintes argumentos:
Chave
Valor
source.connector.database.encrypt
true
source.connector.database.trustServerCertificate
true
Configurar o parâmetro de chave primária
A tabela de origem replicada precisa ter uma chave primária. Esse é um requisito estrito apenas quando o Oracle é o banco de dados de origem. Para origens do SQL Server e do MySQL, é possível especificar uma chave primária personalizada, mesmo que a tabela de origem não tenha uma.
Defina o parâmetro key com o seguinte argumento de execução:
É possível definir a chave primária para várias tabelas com a propriedade key. O
exemplo abaixo mostra como definir a chave para as tabelas inventory.customers
e purchase.orders:
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-09-04 UTC."],[[["\u003cp\u003eRuntime arguments for Cloud Data Fusion replication jobs can be passed using the prefix \u003ccode\u003esource.connector\u003c/code\u003e for Debezium applications.\u003c/p\u003e\n"],["\u003cp\u003eJDBC parameters can be configured for MySQL or SQL Server replication jobs by using the \u003ccode\u003esource.connector.database\u003c/code\u003e prefix in the runtime argument key.\u003c/p\u003e\n"],["\u003cp\u003eIf a source table lacks a primary key (applicable to SQL Server and MySQL), it can be configured by setting the \u003ccode\u003esource.connector.message.key.columns\u003c/code\u003e runtime argument, specifying the schema, table, and key column.\u003c/p\u003e\n"],["\u003cp\u003eThe webpage shows that it is possible to configure the primary key for multiple tables with the \u003ccode\u003ekey\u003c/code\u003e property, as shown in the example with the tables \u003ccode\u003einventory.customers\u003c/code\u003e and \u003ccode\u003epurchase.orders\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eYou can set a runtime argument using the REST API, by looking at the CDAP Preferences Microservices reference.\u003c/p\u003e\n"]]],[],null,["# Pass a runtime argument to a Replication job\n\nThis page describes how to pass runtime arguments in Cloud Data Fusion\nreplication jobs.\n\nPass a Debezium argument to a replication job\n---------------------------------------------\n\nTo pass an argument from a Debezium application to a MySQL or SQL Server\nreplication job in Cloud Data Fusion, specify a runtime argument using\nthe prefix, `source.connector`. \n\n### Console\n\n1. Go to your instance:\n\n\n 1. In the Google Cloud console, go to the Cloud Data Fusion page.\n\n 2. To open the instance in the Cloud Data Fusion Studio,\n click **Instances** , and then click **View instance**.\n\n [Go to Instances](https://console.cloud.google.com/data-fusion/locations/-/instances)\n\n \u003cbr /\u003e\n\n2. Click menu **Menu \\\u003e\n Control Center**.\n\n3. Locate the **Application** for the replication job and click\n build\n **Preferences** . The **Preferences** window opens.\n\n4. In the **Key** field, specify a runtime argument for the\n replication job by prefixing it with `source.connector`.\n\n5. Click **Save \\& Close**.\n\n### REST API\n\nTo set a runtime argument using the REST API, see the\n[CDAP Preferences Microservices](https://cdap.atlassian.net/wiki/spaces/DOCS/pages/477561058/Preferences+Microservices)\nreference.\n\nConfigure JDBC parameters\n-------------------------\n\nTo pass a JDBC parameter to a MySQL or SQL Server replication job,\nspecify the runtime argument prefixed with `source.connector.database`.\n\nFor example, to configure the JDBC parameter `sessionVariables` to\n`MAX_EXECUTION_TIME=43200000`, [set a runtime argument](/data-fusion/docs/how-to/pass-runtime-args-in-replication#debezium-arguments)\nwith the key `source.connector.database.sessionVariables` and the value\n`MAX_EXECUTION_TIME=43200000`.\n\nTo configure multiple JDBC parameters, set a runtime argument for\neach parameter. For example, to configure the JDBC parameters\n`encrypt=true&trustServerCertificate=true`, pass the following arguments:\n\n| **Note:** Cloud Data Fusion doesn't support setting JDBC arguments during the setup or assessment of a replication job. If you must set JDBC parameters to resolve assessment issues, bypass the assessment by deploying the replication job through the [Replication API](/data-fusion/docs/reference/replication-ref#create-a-replication-job). Then, before you start the job, configure the JDBC arguments as described previously in this section.\n\nConfigure the primary key parameter\n-----------------------------------\n\nThe source table that gets replicated must have a primary key. This is\na strict requirement only when Oracle is the source database. For SQL Server and\nMySQL sources, you can specify a custom primary key, even if the source\ntable doesn't have one.\n\nSet the `key` parameter with the following runtime argument:\n\n`source.connector.message.key.columns = `\u003cvar translate=\"no\"\u003eSCHEMA\u003c/var\u003e`.`\u003cvar translate=\"no\"\u003eTABLE\u003c/var\u003e`:`\u003cvar translate=\"no\"\u003eKEY_COLUMN\u003c/var\u003e\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eSCHEMA\u003c/var\u003e: The name of the source schema.\n- \u003cvar translate=\"no\"\u003eTABLE\u003c/var\u003e: The source table name.\n- \u003cvar translate=\"no\"\u003eKEY_COLUMN\u003c/var\u003e: The column that contains the secure key.\n\nYou can set the primary key for multiple tables with the `key` property. The\nfollowing example shows how to set the key for the tables `inventory.customers`\nand `purchase.orders`: \n\n source.connector.message.key.columns = inventory.customers:pk1,pk2;purchase.orders:pk3,pk4\n\nConfigure isolation mode for a snapshot in SQL Server replication\n-----------------------------------------------------------------\n\nFor more information about the runtime argument for isolation mode, see\n[Isolation levels in SQL Server replication](/data-fusion/docs/concepts/replication-isolation-levels).\n\nWhat's next\n-----------\n\n- Learn more about [Replication](/data-fusion/docs/concepts/replication) in Cloud Data Fusion.\n- Refer to the [Replication API reference](/data-fusion/docs/reference/replication-ref)."]]