flows 报错!!!

400 BAD_REQUEST: Bad Arguments: #{reason => {parse_error,{“10: syntax error before: ‘FROM’”,[{‘FOREACH’,1},{‘NAME’,7,“payload”},{‘.’,2},{‘NAME’,7,“sensors”},{‘DO’,3},{‘NAME’,8,“clientid”},{‘,’,4},{‘NAME’,4,“item”},{‘.’,5},{‘NAME’,4,“name”},{‘AS’,5},{‘NAME’,4,“name”},{‘,’,5},{‘NAME’,4,“item”},{‘.’,6},{‘NAME’,3,“idx”},{‘AS’,6},{‘NAME’,3,“idx”},{‘INCASE’,7},{‘NAME’,4,“item”},{‘.’,8},{‘NAME’,3,“idx”},{‘COMPARISON’,8,‘>=’},{‘INTNUM’,8,“1”},{‘FROM’,9},{‘NAME’,9,“"t/#"”},{‘FROM’,10},{‘NAME’,11,“"ttt"”}]}},value => <<“FOREACH\n payload.sensors\nDO\n clientid,\n item.name as name,\n item.idx as idx\nINCASE\n item.idx >= 1\nFROM "t/#"\nFROM\n "ttt"”>>,path => “rule_engine.rules.1byycdu0.sql”,kind => validation_error}

使用官网中的例子,无法在EMQX中执行!

topic发的数据是:
{
“date”: “2020-04-24”,
“sensors”: [
{“name”: “a”, “idx”:0},
{“name”: “b”, “idx”:1},
{“name”: “c”, “idx”:2}
]
}

函数使用的是:
FOREACH
payload.sensors
DO
clientid,
item.name as name,
item.idx as idx
INCASE
item.idx >= 1
FROM “t/#”

输出的是控制台, 然后创建flows时,直接报错,无法创建

我试了下,是可以的。看你贴的样例:全是中文的引号。要使用英文的引号
官网里面应该也是英文的。