Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Halaman ini menjelaskan cara meneruskan argumen runtime dalam tugas replikasi Cloud Data Fusion.
Meneruskan argumen Debezium ke tugas replikasi
Untuk meneruskan argumen dari aplikasi Debezium ke tugas replikasi MySQL atau SQL Server di Cloud Data Fusion, tentukan argumen runtime menggunakan awalan, source.connector.
Konsol
Buka instance Anda:
Di konsol Google Cloud , buka halaman Cloud Data Fusion.
Untuk membuka instance di Cloud Data Fusion Studio,
klik Instance, lalu klik View instance.
Untuk meneruskan parameter JDBC ke tugas replikasi MySQL atau SQL Server,
tentukan argumen runtime yang diawali dengan source.connector.database.
Misalnya, untuk mengonfigurasi parameter JDBC sessionVariables ke
MAX_EXECUTION_TIME=43200000, tetapkan argumen runtime
dengan kunci source.connector.database.sessionVariables dan nilai
MAX_EXECUTION_TIME=43200000.
Untuk mengonfigurasi beberapa parameter JDBC, tetapkan argumen runtime untuk
setiap parameter. Misalnya, untuk mengonfigurasi parameter JDBC
encrypt=true&trustServerCertificate=true, teruskan argumen berikut:
Kunci
Nilai
source.connector.database.encrypt
true
source.connector.database.trustServerCertificate
true
Mengonfigurasi parameter kunci utama
Tabel sumber yang direplikasi harus memiliki kunci utama. Hal ini
merupakan persyaratan ketat hanya jika Oracle adalah database sumber. Untuk sumber SQL Server dan MySQL, Anda dapat menentukan kunci utama kustom, meskipun tabel sumber tidak memilikinya.
Tetapkan parameter key dengan argumen runtime berikut:
Anda dapat menetapkan kunci utama untuk beberapa tabel dengan properti key. Contoh
berikut menunjukkan cara menetapkan kunci untuk tabel inventory.customers
dan purchase.orders:
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 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)."]]