Skip to main content

"copyIntegrationTableTransformSteps"

Replace a target table's transform steps

The "copyIntegrationTableTransformSteps" action causes the server to replace the target table's transform steps with the source table's steps. 

The response contains a full description of the updated target integration table. It also includes a "previousTransformSteps" property that contains the previous value of the target integration table's transform steps.

Request examples

Minimal

The following example replaces the transform steps assigned to "myTable2" with those from "myTable1". It uses the database and owner specified in the current JSON action session (see "createSession" and "alterSession".

{
  "api": "hub",
  "action": "copyIntegrationTableTransformSteps",
  "params": {
    "tableName": "myTable1",
    "targetTableName": "myTable2"
  },
  "authToken": "replaceWithAuthTokenFromCreateSession"
}

The following example replaces the transform steps assigned to "myTable2" with those from "myTable1". It uses fully qualified table names that specify the database and owner of each table.

{
  "api": "hub",
  "action": "copyIntegrationTableTransformSteps",
  "params": {
    "databaseName": "myDb1",
    "ownerName": "myOwner1",
    "tableName": "my_source_table",


    "targetDatabaseName": "myDb1",
    "targetOwnerName": "myOwner1",
    "targetTableName": "my_target_table2"
  },
  "authToken": "replaceWithAuthTokenFromCreateSession"
}
Table 1. copyIntegrationTableTransformSteps "params" property summaries

Property

Description

Default

Type

Limits (inclusive)

databaseName

(optional) specifies the name of a database.

Defaults to the "defaultDatabaseName" value that is set during "createSession". If no default is set during "createSession", then "faircom" is used.

string

1 to 64 bytes

ownerName

(optional) specifies the account that owns an object.

Defaults to the account that created the JSON Action session.

string

1 to 64 bytes

tableName

(optional) specifies the name of a table.

""

string

1 to 64 bytes

targetDatabaseName

specifies the name of the database that contains the target table.

""

string

1 to 64 bytes

targetOwnerName

specifies the name of the account that owns the target table.

""

string

1 to 64 bytes

targetTableName

specifies the name of the target table.

""

string

1 to 64 bytes



The optional "databaseName" property specifies the database of the source table that this action uses to copy the transform steps from the source table and replace the steps in the target table. 

When set to null or omitted, the server uses the default "databaseName" defined in the "createSession" action. For more information, see the "createSession" action and the "defaultDatabaseName" property.

Note

The fully qualified name of a table includes the database, owner, and table names.

The optional "ownerName" property specifies the owner account of the source table that this action uses to copy the transform steps from the source table and replace the steps in the target table. 

When set to null or omitted, the server uses the default "ownerName" defined in the "createSession" action. For more information, see the "createSession" action and the "defaultOwnerName" property.

Note

The fully qualified name of a table includes the database, owner, and table names.

The required "tableName" property specifies the name of the source table that this action uses to copy the transform steps from the source table and replace the steps in the target table.

Note

The fully qualified name of a table includes the database, owner, and table names.

The optional "targetDatabaseName" property specifies the database of the target table that has its transform steps replaced by this action. 

When set to null or omitted, the server uses the default "databaseName" defined in the "createSession" action. For more information, see the "createSession" action and the "defaultDatabaseName" property.

Note

The fully qualified name of a table includes the database, owner, and table names.

The optional "targetOwnerName" property specifies the owner account of the target table that has its transform steps replaced by this action. 

When set to null or omitted, the server uses the default "ownerName" defined in the "createSession" action. For more information, see the "createSession" action and the "defaultOwnerName" property.

Note

The fully qualified name of a table includes the database, owner, and table names.

The required "targetTableName" property specifies the name of the target table that has its transform steps replaced by this action.

Note

The fully qualified name of a table includes the database, owner, and table names.

Table 2. copyIntegrationTableTransformSteps "result" property summaries

Property

Description

Type

Contents

codeName

specifies the name of a code package that runs when a record is inserted into an integration table.

string

1 to 64 bytes

databaseName

specifies the name of a database.

string

1 to 64 bytes

metadata

contains user-defined properties that add keywords and tags about the code package.

object

0 or more key/value pairs

ownerName

specifies the account that owns an object.

string

1 to 64 bytes

previousTransformSteps

is a JSON array that contains the transform step objects assigned to the integration table before they were replaced by the "copyIntegrationTableTransformSteps" action.

array

the transform step objects of the specified transform before they were replaced by the action.

transformStepMethod

specifies the transform method the step will use.

string enum

"javascript"
"jsonToDifferentTableFields"
"jsonToTableFields"
"tableFieldsToJson"

transformStepName

specifies the name that will be assigned to each transform step.

string

1 to 64 bytes

transformSteps

specifies an array of transform objects.

array of objects

0 or more objects

transformStepService

specifies the name of a transform service, which is the user-defined name for a library (.dll, .so, .dylib) that implements the transform step method.

string

1 to 64 bytes



The "codeName" property is a required, case-sensitive string between 1 and 64 bytes containing the user-defined name for the code package.

It is an error to set "codeName" to the empty string "".

The package's unique identifier is the combination of "databaseName", "ownerName", and "codeName". See the "databaseName" and "ownerName" properties for more information.

The optional "databaseName" property specifies the database of the source table that this action uses to copy the transform steps from the source table and replace the steps in the target table. 

When set to null or omitted, the server uses the default "databaseName" defined in the "createSession" action. For more information, see the "createSession" action and the "defaultDatabaseName" property.

Note

The fully qualified name of a table includes the database, owner, and table names.

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 optional "ownerName" property specifies the owner account of the source table that this action uses to copy the transform steps from the source table and replace the steps in the target table. 

When set to null or omitted, the server uses the default "ownerName" defined in the "createSession" action. For more information, see the "createSession" action and the "defaultOwnerName" property.

Note

The fully qualified name of a table includes the database, owner, and table names.

The "previousTransformSteps" property is a JSON array that contains the transform step objects assigned to the integration table before they were replaced by the "copyIntegrationTableTransformSteps" action.

{
  "result": {


    "transformSteps": [
      {
        "transformStepName": "step1",
        "transformStepMethod": "javascript",
        "transformStepService": "v8TransformService",
        "codeName": "convertToFahrenheit",
        "ownerName": "admin",
        "databaseName": "faircom",
        "metadata": {
        }
      }
    ],


    "previousTransformSteps": [
      {
        "transformStepName": "step1",
        "transformStepMethod": "javascript",
        "transformStepService": "v8TransformService",
        "codeName": "convertToFahrenheit",
        "ownerName": "admin",
        "databaseName": "faircom",
        "metadata": {
        }
      }
    ]


  },
  "errorCode": 0,
  "errorMessage": "",
  "authToken": "replaceWithAuthTokenFromCreateSession"
}

The "transformStepMethod" property is a required string that specifies the type of transform, such as the "javascript" transform method that runs JavaScript to change the table's data or the "jsonToTableFields" transform method that extracts values from properties in a JSON field and stores them in other fields.

Note

The "transformStepMethod" property replaces the deprecated "transformActionName" property.

The value of the "transformStepMethod" affects the value of the "transformService" property. The following table defines the possible values of the "transformService" property when combined with the "transformStepMethod". Notice that some transform step methods are built into the server and do not require you to specify the "transformService".

"transformStepMethod" value

"transformService" value

"jsonToTableFields"

null or omitted

"tableFieldsToJson"

null or omitted

"jsonToDifferentTableFields"

null or omitted

"javascript"

"v8TransformService"

"siemensUdtPayloadToJson"

"siemensUdtPayloadToJson"

Note

If the "transformStepMethod" property is set to "javascript", the "transformService" property must be set to "v8TransformService".

The "transformStepName" property is an optional string that assigns a name to each transform step.

The "transformSteps" property is an array of transform step objects. 

Different actions interpret "transformSteps": [] differently.

  • In the "alterIntegrationTable" action, "transformSteps" is optional. Setting it to [] removes transform steps from the integration table.

  • In the "createIntegrationTable" action, "transformSteps" is optional. Setting it to [] is the same as setting it to null or omitting it.

  • In the "testIntegrationTableTransformSteps" actions, "transformSteps" is required; thus, omitting it or setting it to [] or null is an error.

Each transform step object contains the required "transformStepMethod" property. It also supports the following optional properties:

  • "transformStepName"

  • "transformStepService"

Each transform step method also supports unique properties that are defined below.

"transformStepMethod": "javascript"

  • Required properties

    • "codeName"

  • Optional properties

    • "ownerName"

    • "databaseName"

"transformStepMethod": "tableFieldsToJson"

  • Required properties

    • "mapOfPropertiesToFields"

"transformStepMethod": "jsonToTableFields"

  • Required properties

    • "mapOfPropertiesToFields"

"transformStepMethod": "jsonToDifferentTableFields"

  • Required properties

    • "mapOfPropertiesToFields"

    • "targetTableName"

  • Optional properties

    • "targetOwnerName"

    • "targetDatabaseName"

The "transformStepService" property is an optional string that specifies the name of a transform service, which is the user-defined name for a library (.dll, .so, .dylib) that implements the transform step method.

This property allows you to register your own transform libraries or use an older version of a FairCom library for backward compatibility.

Transform services are defined in the services.json file under the "transformServices" section. You can add and remove transform libraries to this list, such as your own transform libraries or specific versions of FairCom's transform libraries. Use the "serviceName" property to give each transform library a unique transform service name and use the "serviceLibrary" property to specify the filename of the library that implements the transform step method. On Windows the library filename ends with .dll. On Linux it ends with .so. On MacOS it ends with .dylib. Lastly, you must enable the transform service by setting "enabled" to true.

Example "transformServices" section in the services.json file.

"transformServices": [
  {
    "serviceName": "v8TransformService",
    "serviceLibrary": "v8transformservice.dll",
    "enabled": true
  }
],

Note

If the "transformStepMethod" property is set to "javascript", the "transformStepService" property must be set to "v8TransformService" or to a user-defined transform service name associated with the "v8transformservice.dll" service library.