Skip to main content

How to Add Data Sources

Once the data model is built under Namespace, you need to connect real data to the model for subsequent processing and use.

Adding Data Flow Manually

  1. Log in to Tier0, go to UNS > Source Flow.
IndexItemDescription
1SearchSearch for existing data flows.
New Source FlowAdd a data flow.
2Flow ListDisplays flow information. Click the flow name to start editing the data flow.
3DisplaySwitch flow display between blocks and list.
4Flow OperationsCopy / Edit / Delete the data flow.
  1. Click New Source Flow, enter a name and click Save.
  2. Click the flow you just added, and drag in nodes according to your data source type (e.g.modbus).
  3. Drag in an mqtt out node, and finish its configurations.
    1. Add the internal broker via emqx:1883.

    2. Set its subscription topic to the data model in Namespace.

      For example, the data model structure is factory/equipment/cnc, the topic will be factory/equipment/cnc.

  1. Click Deploy at the upper-right corner, trigger the flow and the data will be sent to corresponding model under Namespace.

Configuring Data Source through Generated Flow

note

Data flow will only be automatically generated when you select Mock Data while creating topics.

  1. Log in to Tier0, landed on the Namespace page, and under the Topic tab, select a file.
  2. Scroll down to Topology Map, click the icon on Source Flow to redirect to the generated data flow under Source Flow.
  1. Change the data source of the generated flow.
info

Make sure the returned data of the source node is JSON object. Currently, Tier0 can only parse this data type.

  1. Delete the mock data function node and connect the source node to the rest of the flow.
  1. Click Deploy at the upper-right corner, and then trigger the flow.
  2. Go back to Namespace, check whether the data is received.