数据湖探索 DLI-EdgeHub输入流(EOS):示例

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

示例

从edgehub主题abc中读取数据,数据编码格式为json。数据示例为:{"student":{"score":90,"name":"1bc2"}}。

1
2
3
4
5
6
7
8
9
CREATE SOURCE STREAM student_scores(
  name string,
  score int)
WITH (
  type = "edgehub",
  topic = "abc",
  encode = "json",
  json_config = "score = student.score; name=student.name"
);
support.huaweicloud.com/sqlreference-dli/dli_08_0277.html