Transformation Operations

Transformation Operations Documentation

The following operations can be used within the transformation mapping by setting the type to "operation" and specifying the name and parameters.


map

Maps a source value to a different destination value based on a predefined dictionary.

Parameters

FieldTypeDescription
source_pathstringThe JSON path to the source value to be mapped.
maparrayAn array of objects, each containing a from and to key. The from key is a regular expression to match against the source value.
altstringAn alternative value to use if no match is found in the map.

Example


hash

Generates a hash from the concatenated values of one or more fields.

Parameters

FieldTypeDescription
fieldsarrayA list of JSON paths to the fields whose values will be concatenated and hashed.
typestringThe hashing algorithm to use. Supported values are "MD5" and "SHA-256" (default).
formatstringThe output format for the hash. Supported values are "hexadecimal" or a GUID format for MD5. Defaults to the standard string representation of the hash.

Example


concat

Joins the string values of multiple fields together.

Parameters

FieldTypeDescription
fieldsarrayA list of JSON paths to the fields whose values will be concatenated.
separatorstringA string to insert between each value. Defaults to an empty string.

Example


format

Creates a formatted string from the values of one or more fields.

Parameters

FieldTypeDescription
fieldsarrayA list of JSON paths to the fields whose values will be used in the format string.
formatstringA standard .NET format string (e.g., "Name: {0}, Age: {1}").

Example


extract

Extracts a value from a string using a regular expression.

Parameters

FieldTypeDescription
source_pathstringThe JSON path to the source string.
regexstringThe regular expression to use for extraction. This is specified in the top-level format property of the mapping.
formatstringAn optional format string to combine multiple regex capture groups. This is specified in the top-level destination_format property of the mapping. If the value is "{*" all matches will be appended to the destination array.

Example


trim_array

Removes null or empty values from an array.

Parameters

FieldTypeDescription
source_pathstringThe JSON path to the source array.
destination_formatstringA string containing "empty" and/or "null" to specify which values to remove. Defaults to both.

Example


key_to_value

Transforms an object with dynamic keys into an array of objects.

Parameters

FieldTypeDescription
source_pathstringThe JSON path to the source object.
key_namestringThe name of the new property that will hold the original key.
value_namestringThe name of the new property that will hold the original value. If the original value is an object, this can be omitted and the key property will be added to the object.

Example

Given the source: {"metrics": {"clicks": 10, "views": 100}}


i18n_language_shorthand

Converts a full language name (e.g., "English") to its two or three-letter ISO code.

Parameters

FieldTypeDescription
source_pathstringThe JSON path to the source language name.
formatstringThe desired output format. Supported values are "two_letter_code" (default) and "three_letter_code". This is specified in the top-level destination_format property.

Example