"alterTransform"
JSON transform "alterTransform"
action modifies a transform in FairCom MQ and FairCom Edge
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
{ "api": "transform", "apiVersion": "1.0", "requestId": "00000022", "authToken": "anAuthorizationTokenFromTheServer ", "action": "alterTransform", "params": { "transformName": "opc_transform2", "newTransformName": "opc_transform8", "transformActions": [] } }
{ "api": "transform", "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" } ] } } ] } }
{ "result": {}, "requestId": "00000022", "errorCode": 0, "errorMessage": "" }
{ "result": {}, "requestId": "00000016", "errorCode": 0, "errorMessage": "" }
Use the alterTransform JSON API action to alter a transform in FairCom Edge and MQ
The "params"
property is an object that contains an action's parameters. Each action defines its own required and optional properties.
Properties summary
"params"
properties summaryProperty | 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 | ||||||
newTransformName | specifies the name of a transform. The name cannot be one of the FairCom-provided transform names |
| string | 0 to 256 bytes | |||||
specifies |
| array of objects | |||||||
| specifies 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 | ||||||
| specifies one element which is the name of the field that will receive the JSON generated by the transform | Required - No default value | array | ||||||
| specifies the name of the transform action. For example -- "siemensUdtPayloadToJSON", "jsonToTableFields", "tableFieldsToJson", "jsonToDifferentTableFields" | Required - No default value | string | 1 to 64 bytes | |||||
| specifies a unique set of parameters that configure its transformation process. It may be an empty object or contain one or more properties needed by the | Required - No default value | object | 0 to 65,500 bytes | |||||
| contains | [] | array | ||||||
| specifies the name of a field | Required - No default value | string | 1 to 64 bytes
| |||||
| specifies the path in the JSON document where the property is located |
| string | 0 to 256 bytes
| |||||
| specifies the JSON type of the property | Required - No default value | string | see Data types | |||||
| specifies the name of data type that is the schema root | Required - No default value | string | ||||||
| adds new fields to the table and specifies their properties | Required - No default value | array of objects | ||||||
| specifies the name of the database where the table will be created |
| string | ||||||
| specifies the name of the table where the c-tree will store the data that it extracts for incoming data messages | Defaults to the topic name with underscores removed | string | ||||||
| checks for any inconsistencies when |
| Boolean |
| |||||
| specifies the service that contains the transform |
| string | Any previously defined name of a transform service | |||||
specifies the name of a transform process. The name cannot be one of the FairCom-provided transform names |
| string | 1 to 64 bytes |
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.
The "transformName"
property is an optional string that contains the unique name of a transform process, which consists of one or more transform steps.
A transform is a process that works like a pipeline where the output of one transformation can become the input for another transformation.
The following actions use the
"transformName"
property to assign a transform to an integration table:"configureTopic"
"createInput"
"alterInput"
"alterIntegrationTable"