@hypericon/node-red-hypertable
Version:
Node-RED plugin to interact with Hypertable
237 lines • 6.13 kB
JSON
[
{
"id": "d0b997c080e97211",
"type": "tab",
"label": "Update Record Example",
"disabled": false,
"info": "",
"env": []
},
{
"id": "4444fe72fca155a3",
"type": "comment",
"z": "d0b997c080e97211",
"name": "1. Create the Hypertable Project",
"info": "\nFirst create your Project in Hypertable so that Node-RED has a target for the request.\n",
"x": 230,
"y": 100,
"wires": []
},
{
"id": "56ae9e3913bd9b86",
"type": "comment",
"z": "d0b997c080e97211",
"name": "2. Create an API Key in Hypertable",
"info": "\nIn your Hypertable Project, create a new API key in the Project's settings.\n\nChoose an appropriate role for the key. For this example, the role must be at least \"editor\".\n",
"x": 240,
"y": 140,
"wires": []
},
{
"id": "b31d3f0464cf0e82",
"type": "comment",
"z": "d0b997c080e97211",
"name": "3. Configure the connection config node",
"info": "\nIn one of the \"read connection\" nodes, create a new \"hypertable connection\" config node. Complete the properties for this node from your Hypertable Project.\n",
"x": 250,
"y": 180,
"wires": []
},
{
"id": "b401ccb8631a4005",
"type": "comment",
"z": "d0b997c080e97211",
"name": "4. Enter the IDs in the node/msg",
"info": "\nEnter the IDs of both the target Hypertable Collection and Record.\n\nSet these in the properties of the `update-record` node in the first example, and set the values of `msg.collectionId` and `msg.recordId` in the change node in the second example.\n\nAlso specify the new values for any number of record field values in the target record.\n",
"x": 230,
"y": 220,
"wires": []
},
{
"id": "661468a15a6d755d",
"type": "inject",
"z": "d0b997c080e97211",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 160,
"y": 360,
"wires": [
[
"2560ab2ee4a0b5fe"
]
]
},
{
"id": "3089debc6dc74f6e",
"type": "debug",
"z": "d0b997c080e97211",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "record",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 730,
"y": 360,
"wires": []
},
{
"id": "36474fb5ead5f5ba",
"type": "inject",
"z": "d0b997c080e97211",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 160,
"y": 500,
"wires": [
[
"a32fbba081eded04"
]
]
},
{
"id": "03ab4e3223fd3bd3",
"type": "debug",
"z": "d0b997c080e97211",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "record",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 730,
"y": 560,
"wires": []
},
{
"id": "311b992e1de0297d",
"type": "comment",
"z": "d0b997c080e97211",
"name": "Set IDs in node",
"info": "",
"x": 180,
"y": 320,
"wires": []
},
{
"id": "44ee1e8abfd90162",
"type": "comment",
"z": "d0b997c080e97211",
"name": "Set IDs in msg",
"info": "",
"x": 180,
"y": 460,
"wires": []
},
{
"id": "a32fbba081eded04",
"type": "change",
"z": "d0b997c080e97211",
"name": "*Set Collection & Record IDs*",
"rules": [
{
"t": "set",
"p": "collectionId",
"pt": "msg",
"to": "",
"tot": "str"
},
{
"t": "set",
"p": "recordValues",
"pt": "msg",
"to": "{}",
"tot": "json"
},
{
"t": "set",
"p": "recordValues",
"pt": "msg",
"to": "{\"name\":\"Updated from Node-RED\"}",
"tot": "json"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 450,
"y": 500,
"wires": [
[
"b62b95791cbda9c3"
]
]
},
{
"id": "b62b95791cbda9c3",
"type": "update-record",
"z": "d0b997c080e97211",
"name": "",
"connection": "",
"collectionId": "",
"recordId": "",
"recordValues": "{}",
"x": 400,
"y": 560,
"wires": [
[
"03ab4e3223fd3bd3"
]
]
},
{
"id": "2560ab2ee4a0b5fe",
"type": "update-record",
"z": "d0b997c080e97211",
"name": "*Set Collection & Record IDs*",
"connection": "",
"collectionId": "",
"recordId": "",
"recordValues": "{\"name\":\"Updated from Node-RED\"}",
"x": 450,
"y": 360,
"wires": [
[
"3089debc6dc74f6e"
]
]
}
]