Skip to main content Skip to footer

Search Crosser Knowledge Base

Updated Key/Value Store Modules

In the previous versions of the Key/Value Store modules you could set/get and delete complex objects for a specific key in a Key/Value Store. What was not possible is to set/get or delete a specific part of such an object.

We have updated the Key/Value modules to allow users to access a specific property with a ‘path’ and perform specific actions such as set/get and delete only a specific property for a given key.

Beside that, template syntax is now supported on the ‘key’ and ‘path’ setting and warnings can be ignored if ‘key’ or ‘path’ were not found.

Example:

Store current state of machine in Key/Value Store from streaming ingest like OPC UA Subscription.

Crosser Flow Example - OPC UA Subscription

Key Value Set configuration:

Key = {data.machine}
Path = {data.name}
Value = data.value

Incoming message 1:

{
  "crosser": {
    "success": true
  },
  "data": {
    "machine": "blender_1",
    "name": "temp",
    "value": 17.7938298
  }
}

Incoming message 2:

{
  "crosser": {
    "success": true
  },
  "data": {
    "machine": "blender_1",
    "name": "pressure",
    "value": 0.99938298
  }
}

Incoming message 3:

{
  "crosser": {
    "success": true
  },
  "data": {
    "machine": "blender_1",
    "name": "speed",
    "value": 34.7938298
  }
}

Get all values for specific machine.

Key/Value Get configuration:

Key = {name}
Path = 

Result:

{
  "crosser": {
    "success": true
  },
  "data": {
    "pressure": 0.99938298,
    "speed": 34.7938298,
    "temp": 17.7938298
  },
  "name": "blender_1",
  "path": ""
}

Get specific value utilizing ‘path’

Key = {name}
Path = {path} 

Result:

{
  "crosser": {
    "success": true
  },
  "data": 17.7938298,
  "name": "blender_1",
  "path": "temp"
}

Tip: You can now also ignore module warnings in case the key and path is not found.

Crosser Example - Ignore Warnings

About the author

David Nienhaus | Senior Solution Engineer

David is a Senior Solution Engineer at Crosser. He has over 10 years experience working with software integration and digitization projects for critical infrastructure.
His engineering background gives him the understanding and focus needed to solve customer use cases in the most efficient and successful way.