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
- Install the cluster client, for example, in /opt/hadoopclient.
- 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.
- Obtain the Flink JDBC driver package flink-sql-jdbc-driver-bundle-xxx.jar from the Maven repository.
- In the IDEA Database tool, add the driver. Select the driver package obtained in 3. Figure 1 Adding the driver
- 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
- Submit the Flink SQL job in the default console tab. Figure 4 Submitting the Flink SQL job
- 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
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot