Pasa un argumento del entorno de ejecución a un trabajo de replicación
Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
En esta página, se describe cómo pasar argumentos de tiempo de ejecución en trabajos de replicación de Cloud Data Fusion.
Pasa un argumento de Debezium a un trabajo de replicación
Para pasar un argumento de una aplicación de Debezium a una tarea de replicación de MySQL o SQL Server en Cloud Data Fusion, especifica un argumento de tiempo de ejecución con el prefijo source.connector.
Console
Ve a tu instancia:
En la Google Cloud consola, ve a la página de Cloud Data Fusion.
Para abrir la instancia en Cloud Data Fusion Studio,
haz clic en Instancias y, luego, en Ver instancia.
Para pasar un parámetro JDBC a una tarea de replicación de MySQL o SQL Server, especifica el argumento del entorno de ejecución con el prefijo source.connector.database.
Por ejemplo, para configurar el parámetro JDBC sessionVariables en MAX_EXECUTION_TIME=43200000, establece un argumento de tiempo de ejecución con la clave source.connector.database.sessionVariables y el valor MAX_EXECUTION_TIME=43200000.
Para configurar varios parámetros de JDBC, establece un argumento de tiempo de ejecución para cada parámetro. Por ejemplo, para configurar los parámetros JDBC encrypt=true&trustServerCertificate=true, pasa los siguientes argumentos:
Clave
Valor
source.connector.database.encrypt
true
source.connector.database.trustServerCertificate
true
Configura el parámetro de clave principal
La tabla de origen que se replica debe tener una clave primaria. Este es un requisito estricto solo cuando Oracle es la base de datos de origen. En el caso de las fuentes de SQL Server y MySQL, puedes especificar una clave primaria personalizada, incluso si la tabla de origen no tiene una.
Establece el parámetro key con el siguiente argumento de tiempo de ejecución:
KEY_COLUMN: Es la columna que contiene la clave segura.
Puedes establecer la clave primaria de varias tablas con la propiedad key. En el siguiente ejemplo, se muestra cómo configurar la clave para las tablas inventory.customers y purchase.orders:
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Información o código de muestra incorrectos","incorrectInformationOrSampleCode","thumb-down"],["Faltan la información o los ejemplos que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 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)."]]