Help Center/ MapReduce Service/ Component Operation Guide (LTS)/ Using Flink/ Open-Source Flink Features/ Submitting a Flink SQL Job using the Flink JDBC Driver
Updated on 2026-06-27 GMT+08:00

Submitting a Flink SQL Job using the Flink JDBC Driver

This section applies to MRS 3.6.0-LTS and later.

Scenarios

This topic describes how to use the Flink JDBC driver to submit a Flink SQL job.

Submitting a Flink SQL Job Using the Flink JDBC Driver

  1. Install the cluster client, for example, in /opt/hadoopclient.
  2. Refer to Using SQL Gateway to Submit a Flink SQL Job to start a SQL Gateway and record its service IP address and port.

    Add the IP address of the node where the JDBC client is installed to the jobmanager.web.allow-access-address configuration item in the Client installation directory/Flink/flink/conf/flink-conf.yaml file.

  3. Obtain the Flink JDBC driver package flink-sql-jdbc-driver-bundle-xxx.jar from the Maven repository.
  4. In the IDEA Database tool, add the driver. Select the driver package obtained in 3.

    Figure 1 Adding the driver

  5. Use the Flink JDBC driver to establish a data connection.

    Figure 2 Creating a data connection

    Enter the data connection URL in the format of jdbc:flink://IP address:Port number. The IP address and port number are those of the SQL Gateway service created in 2.

    Figure 3 Entering the URL

  6. Submit the Flink SQL job in the default console tab.

    Figure 4 Submitting the Flink SQL job

  7. View the submitted job on the Flink cluster dashboard.

    Log in to FusionInsight Manager, choose Cluster > Services > Yarn > Dashboard, and click the link next to ResourceManager WebUI to go to the Yarn web UI and view the job.
    Figure 5 Viewing the job