AnsweredAssumed Answered

do the connector relay and Pi-Server  support the nullable type?

Question asked by SSimonelli on Feb 12, 2020
Latest reply on Feb 12, 2020 by sdriscoll

I'm using: 

PI Data Collection Manager

Version: 2.2.22.1350

 

The OMF spec:  https://omf-docs.osisoft.com/en/v1.1/Type_Properties_and_Formats.html 

shows the support of:

"Nullable DateTime": {"type": ["null", "string"], "format": "date-time"}

I tried using and OMF message:

curl -v -k -s -S -i -X POST https://WIN-4M7ODKB0RH2:5460/ingress/messages \
-H "producertoken: uid=5ced49c3-3a55-40e7-983f-c6cdcd5c5fd1&crt=20180620084136279&sig=GaWXZ1I4Toje3Ly9Z6/wGZ+eC6bC0Njd9bFpv3Un4QI=" \
-H "action: create" \
-H "messageformat: json" \
-H "omfversion: 1.1" \
-H "messagetype: Type" \
-d @- << EOF
[
{
"type": "object",
"properties": {
"Location": {
"type": "string"
},
"Company": {
"type": "string"
},
"Name": {
"type": "string",
"isindex": true
}
},
"classification": "static",
"id": "1_fogbench_accelerometer_typename_sensor"
},
{
"type": "object",
"properties": {
"x": {
"type": ["number", "null"],
"format": "float64"
},
"y": {
"type": ["number", "null"],
"format": "float64"
},
"Time": {
"type": "string",
"isindex": true,
"format": "date-time"
}
},
"classification": "dynamic",
"id": "1_fogbench_accelerometer_typename_measurement"
}
]
EOF

 

 

 

 

 

but I have got":

 

HTTP/1.1 400 Bad Request
Content-Length: 147
Content-Type: application/json; charset=utf-8
Server: Microsoft-HTTPAPI/2.0
Date: Wed, 12 Feb 2020 14:57:39 GMT

{"code":7,"message":"Invalid message headers.","source":"omfversion","description":"Header omfversion has invalid value: 1.1. Expected value: 1.0"}
Process finished with exit code 0

 

 

Outcomes