我正在使用JSON INPUT(Iot HUB)
{
"time": 1574266369775,
"latitude": 70.703271,
"longitude": 25.8445082,
"accuracy": 23.320999145507812,
"altitude": 498.8999938964844,
"id": "abs8d5c2ff74b5a5"
}
并希望将其存储在cosmosDb中的key
位置。
{
"updatedtime": 1574345877283,
"time": 1574347747884,
"status": "available",
"deviceId":"abs8d5c2ff74b5a5",
"location": {
"time": 1574266369775,
"latitude": 70.703271,
"longitude": 25.8445082,
"accuracy": 23.320999145507812,
"altitude": 498.8999938964844,
"id": "abs8d5c2ff74b5a5"
}
}
有可能吗?我可以将其存储到第一级,但是可以将其存储在任何文档的密钥中吗?
流分析与Azure Cosmos DB的集成允许您基于给定的文档ID列在容器中插入或更新记录。这也称为Upsert。
[Documentation还说它允许对文档进行部分更新,即,以增量方式执行新属性的添加或替换现有属性。
我的2美分:尝试将您的输出命名为'location',并确保在写入ASA作业的cosmos db输出时具有相同的文档ID。