本頁說明如何搭配使用 Cloud Data Fusion 管道和 Java Database Connectivity (JDBC) 驅動程式。
Cloud Data Fusion 中的部分外掛程式需要將 JDBC 驅動程式新增至命名空間。舉例來說,您必須先將支援的 MySQL 驅動程式新增至命名空間,才能執行含有 MySQL 批次來源外掛程式的管道。您可以透過 Cloud Data Fusion Hub、命名空間管理頁面或「新增實體」頁面,將 JDBC 驅動程式新增至命名空間。您也可以在「命名空間管理員」頁面中刪除不需要的 JDBC 驅動程式。
新增 JDBC 驅動程式
中樞
如要透過 Cloud Data Fusion Hub 新增 JDBC 驅動程式,請按照下列步驟操作:
在 Cloud Data Fusion Studio 中,依序按一下「Hub」「驅動程式」,然後點選驅動程式。
選用:如要取得 JAR 檔案的下載位置資訊,請按一下「Download」。
按一下「部署」,上傳 JAR 檔案,然後按一下「下一步」。
請確認驅動程式的類別名稱和版本。
按一下「完成」。
Cloud Data Fusion 會將驅動程式新增至命名空間。
命名空間管理頁面
如要透過「命名空間管理員」頁面新增 JDBC 驅動程式,請按照下列步驟操作:
下載驅動程式。例如,如要下載 MySQL 的 JDBC 驅動程式,請前往 dev.mysql.com 並下載 JAR 檔案。
在 Cloud Data Fusion 中,依序按一下 menu「Menu」>「Namespace Admin」。
在「命名空間」頁面中,按一下「驅動程式」。
上傳 JAR 檔案,然後點選「下一步」。
輸入驅動程式的名稱和類別。
按一下「完成」。
驅動程式會新增至命名空間。
「新增實體」頁面
如要透過「新增實體」頁面新增 JDBC 驅動程式,請按照下列步驟操作:
下載驅動程式。例如,如要下載 MySQL 的 JDBC 驅動程式,請前往 dev.mysql.com 並下載 JAR 檔案。
在「管道」頁面上,按一下綠色加號圖示。
在隨即顯示的「新增實體」頁面中,前往「駕駛人」,然後按一下「上傳」。
上傳 JAR 檔案,然後點選「下一步」。
輸入驅動程式的名稱和類別。
按一下「完成」。
驅動程式會新增至命名空間。
使用 JDBC 驅動程式
在 Cloud Data Fusion Studio 的「Pipeline」頁面中,從「Source」或「Sink」清單中選擇外掛程式。管道中會顯示來源或接收器的節點。
將游標懸停在管道中的節點上,然後按一下「Properties」。
在「Reference name」欄位中,輸入您在前一個「Add a JDBC driver」步驟中為驅動程式定義的名稱。
點按 close「Close」(關閉)。
刪除 JDBC 驅動程式
如要從命名空間中刪除 JDBC 驅動程式,請按照下列步驟操作:
在 Cloud Data Fusion 中,依序按一下 menu「Menu」>「Namespace Admin」。
[[["容易理解","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\u003eThis page explains how to add, use, and delete Java Database Connectivity (JDBC) drivers within Cloud Data Fusion pipelines.\u003c/p\u003e\n"],["\u003cp\u003eJDBC drivers can be added to a namespace through the Cloud Data Fusion Hub, the Namespace admin page, or the Add entity page.\u003c/p\u003e\n"],["\u003cp\u003eTo use a JDBC driver, you must select a relevant source or sink plugin within the pipeline, and specify the driver's reference name in the plugin's properties.\u003c/p\u003e\n"],["\u003cp\u003eUnneeded JDBC drivers can be deleted from the namespace through the Namespace admin page.\u003c/p\u003e\n"]]],[],null,["# Plugin drivers\n\nThis page explains how to use Java Database Connectivity (JDBC) drivers with\nCloud Data Fusion pipelines.\n\nSome plugins in Cloud Data Fusion require a JDBC driver to be added to the\nnamespace. For example, before you can run a pipeline with a MySQL batch source\nplugin, you must add the supported MySQL driver to the namespace. You can add\nJDBC drivers to a namespace from the Cloud Data Fusion Hub, the **Namespace\nadmin** page, or the **Add entity** page. You can also delete unneeded JDBC\ndrivers from the **Namespace admin** page.\n\nAdd a JDBC driver\n-----------------\n\n### Hub\n\n\nTo add a JDBC driver from the Cloud Data Fusion Hub, follow these steps:\n\n1. In the Cloud Data Fusion Studio, click **Hub** \\\u003e **Drivers**, and click a driver.\n2. Optional: To get information about where to download the JAR file, click **Download**.\n3. Click **Deploy** , upload the JAR file, and click **Next**.\n4. Verify the class name and version of the driver.\n5. Click **Finish**.\n\nCloud Data Fusion adds the driver to the namespace.\n\n### Namespace admin page\n\n\nTo add a JDBC driver from the **Namespace administrator** page, follow these\nsteps:\n\n1. Download a driver. For example, to download the JDBC driver for MySQL, go to `dev.mysql.com` and download the JAR file.\n2. In Cloud Data Fusion, click menu **Menu** \\\u003e **Namespace Admin**.\n3. On the **Namespace** page, click **Drivers**.\n4. Upload your JAR file and click **Next**.\n5. Enter the name and class of the driver.\n6. Click **Finish**.\n\nThe driver is added to the namespace.\n\n### Add entity page\n\n\nTo add a JDBC driver from the **Add entity** page, follow these steps:\n\n1. Download a driver. For example, to download the JDBC driver for MySQL, go to `dev.mysql.com` and download the JAR file.\n2. On the **Pipeline** page, click the green plus sign.\n3. On the **Add entity** page that appears, go to **Driver** and click **Upload**.\n4. Upload the JAR file and click **Next**.\n5. Enter the name and class of the driver.\n6. Click **Finish**.\n\nThe driver is added to the namespace.\n\nUse a JDBC driver\n-----------------\n\n1. On the **Pipeline** page in the Cloud Data Fusion Studio, choose a plugin from the **Source** or **Sink** list. The node for the source or sink appears in your pipeline.\n2. Hold the pointer over the node in the pipeline and click **Properties**.\n3. In the **Reference name** field, enter the name you defined for the driver in the preceding [Add a JDBC driver](#upload-driver) step.\n4. Click close **Close**.\n\nDelete a JDBC driver\n--------------------\n\nTo delete a JDBC driver from a namespace, follow these steps:\n\n1. In Cloud Data Fusion, click menu **Menu** \\\u003e **Namespace Admin**.\n2. On the **Namespace** page, click **Drivers**.\n3. Choose a driver and click more_vert **More**.\n4. Click **Delete**.\n\nWhat's next\n-----------\n\n- Learn about [configuring plugins](/data-fusion/docs/concepts/plugins)."]]