0

I have an application that is pushing data into IoT Hub which is being used as a data source for TSI. Below is an example message:

{
    "EnqueuedTimeUtc": "2021-06-17T22:00:47.2170000Z",
    "Properties": {},
    "SystemProperties": {
        "connectionDeviceId": "Device1",
        "connectionAuthMethod": "{\"scope\":\"device\",\"type\":\"sas\",\"issuer\":\"iothub\",\"acceptingIpFilterRule\":null}",
        "connectionDeviceGenerationId": "637425408342887985",
        "contentType": "application/json",
        "contentEncoding": "utf-8",
        "enqueuedTime": "2021-06-17T22:00:47.2170000Z"
    },
    "Body": {
        "topic": {
            "namespace": "spBv1.0",
            "edgeNodeDescriptor": "Routed Group/E2",
            "groupId": "Routed Group",
            "edgeNodeId": "E2",
            "deviceId": "D2",
            "type": "DBIRTH"
        },
        "payload": {
            "timestamp": "2021-06-17T22:00:47.082Z",
            "metrics": [{
                "name": "Ramp1",
                "timestamp": "2021-06-17T22:00:47.082Z",
                "dataType": "Int32",
                "metaData": {},
                "properties": {
                    "Quality": {
                        "type": "Int32",
                        "value": 192
                    },
                    "My Property": {
                        "type": "String",
                        "value": "{\"\":\"\"}"
                    }
                },
                "value": 77
            }],
            "seq": 1
        }
    }
}

I found documentation showing that my array of 'metrics' is supported as shown here: https://learn.microsoft.com/en-us/azure/time-series-insights/concepts-json-flattening-escaping-rules

With this message, I can see 'Ramp1' show up in TSI with a value and timestamp as expected. However, the 'properties' under each metric do not show up. In this example that is 'Quality' and 'My Property'. Is there a way to get this data into TSI with an association to 'Ramp1'?

Wes
  • 1
  • What is your Environment Time Series ID and Event source timestamp ? – asergaz Jul 06 '21 at 15:37
  • The Time Series ID is: topic.edgeNodeDescriptor, topic.deviceId, payload.metrics.name I've tried a few things for the 'Timestamp property name' which is what I think you're referring to. I've tried leaving it blank and also payload.metrics.timestamp. It doesn't seem to make a difference with regard to the properties though. – Wes Jul 07 '21 at 21:53

0 Answers0