数据湖探索 DLI-RDS输出流:示例

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

示例

将流audi_cheaper_than_30w的数据输出到数据库test的audi_cheaper_than_30w表下。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
CREATE SINK STREAM audi_cheaper_than_30w (
  car_id STRING,
  car_owner STRING,
  car_brand STRING,
  car_price INT
)
  WITH (
    type = "rds",
    username = "root",
    password = "xxxxxx",
    db_url = "mysql://192.168.1.1:8635/test",
    table_name = "audi_cheaper_than_30w"
); 
support.huaweicloud.com/sqlref-flink-dli/dli_08_0245.html