I've been at this for a few hours and can't figure it out. So I thought maybe someone here would have an idea.
I have JSON which is being published to a thing shadow(format of JSON being posted is not under my control). The JSON looks like this:
{"state":{"reported":{"0013A20011223344":{"input_1":1}}}}
I tried this query statement which would be used to send a publish to SNS:
SELECT "input closed" AS default FROM "$aws/things/Cell_Test_Thing/shadow/update" WHERE state.reported.0013A200418C5535.input_1 = 1
The problem is the SQL query does not like that key starting with a 0. I determined this by replacing 0013... with device here and it worked perfectly:
SELECT "input closed" AS default FROM "$aws/things/Cell_Test_Thing/shadow/update" WHERE state.reported.device.input_1 = 1
So the problem is that JSON key beginning with a number. If I change device to device0 it works but if you change it to 0device it fails. From what I can determine it is perfectly valid to start a JSON key with a number so hopefully there is a work around for this.
Ideas?