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

时间:2024-07-01 21:07:20

示例

将流over_speed_warning的数据输出到 消息通知 服务 SMN 中。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
//静态主题配置
CREATE SINK STREAM over_speed_warning (
  over_speed_message STRING /* over speed message */
)
  WITH (
    type = "smn",
    region = "xxx",
    topic_Urn = "xxx",
    message_subject = "message title",
    message_column = "over_speed_message"
  );
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
//动态主题配置
CREATE SINK STREAM over_speed_warning2 (  
    over_speed_message STRING, /* over speed message */  
    over_speed_urn STRING
)
  WITH (  
    type = "smn",  
    region = "xxx",
    urn_column = "over_speed_urn",  
    message_subject = "message title",  
    message_column = "over_speed_message"
  );
support.huaweicloud.com/sqlreference-dli/dli_08_0251.html