The "testIntegrationTableTransformSteps" action causes the server to test new transform steps against an integration table to verify they behave as expected.
It runs the transform steps you include in this action against the structure and records in the specified integration table. It does not run the transform steps assigned to the integration table. Thus, it is safe to use this action on a table actively collecting data because it will not affect the table's transform steps and data.
You can verify the transform steps work on the first record, last record, or on one or more records with the specified IDs. This action returns the before and after values in the response so you can compare them and verify the transform steps work as expected.
You can also verify the transform steps work on all records of an integration table by causing this action to create a test table, copy all records to it, and run the transform steps on all records in the test table. Afterwards, you can use SQL or JSON DB queries on the test table to find problematic records.
Use the "testTransformScope" property (required) to define the scope of this action:
-
"allRecords"returns immediately after starting a background thread that creates a test table, copies all records to it, and runs the transform steps on all records in that table. -
"stop"immediately stops the background thread assigned to the test table. If there is no background thread, the action does nothing and returns an error. -
"firstRecord"returns the first record's fields before and after being modified by the transform steps. It runs synchronously and does not persist any changes. -
"lastRecord"returns the last record's fields before and after being modified by the transform steps. It runs synchronously and does not persist any changes. -
"specificRecords"returns the specified record's fields before and after being modified by the transform steps. It runs synchronously and does not persist any changes.
The "allRecords" scope has the following limitations:
- The server runs one
"allRecords"scope at a time. This applies to both the"rerunIntegrationTableTransformSteps"and"testIntegrationTableTransformSteps"actions. - While running transform steps on all records in an integration table, you cannot alter the structure of the table.
Request examples
Minimal example stops testing transform steps on all records
The following example stops a background thread that copies records to the myTable2 table and transforms them. It uses the database and owner specified in the current JSON action session (see "createSession" and "alterSession"). It returns an error if the background thread is not currently running on myTable2.
{
"action": "testIntegrationTableTransformSteps",
"params": {
"testTableName": "myTable2",
"testTransformScope": "stop"
},
"authToken": "replaceWithAuthTokenFromCreateSession"
}Example testing transform steps on specified records
The following example tests new transform steps on records 1 and 6 in myTable1. It returns the before and after image of each record without persisting any changes.
{
"api": "hub",
"action": "testIntegrationTableTransformSteps",
"params": {
"tableName": "myTable1",
"testTransformScope": "specificRecords",
"ids": [
1,
3
],
"transformSteps": [
{
"transformStepMethod": "javascript",
"codeName": "convertFahrenheitToCelsius"
}
]
},
"authToken": "replaceWithAuthTokenFromCreateSession"
}Example testing the transform steps on the last inserted record
The following example tests new transform steps on the most recently inserted record in myTable1. It returns the before and after image of the record without persisting the changes.
{
"api": "hub",
"action": "testIntegrationTableTransformSteps",
"params": {
"tableName": "myTable1",
"testTransformScope": "lastRecord",
"transformSteps": [
{
"transformStepMethod": "javascript",
"codeName": "convertFahrenheitToCelsius"
}
]
},
"authToken": "replaceWithAuthTokenFromCreateSession"
}Example testing the transform steps on the first inserted record
The following example tests new transformation steps on the earliest inserted record in myTable1 that has not been purged by the retention policy. It returns the before and after image of the record without persisting the changes.
{
"api": "hub",
"action": "testIntegrationTableTransformSteps",
"params": {
"tableName": "myTable1",
"testTransformScope": "firstRecord",
"transformSteps": [
{
"transformStepMethod": "javascript",
"codeName": "convertFahrenheitToCelsius"
}
]
},
"authToken": "replaceWithAuthTokenFromCreateSession"
}Example copying records to a test table and transforming them
The following example copies the records of myTable1 to myTable2 and runs the transform steps on all the records in myTable2. It uses fully qualified table names that specify the database and owner of each table.
{
"api": "hub",
"action": "testIntegrationTableTransformSteps",
"params": {
"databaseName": "myDb1",
"ownerName": "myOwner1",
"tableName": "myTable1",
"testDatabaseName": "myDb1",
"testOwnerName": "myOwner1",
"testTableName": "myTable2",
"testTransformScope": "allRecords",
"transformSteps": [
{
"transformStepMethod": "javascript",
"codeName": "convertFahrenheitToCelsius"
}
]
},
"authToken": "replaceWithAuthTokenFromCreateSession"
}
Response examples
Abbreviated response example for "testTransformScope": "allRecords"
To see the results of the action, you must query the test table created by this action.
{
"result": {
"testTransformScope": "allRecords",
"databaseName": "myDb1",
"ownerName": "myOwner1",
"tableName": "myTable1",
"testDatabaseName": "myDb1",
"testOwnerName": "myOwner1",
"testTableName": "myTable2"
},
"errorCode": 0,
"errorMessage": "",
"authToken": "replaceWithAuthTokenFromCreateSession"
}Abbreviated response example for "testTransformScope": "firstRecord"
{
"result": {
"testTransformScope": "firstRecord",
"databaseName": "myDb1",
"ownerName": "myOwner1",
"tableName": "myTable1",
"data":
[
{
"recordBeforeBeingTransformed":
{
"id": "1",
"changeId": "1291366",
"create_ts": "2025-06-24T17:39:03.412",
"source_payload": {
"t1": 21,
"t2": 54
},
"temperature": null
},
"recordAfterBeingTransformed":
{
"id": "1",
"changeId": "1291366",
"create_ts": "2025-06-24T17:39:03.412",
"source_payload": {
"t1": 21,
"t2": 54
},
"temperature": 21.54
}
}
]
},
"errorCode": 0,
"errorMessage": "",
"authToken": "replaceWithAuthTokenFromCreateSession"
}Abbreviated response example for "testTransformScope": "lastRecord"
{
"result": {
"testTransformScope": "lastRecord",
"databaseName": "myDb1",
"ownerName": "myOwner1",
"tableName": "myTable1",
"data":
[
{
"recordBeforeBeingTransformed":
{
"id": "948",
"changeId": "1291366",
"create_ts": "2025-06-24T17:39:03.412",
"source_payload": {
"t1": 23,
"t2": 7
},
"temperature": null
},
"recordAfterBeingTransformed":
{
"id": "948",
"changeId": "1291366",
"create_ts": "2025-06-24T17:39:03.412",
"source_payload": {
"t1": 23,
"t2": 7
},
"temperature": 23.7
}
}
]
},
"errorCode": 0,
"errorMessage": "",
"authToken": "replaceWithAuthTokenFromCreateSession"
}Abbreviated response example for "testTransformScope": "specifiedRecords"
{
"result": {
"testTransformScope": "specifiedRecords",
"databaseName": "myDb1",
"ownerName": "myOwner1",
"tableName": "myTable1",
"data":
[
{
"recordBeforeBeingTransformed":
{
"id": "1",
"changeId": "1291366",
"create_ts": "2025-06-24T17:39:03.412",
"source_payload": {
"t1": 21,
"t2": 54
},
"temperature": null
},
"recordAfterBeingTransformed":
{
"id": "1",
"changeId": "1291366",
"create_ts": "2025-06-24T17:39:03.412",
"source_payload": {
"t1": 21,
"t2": 54
},
"temperature": 21.54
}
},
{
"recordBeforeBeingTransformed":
{
"id": "3",
"changeId": "1291547",
"create_ts": "2025-06-24T17:40:41.002",
"source_payload": {
"t1": 21,
"t2": 61
},
"temperature": null
},
"recordAfterBeingTransformed":
{
"id": "3",
"changeId": "1291547",
"create_ts": "2025-06-24T17:40:41.002",
"source_payload": {
"t1": 21,
"t2": 61
},
"temperature": 21.61
}
}
]
},
"errorCode": 0,
"errorMessage": "",
"authToken": "replaceWithAuthTokenFromCreateSession"
}
Properties
Request properties ("params")
| Property | Description | Default | Type | Limits (inclusive) |
|---|---|---|---|---|
databaseName |
The You specify this property when you want to use a different database instead of the default. This property is useful because objects, such as tables and code packages, can have the same name in multiple databases. This feature allows you to create multiple environments in the same server and reuse the same JSON actions in each environment. For example, you can create It is an error to set If no default database is specified during |
Defaults to the session's "defaultDatabaseName" property |
string | 1 to 64 bytes |
ids |
The
|
Optional with default of Required when |
array | 0 or more ids |
ownerName |
The You specify this property when you want to use a different account instead of the default. Your session's account must have the appropriate privileges to access the code package. This property is useful because objects, such as tables and code packages, can have the same name in the same database as long as different accounts own each object. This feature allows you to create duplicate objects for different users on the same server and reuse the same JSON actions on those objects. For example, an administrator can copy objects from a production environment to her account so she can troubleshoot an issue using the same JSON actions, JavaScript, and SQL code. It is an error to set If no default owner is specified during |
Optional with default of the session's "defaultOwnerName" property |
string | 1 to 64 bytes |
tableName |
The See table name in System limits for the table naming requirements and limitations.
"params": {
"tableName": "ctreeTable"
} |
Required - No default value | string | 1 to 64 bytes |
testDatabaseName |
The For more information, see the
|
Optional with default of the "defaultDatabaseName" defined in the "createSession" action. |
string | 1 to 64 bytes |
testOwnerName |
The For more information, see the
|
Optional with default of the "defaultOwnerName" defined in the "createSession" action. |
string | 1 to 64 bytes |
testTableName |
The
|
Required - No default value | string | 1 to 64 bytes |
testTransformScope |
The |
Required - No default value | string enum |
|
transformSteps |
The "transformSteps" property specifies an array of transform objects. |
Required - No default value | array of objects |
0 or more objects containing 1 or more of the following properties:
|
|
transformSteps .codeName |
The It is an error to set The package's unique identifier is the combination of |
Required - No default value | string | 1 to 64 bytes |
|
transformSteps .transformStepMethod |
The "transformStepMethod" property 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. For more details, see "transformStepMethod". |
Required - No default value | string enum |
|
Response properties ("result")
| Property | Description | Type | Limits (inclusive) |
|---|---|---|---|
data |
The |
array of objects | The action determines its contents. |
|
data .recordBeforeBeingTransformed |
The |
object | 0 or more properties |
databaseName |
The
|
string | 1 to 64 bytes |
ownerName |
The "ownerName" property identifies the user who owns an object (see Object owner). |
string | 0 to 64 bytes |
tableName |
The See table name in System limits for the table naming requirements and limitations. |
string | 1 to 64 bytes |
testDatabaseName |
The When set to
|
string | 1 to 64 bytes |
testOwnerName |
The When set to
|
string | 1 to 64 bytes |
testTableName |
The
|
string | 1 to 64 bytes |
testTransformScope |
The "testTransformScope" property is the same value specified in the call to the "testIntegrationTableTransformSteps" to the action. |
string enum |
|