[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-04 (世界標準時間)。"],[[["\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)."]]