Combine Node

      Combine Node


        Article summary

        Combine Node

        The combine node takes data from multiple incoming JSON payloads and combines them into one JSON object. The combined JSON will contain all the unique JSON keys that the node has received. There are various options for configuring the output.

        Adding a Combine node to your workflow

        1. First, select your desired solution and navigate to Rayven Workflow.
        2. Select ‘Functions’ from the left-hand panel.
        3. Find the Combine node and drag it onto the canvas.
        4. Connect the Combine node to your desired input node.
        5. Double click on the Combine node to open its configuration window.

         


        Configuring your Combine node

        1. Give your node a Name. It’s best to choose something simple that clearly explains the node’s purpose. You must pick a name that has three or more characters.
        2. 'Hold Data From' can be used to retain data in the Combine node. To configure, enter the comma-separated Node IDs for the data you want to use. You'll need to connect these nodes as an input to your Combine node. The Combine node will hold data from listed Node IDs until data from another node is received.
        3. Select 'Keep adding data' if you want the data received from each input to be stored and added to each JSON payload that passes through. Note that a new value for the same JSON key will overwrite the previously held value. 
        4.  You then need to select a method for combining payloads. Select from the dropdown options:
          • 'Combine Latest Received': combines JSON key-value pairs into a single JSON. The JSON values will always be the latest value for each device.
          • 'Combine with Same Timestamp': combines JSON key-value pairs into a single JSON where all key-value pairs have the same timestamp.
        5. Set the node's behavior if an error takes place: 
          • Continue - Add Error to JSON: The error will appear in the JSON payload.
          • Continue - Ignore Error: The error will not appear in the JSON payload.
          • Stop - Log Error: The calculation and data flow will pause, and the node will flag the error.

        NOTE: You need to use different field names in your combined JSON. In the event of duplicate field names, the latest value received will override the previous value.