Hi @Roman Kiss & @LeelaRajeshSayana-MSFT
Just to give you more information, here is the JSON file I am pulling data from:
{
"event": "53a87e2f-e0f6-4864-b9aa-03496e751338",
"session": "e4007c39-b60e-4ff0-abdf-54c4bf83ab3b",
"best_id": "testingNoteecard",
"device": "dev:xxxxxxxxx",
"product": "product:com.blues.dcaudillo:xxxxxxxxxx",
"app": "app:e616e8c0-2c5af",
"when": 1640129719,
"file": "sensors.qo",
"body": {
"humidity": 47.085200000000007,
"temp": 25.875
},
"best_location_type": "gps",
"best_lat": 30.6270025,
"best_lon": -96.38035546875,
"best_location": "College Station TX",
"best_country": "US",
"best_timezone": "America/Chicago"
}
I am routing the data using this JSONata Expression:
{
"device": {
"deviceId": device
},
"measurements": {
"temp": body.temp,
"humidity": body.humidity
},
"location": {
"lat": best_lat,
"lon": best_lon,
"alt":0
},
"timestamp": $fromMillis(when * 1000)
}
The only raw data pulled from this expression in Azure is the Device ID, Measurements, and Timestamp. The location data is not in the unmodeled data
at all.
Screenshot 2023-07-10 at 2.43.11 PM.png
It appears the Location property is completely skipped over once the data is routed to Azure. I tested the route on my end with this curl request and the values should be appearing like they are here:
curl -X 'POST' -d '{"device":{"deviceId":"dev:xxxxxxxxx"},"location":{"alt":0,"lat":30.6270025,"lon":-96.38035546875},"measurements":{"humidity":47.08520000000001,"temp":25.875},"timestamp":"2021-12-21T23:35:19.000Z"}' -H 'Content-Type: application/json' -H 'User-Agent: notes' 'https://iotc-fnb67yx2woajmsq.azurewebsites.net/api/IoTCIntegration?code=uu5HQeO5Kz21UcYOfA44_eDwQcTSd0LvMR2dfldxQewcAzFu3SKSEQ=='