Trim
Overview
Use the trim transform to trim whitespaces from both the beginning and ending of input strings.
Transform structure
The trim transform only requires the transform's type and name attributes:
{
"type": "trim",
"name": "Trim Transform"
}
Top-level properties (required)
-
type
string(required)
Must be set totrim. -
name
string(required)
The name of the transform as it will appear in the UI's dropdown menus. -
requiresPeriodicRefresh
boolean(optional)
Whether the transform logic should be reevaluated every evening as part of the identity refresh process. Default isfalse.
Attributes
The trim transform only requires top-level properties:
{
"type": "trim",
"name": "Transform Name"
}
attributes (required)
The attributes object contains the trim configuration.
Optional
- input
object(optional)
Explicitly defines the input data passed into the transform. If not provided, the transform uses input from the source and attribute combination configured in the UI.
Examples
This transform removes the whitespace before the " Vice President" input.
Input: " Vice President"
Output: "Vice President"
Transform request body:
{
"attributes": {
"input": {
"attributes": {
"value": " Vice President"
},
"type": "static"
}
},
"type": "trim",
"name": "Trim Transform"
}
This transform removes the whitespace after the "Austin, Texas" input.
Input: "Austin, Texas "
Output: "Austin, Texas"
Transform request body:
{
"attributes": {
"input": {
"attributes": {
"value": "Austin, Texas "
},
"type": "static"
}
},
"type": "trim",
"name": "Trim Transform"
}