Advanced transformers
Advanced transformers for complex data manipulation
combineColumns
Combines values from multiple columns using a template. Uses placeholders in the format {fieldKey} to reference other columns in the same row. Converts all values to strings before combining.
Payload:
| Property | Type | Required | Description |
|---|---|---|---|
template | string | Yes | Template string with {fieldKey} placeholders. Unknown placeholders are left as-is in the output |
{
key: 'full_name',
label: 'Full name',
type: 'text',
transformers: [
{
action: 'combineColumns',
payload: {
template: '{firstName} {lastName}'
}
}
]
}Example:
- Input row:
{ firstName: "John", lastName: "Doe" } - Output:
"John Doe"
Complex example:
{
key: 'full_address',
label: 'Full address',
type: 'text',
transformers: [
{
action: 'combineColumns',
payload: {
template: '{street}, {city}, {state} {zipCode}'
}
}
]
}- Input row:
{ street: "123 Main St", city: "Boston", state: "MA", zipCode: "02101" } - Output:
"123 Main St, Boston, MA 02101"
defaultValue
Fills empty cells with a default value. Only affects cells that are null, undefined, or empty strings. Existing values are preserved.
Payload:
| Property | Type | Required | Description |
|---|---|---|---|
defaultValue | string | number | boolean | Date | Yes | The value to use for empty cells |
{
key: 'status',
label: 'Status',
type: 'text',
transformers: [
{
action: 'defaultValue',
payload: {
defaultValue: 'Pending'
}
}
]
}Example:
- Input:
null - Output:
"Pending"
autoIncrementIds
Generates auto-incrementing IDs for empty cells. Only fills cells that are null, undefined, or empty strings. Existing values are preserved. Skips hidden rows.
Payload:
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
start | number | No | 1 | Starting value for the sequence |
step | number | No | 1 | Increment step between values |
{
key: 'id',
label: 'ID',
type: 'numeric',
transformers: [
{
action: 'autoIncrementIds',
payload: {
start: 1000,
step: 10
}
}
]
}Example:
- Empty cells →
1000, 1010, 1020, 1030...
Simple example (default start and step):
{
key: 'row_number',
label: 'Row number',
type: 'numeric',
transformers: [
{
action: 'autoIncrementIds'
}
]
}- Empty cells →
1, 2, 3, 4...
generateUUID
Generates UUIDs for empty cells. Only fills cells that are null, undefined, or empty strings. Existing values are preserved. Supports multiple UUID versions with version-specific requirements.
Payload:
| Property | Type | Required | Description |
|---|---|---|---|
version | '1' | '3' | '4' | '5' | '6' | '7' | Yes | UUID version to generate |
namespace | string | No | Required for v3/v5 |
name | string | No | Required for v3/v5 |
{
key: 'uuid',
label: 'UUID',
type: 'text',
transformers: [
{
action: 'generateUUID',
payload: {
version: '4'
}
}
]
}Example:
- Input:
null - Output:
"550e8400-e29b-41d4-a716-446655440000"
Version 5 example (with namespace and name):
{
key: 'deterministic_uuid',
label: 'Deterministic UUID',
type: 'text',
transformers: [
{
action: 'generateUUID',
payload: {
version: '5',
namespace: '6ba7b810-9dad-11d1-80b4-00c04fd430c8',
name: 'example'
}
}
]
}fuzzyFix
Applies fuzzy matching to find and correct similar values. Useful for standardizing data with typos or variations against a known set of valid values. Requires a data source with valid options.
Payload:
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
isCaseSensitive | boolean | No | false | Whether matching should be case-sensitive |
threshold | number | No | 0.8 | Fuzzy matching threshold. 0.0 requires a perfect match, 1.0 would match anything. Higher values are more lenient |
{
key: 'country',
label: 'Country',
type: 'dropdown',
options: [
{ label: 'United States', value: 'US' },
{ label: 'United Kingdom', value: 'UK' },
{ label: 'Canada', value: 'CA' }
],
transformers: [
{
action: 'fuzzyFix',
payload: {
isCaseSensitive: false,
threshold: 0.8
}
}
]
}Examples:
-
Input:
"Unted States"(typo) -
Output:
"United States" -
Input:
"Canda"(typo) -
Output:
"Canada"
mapToEnum
Maps values to enum options. Useful for standardizing variations to canonical values (e.g., "yes" → "active", "no" → "inactive").
You can provide enums in two ways:
- Simple object - Direct key-value mapping
- Data source - Dynamic options using queries (see Data sources)
Payload:
| Property | Type | Required | Description |
|---|---|---|---|
enums | Record<string, any> or IDataSourceResolver | Yes | Enum mapping as object or data source |
Example 1: Simple object mapping
{
key: 'status',
label: 'Status',
type: 'text',
transformers: [
{
action: 'mapToEnum',
payload: {
enums: {
'yes': 'active',
'y': 'active',
'true': 'active',
'no': 'inactive',
'n': 'inactive',
'false': 'inactive'
}
}
}
]
}- Input:
"yes"→ Output:"active" - Input:
"no"→ Output:"inactive" - Input:
"y"→ Output:"active"
Example 2: Data source with query
{
key: 'country',
label: 'Country',
type: 'text',
transformers: [
{
action: 'mapToEnum',
payload: {
enums: {
query: '.countries | map({label: .name, value: .code})'
}
}
}
]
}- Input:
"United States"→ Output:"US" - Input:
"Canada"→ Output:"CA"
See Data sources for more information on queries and dynamic options.