1 Antwort
- Neueste
- Die meisten Stimmen
- Die meisten Kommentare
0
Hi. I tried to replicate your issue with the WHERE clause, but didn't find a problem with SQL version 2016-03-23. Are you still stuck on this problem?
Relevanter Inhalt
- AWS OFFICIALAktualisiert vor 2 Jahren
- AWS OFFICIALAktualisiert vor einem Jahr
- AWS OFFICIALAktualisiert vor einem Jahr
- Wie veröffentliche ich MQTT-Nachrichten von meinem Gerät auf AWS IoT Core, wenn ich Python verwende?AWS OFFICIALAktualisiert vor 3 Jahren
Hello Greg, thanks for your reply! Yes, unfortunately I am still stuck on this. Could you please provide the SQL query you tried as well as the message you used it on?
The messages published to the topic I am querying are structured this way: { "state": { "debug": { "remoteLogging": false }, "command": "ls", ... }, "version": ... , "timestamp": ... , "metadata": ... } Should I maybe check in a different way than state.debug <> '' OR state.command <> '' whether either of these 2 properties is not empty? Thanks again!
I realize I misread your SQL statement. Now I can indeed see the behaviour. Regardless, it will be more semantic (and it will work) to use the IsUndefined() function:
WHERE IsUndefined(state.debug) = False OR IsUndefined(state.command) = False
. I hope this unblocks you.Hey Greg, thanks for you response. Indeed, isUndefined() seems to be exactly what I need! Out of curiosity, have you managed to identify why the OR operator behaves this way in my initial query?
Hi again. No I didn't. It's odd. I raised a ticket for it internally. Nonetheless, undefined is not necessarily an empty string, so the
IsUndefined
function is a better choice.