数据湖探索 DLI-JDBC结果表:示例

时间:2023-11-10 09:20:50

示例

将流jdbcSink的数据输出到MySQL数据库中。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
create table jdbcSink(
  car_id STRING,
  car_owner STRING,
  car_brand STRING,
  car_speed INT
)
with (
  'connector.type' = 'jdbc',
  'connector.url' = 'jdbc:mysql://xx.xx.xx.xx:3306/xx',
  'connector.table' = 'jdbc_table_name',
  'connector.driver' = 'com.mysql.jdbc.Driver',
  'connector.username' = 'xxx',
  'connector.password' = 'xxxxxx'
);
support.huaweicloud.com/sqlref-flink-dli/dli_08_0311.html