aws iot sql like

0

SELECT clientId() as clientId, CASE clientId() WHEN 'bus_#' THEN 'bus' WHEN 'car_#' THEN 'car' ELSE 'noThingType' END as thingType FROM '$aws/events/#'

clientId : bus_001, bus_002, car_aaa, car_bbb

You can search the connection history through AWS IoT SQL: FROM '$aws/events/#'. The clientId is fixed in the front and variable in the back. I want to look up thingType by looking at clientId. Is there an AWS IoT SQL that behaves like MySQL? please answer about my question. Thanks in advance.

已提问 4 个月前124 查看次数
1 回答
0

Hi. The startswith() or substring() functions may be of interest.

Alternatively you might consider to use a Lambda to process the events, particularly if you've used registry thing types.

profile pictureAWS
专家
Greg_B
已回答 4 个月前
  • answer thank you. clientId random string. example) train_001, airport_111, ... So. startwith() or substring() function cannot be used.

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则