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.
Open the instance in Cloud Data Fusion
In the Google Cloud console, go to the Cloud Data Fusion page.
Click Instances, and then click View instance to open the instance in the Cloud Data Fusion web interface.
Upload a JDBC driver
- Access the Cloud Data Fusion graphical interface. Go to the Cloud Data Fusion Control Center.
- Click the green circle button.
- In the Add entity window that opens, in the
Driver box, click the Upload button.
- 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. - Click Next.
- In the Driver configuration tab:
- 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.
- In the Class name field, enter the official Java class name of the JDBC driver you're using.
- Optional: Enter a description.
- Click Finish.
Use a JDBC driver
- Access the Cloud Data Fusion graphical interface. Go to the Cloud Data Fusion Pipeline Studio.
- 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.
Hover over the source or sink. Click Properties on the Database source or sink.
In the Reference name field, enter the name you defined for the driver in the uploading step.
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:
- Access the Cloud Data Fusion graphical interface. Go to the Cloud Data Fusion Control Center.
- In the Filter by dropdown, select Artifacts. An artifact card with
your JDBC driver information appears.
Delete a JDBC driver
- Access the Cloud Data Fusion graphical interface. Go to the Cloud Data Fusion Control Center.
- View your JDBC driver. In the Filter by dropdown, select Artifacts.
- In the artifact card of your JDBC driver, click the trash button at the
bottom.
What's next
- Learn more about Cloud Data Fusion.
- Work through a tutorial.