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.

feita há 4 meses124 visualizações
1 Resposta
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
ESPECIALISTA
Greg_B
respondido há 4 meses
  • answer thank you. clientId random string. example) train_001, airport_111, ... So. startwith() or substring() function cannot be used.

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas