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.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인