Namespace
A namespace organizes sources of data into a logical hierarchy. A common use of namespaces is to organize an ISA-95 hierarchy of sites, areas, and lines and then populate this with modeled data like motors, machines, and other assets.
Once a namespace is built the Smart Query Stage in pipelines is used to query the namespace, either in logical parts or as a whole. For example, a smart query can read all the motors in the namespace and publish the data to MQTT using the namespace hierarchy as the topic path.
Creating a namespace
- Navigate to Namespaces
- Click Namespaces in the configuration’s Main Menu to open up the namespace
- There is only one namespace but the namespace can have multiple root nodes
- Add Namespace Nodes
- Click the + icon at the top of the tree.
- Enter the name of the node in the tree and hit Enter to add the node.
- Continue to add and name nodes, either at the root of the tree or by building hierarchy
- Note: that nodes are saved as they are added
- Add a source of data to the namespace (Currently Inputs, Instances, and Callable Pipelines are supported)
- Drag and Drop - Sources can be dragged from the reference panel on the right
- Drag a source on to the
Drop Reference
area of an existing node to update it’s source - Drag a source in to the tree to create a new node with that source at that position
- Drag a source on to the
- Drag and Drop - Sources can be dragged from the reference panel on the right
- Reorder the namespace
- Nodes can be reordered within the namespace by dragging the node to a new position
Passing Parameters
Namespace nodes can take parameters to pass to Inputs, Instances, or Pipelines. This way a common source can be used multiple times in the Namespace, and produce a different result. If a source accepts parameters, they are shown in the configuration and can be manually set.
You may see a warning to migrate 4.1 and older parameter syntax to this new format. If so, refer to Migrating Namespace Node Parameters
Test reading a namespace
To test read the namespace, select the Read Node at the bottom. This reads the full namespace and returns the result as JSON.
Importing a Namespace
To quickly build a namespace, select the Import
icon above the Namespace tree. Supported import formats include CSV and JSON. Merge makes the import additive, and Replace deletes the existing
namespace and replaces it with the imported one.
Note imports do not support linking sources to a node. If Merge is used, and the node already exists, the reference/source configuration is left as is.
CSV Example
path
site1/area1/line1
site/area1/line2
JSON Format
[
{
"path": "site1/area1/line1"
},
{
"path": "site1/area1/line2"
}
]
Smart Query
Smart queries allow you to dynamically query the namespace to read only the data you need. See the Smart Query Stage for details on the smart query stage.