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

时间:2024-11-16 13:21:40

示例

将流qualified_cars的数据输出到 云搜索服务 的集群。
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
CREATE SINK STREAM qualified_cars (
  car_id STRING,
  car_owner STRING,
  car_age INT,
  average_speed INT,
  total_miles INT
)
  WITH (
    type = "es",
    region = "xxx",
    cluster_address = "192.168.0.212:9200",
    es_index = "car",
    es_type = "information",
    es_fields = "id,owner,age,speed,miles",
    batch_insert_data_num = "10"
); 
support.huaweicloud.com/sqlref-flink-dli/dli_08_0252.html