"alterTransform"
The JSON Hub API "alterTransform"
action modifies a transform in FairCom MQ and FairCom Edge
The "alterTransform"
action alters, changes, modifies, updates, or configures an existing transform in FairCom Edge and FairCom MQ. A transform is a process that transforms incoming data before it is inserted as a record in an integration table.
The "alterTransform"
action alters an existing transform in FairCom Edge and FairCom MQ. A transform is a process that transforms incoming data before it is inserted as a record in an integration table. Before you can change a transform, you must first create it using "createTransform"
.
Request examples
Minimal request example
{ "api": "hub", "apiVersion": "1.0", "requestId": "00000022", "authToken": "anAuthorizationTokenFromTheServer ", "action": "alterTransform", "params": { "transformName": "opc_transform2", "newTransformName": "opc_transform8", "transformActions": [] } }
{ "api": "hub", "apiVersion": "1.0", "requestId": "00000016", "authToken": "anAuthorizationTokenFromTheServer ", "action": "alterTransform", "params": { "transformName": "transform_opc2", "newTransformName": "transform_opc5", "transformActions": [ { "inputFields": [ "source_payload" ], "transformActionName": "jsonToTableFields", "transformParams": { "targetDatabaseName": "ctreeSQL", "targetTableName": "opc_sensor2", "mapOfPropertiesToFields": [ { "propertyPath": "temperature", "name": "temperature", "type": "REAL" }, { "propertyPath": "humidity", "name": "humidity", "type": "REAL" }, { "propertyPath": "pressure", "name": "pressure", "type": "REAL" }, { "propertyPath": "quality", "name": "quality", "type": "REAL" } ] } } ] } }
Response examples
{ "result": {}, "requestId": "00000022", "errorCode": 0, "errorMessage": "" }
{ "result": {}, "requestId": "00000016", "errorCode": 0, "errorMessage": "" }
"params"
The "params"
property is an object that contains an action's parameters. Each action defines its own required and optional properties.
Property summary
"params"
property summariesProperty | Description | Default | Type | Limits (inclusive) | ||
---|---|---|---|---|---|---|
exists primarily for the user interface to find integration information |
| object | May contain any number and type of user-defined properties | |||
| contains the name of a transform NoteCannot be one of the FairCom-provided transform names. |
| string |
| ||
contains |
| array | ||||
| contains the name of a transform process NoteCannot be one of the FairCom-provided transform names. |
| string |
|
The "metadata"
property is an optional JSON object. It exists primarily for the user interface to find integration information. By default, it is an empty JSON object.
It contains a flexible set of properties.
It typically contains tags and description properties.
Example
{ "description": "", "tags": [""], "yourOwnProperties": "usage, purpose, notes, location, etc.", }
The "transformActions"
property is an optional array of "transformAction"
objects. It defaults to an empty array.
"transformAction"
property summariesProperty | Description | Default | Type | Limits (inclusive) | ||
---|---|---|---|---|---|---|
contains one or more of the fields in the integration table where the value of each of these fields is sent to the transform action as its primary input | Required - No default value | array | ||||
contains one element which is the name of the field that will receive the JSON generated by the transform | Required - No default value | array | ||||
| Contains the name of the transform action. For example — "siemensUdtPayloadToJSON", "jsonPropertiesToTableFields", "tableFieldsToJson", "jsonToDifferentTableFields" | Required - No default value | string |
| ||
contains a unique set of parameters that configure its transformation process NoteIt may be an empty object or contain one or more properties needed by the | Required - No default value | object |
| |||
| specifies the service that contains the transform |
| string | Any previously defined name of a transform service. |