Product Documentation

MQTT V3 Plug-in Reference

Previous Topic

Next Topic

"propertyPath"

  • String
  • Required

Property Path (the "path" or location in the file to find the "property" that will be persisted) is currently supported for JSON as follows:

  • The path for a property at the root of the document is the property name, such as "myPropertyName", and must match the incoming JSON property.
  • The path for a property nested within objects are property names separated by periods, such as "toplevelObject.childObject.grandchildObject"
  • The path for an array of properties are enclosed in square brackets [], such as: "propertyPath": "person.names[0].firstName",
  • FairCom Edge takes the value of this property in incoming messages and stores it in the field defined by the "fieldName" property.
  • XML support is currently being considered. If you have interest in XML support, please let us know.

For example:

{

"operation": "CreatePersistenceTopic",

"persistenceTopic": "Test41Topic",

"tableName": "Test41Table",

"mapOfPropertiesToFields":

[

{

"propertyPath": "person.address[0].street",

"fieldName": "firstStreet",

"fieldType": "VARCHAR"

},

{

"propertyPath": "person.address[last].street",

"fieldName": "mostRecentStreet",

"fieldType": "VARCHAR"

},

{

"propertyPath": "person.address[0].city",

"fieldName": "firstCity",

"fieldType": "VARCHAR"

},

{

"propertyPath": "person.address[last-1].zip",

"fieldName": "penultimatePostalCode",

"fieldType": "VARCHAR"

}

]

}

Sample queries using the JSON format above:

"SELECT COUNT(*) FROM Test41Table WHERE firstCity = 'Toronto'"

"SELECT COUNT(*) FROM Test41Table WHERE firstStreet = '2112 Syrinx Ave.'"

"SELECT COUNT(*) FROM Test41Table WHERE mostRecentStreet = '2012 Clockwork Crossing'"

TOCIndex