Using JDBC drivers with Cloud Data Fusion

This page explains how to use Java Database Connectivity (JDBC) drivers with Cloud Data Fusion pipelines.

When using Cloud Data Fusion, you can connect to your database using the JDBC to read data, transform it, and load it into a destination of your choice, without having to write any code. To do this, you need to upload a JDBC driver to your Cloud Data Fusion instance and configure it so that you can use it in your data pipelines.

Before you begin

Create a Cloud Data Fusion instance. It takes up to 30 minutes for the instance creation process to complete.

Access the Cloud Data Fusion graphical interface

To access the Cloud Data Fusion graphical interface pages mentioned in this tutorial, follow these steps:

  1. In the GCP Console, open the Instances page.

    Open the Instances page

  2. In the Actions column for the instance, click the View Instance link. The Cloud Data Fusion graphical interface opens.
  3. Click the hamburger menu icon at the top left. Choose the page you want from the navigation menu that appears.

Upload a JDBC driver

  1. Access the Cloud Data Fusion graphical interface. Go to the Cloud Data Fusion Control Center.
  2. Click the green circle button.
  3. In the Add entity window that opens, in the Driver box, click the Upload button.
    In the Driver box, click the Upload button.
  4. In the Add driver window that opens, upload the JAR file that contains your JDBC driver. Your JAR file must follow the format <name>-<version>.jar. If your JAR file doesn't follow this format, rename it before you upload.
  5. Click Next.
  6. In the Driver configuration tab:
    1. In the Name field, enter a name for your JDBC driver. Make note of the name you enter because you will need it in later steps. Do not use spaces or special characters in the name.
    2. In the Class name field, enter the official Java class name of the JDBC driver you're using.
    3. (Optional) Enter a description.
    4. Click Finish.

Use a JDBC driver

  1. Access the Cloud Data Fusion graphical interface. Go to the Cloud Data Fusion Pipeline Studio.
  2. In the left navigation panel, select Source or Sink and click the source or sink of your choice. A rectangle that represents the source or sink appears in the Studio canvas.
  3. Hover over the source or sink. Click the Properties button on the Database source/sink.
    Hover over the source or sink and click the properties button.
  4. In the Reference name field, enter the name you defined for the driver in the uploading step.
  5. Fill out the rest of the fields in the Configuration tab.

View a JDBC driver

The JDBC drivers you upload appear as artifacts in the Cloud Data Fusion Control Center. To view a JDBC driver:

  1. Access the Cloud Data Fusion graphical interface. Go to the Cloud Data Fusion Control Center.
  2. In the Filter by dropdown, select Artifacts. An artifact card with your JDBC driver information appears.
    View a JDBC driver.

Delete a JDBC driver

  1. Access the Cloud Data Fusion graphical interface. Go to the Cloud Data Fusion Control Center.
  2. View your JDBC driver. In the Filter by dropdown, select Artifacts.
  3. In the artifact card of your JDBC driver, click the trash button at the bottom.
    Delete a JDBC driver.

What's next

Trang này có hữu ích không? Hãy cho chúng tôi biết đánh giá của bạn:

Gửi phản hồi về...