RTETransformer - Scoped
-
- UpdatedFeb 1, 2024
- 3 minutes to read
- Washington DC
- API reference
The RTETransformer API provides a method to transform and store an array of messages into a record in the associated ServiceNow instance based on a provided extract, transform, and load (ETL) definition.
For example, use this API when you have JSON payload(s) that contain user information and you want to transform that information into the sys_user table using the Robust Transform Engine (RTE).
Use the sn_impex
namespace when accessing this API.
For additional information, see Define Robust Transform Engine operations.
RTETransformer - RTETransformer(String transformDefinitionId, Boolean verboseLogging, String source, Number batchSize)
Instantiates an RTETransformer object.
Example
The following code example shows how to instantiate an RTETransformer object for the source testSourceRecord that has a batch size of 10.
RTETransformer - transform(Array message)
Transforms and stores an array of messages into a record in the associated ServiceNow instance based on a provided extract, transform, and load (ETL) definition.
For example, if you want to transform user information into a sys_user record, you can create a message array with a single message and pass it into this transform method.
Name | Type | Description |
---|---|---|
message | Array of Objects | Stringified JSON objects representing the records to transform based on the ETL
definition. For example, if you want to transform a single user with the data
active, email, first name, and last name to the sys_user table, the message would
look similar to this:
Note: The field names must match the field/path of the source entity
fields. |
Example
The following code example shows how to transform and store a record in the User [sys_user] table.
Results: