Skip to main content

Nexla's Pre-Built Transforms

This article provides a list and brief descriptions of all pre-built transforms included in Nexla, with these transforms categorized by type. The Table of Contents can be used to navigate to lists of specific transform categories.

1. Introduction

The video below provides an introduction to using Nexla's pre-built transformations:

If you don’t see a transform that fits your needs listed in the following sections or have a custom transform in mind, contact us at support@nexla.com.

  

2. Array Operations

  • Array Size: Returns the number of elements in an input array

    This function is not recommended for use with other input types, but it will return the string length if applied to an input string or the number of key-value pairs if applied to an input object.

  • Concatenate: Joins all elements of an input array into a string

  • Concatenate with Delimiter: Joins all elements of an input array into a string with no separator applied between elements

  • Extract Element at Index: Returns the element at the specified index position in an input array

    For this function, index counting begins at 0.

  • Extract First Element: Returns the first element of an input array

  • Extract Last Element: Returns the last element of an input array

  • Sort Array Elements: Sorts the objects in an input array into ascending order

    To apply this function, all elements in the input array must be mutually comparable.

  • Average: Returns the average value of the elements in an input array

    This function does not average element values across multiple records, and it interprets an input string as a number.

  • Maximum: Returns the maximum value of the elements in an input array

    This function does not compute the maximum element value across multiple records, and it interprets an input string as a number.

  • Minimum: Returns the minimum value of the elements in an input array

    This function does not compute the minimum element value across multiple records, and it interprets an input string as a number.

3. Artificial Intelligence

  • One Hot Encoding: Performs one-hot encoding of an input attribute to produce an object

    This function uses a Nexla lookup and an attribute as input values and returns an object with keys matching those of the lookup. One-hot encoding converts categorical variables into a form that can be provided to a machine-learning algorithm to achieve better predictions.

4. Automotive

  • VIN to Country: Extracts the country name from a valid input VIN

  • VIN to Manufacturer: Extracts the vehicle manufacturer from a valid input VIN

  • VIN to Year: Extracts the vehicle make year from a valid input VIN

5. Conditional Logic

  • And?: Returns boolean true if two input values evaluate to true

  • If...Else: Returns values based on the truthiness of a logical expression applied to an input attribute

    This transform returns one value if the expression evaluates to true and another value if it evaluates to false.

  • Is Empty?: Returns boolean true if an input value is null, a blank string, or an empty array

  • Is Equal To?: Returns boolean true if an input value is equal to the specified second value

  • Is Greater Than?: Returns boolean true if an input value is greater than the specified second value

  • Is Less Than?: Returns boolean true if an input value is less than the specified second value

  • Is Not True?: Returns boolean true if an input value is false, a blank string, or an empty array

  • Or?: Returns boolean true if either of two input values evaluates to true

6. Date & Time

  • Convert Time Zone: Converts a valid input date-time string from one time zone to another

    This function outputs a date-time string in ISO8601 format.

  • Extract Date/Time: Returns the date-time portions of a valid input date-time string

  • Time (Epoch) to ISO8601: Converts a valid input Unix epoch time to the corresponding ISO8601-formatted timestamp string

  • Time (String) To ISO8601: Converts a valid input date-time string to the corresponding ISO8601-formatted timestamp string

  • Timestamp Difference: Returns the absolute difference between two input ISO8601-formatted timestamps

7. Finance

  • Currency Conversion from USD: Converts an input USD currency value to the desired currency using the latest exchange rate

8. Location

  • IP address to DMA: Identifies the DMA from an input IP address

  • IP address to Zip code: Identifies the zip code from an input IP address

  • IP address to city: Identifies the city from an input IP address

  • IP address to continent: Identifies the continent from an input IP address

  • IP address to country: Identifies the country from an input IP address

  • IP address to country code: Identifies the 2-letter country code from an input IP address

  • IP address to latitude: Identifies the latitude from an input IP address

  • IP address to longitude: Identifies the longitude from an input IP address

  • IP address to region code: Identifies the region or state code from an input IP address

  • IP address to state: Identifies the state from an input IP address

  • IP address to timezone: Identifies the time zone from an input IP address

9. Lookups

  • Lookup: Identifies the lookup row of an input attribute based on matching with the primary key values of the specified lookup and returns the value of the lookup secondary key column

  • Get Lookup Entries: Returns the entire object contained in a lookup table based on exact matching of an input with the primary key of the specified lookup

    This function returns the value as a JSON object containing <key>:<value> pairs matching the <column-name>:<row-value> in the matching row.

10. Mathematical Operations

  • Absolute: Extracts the absolute value from an input number

    This transform interprets a string as a numerical value.

  • Add: Sums the values of two input attributes

    This transform is equivalent to applying the '+' operator and interprets a string as a numerical value.

  • Bucket:Segments input attribute values into equally sized bins

    This transform returns the bin into which an integer value of an attribute falls. For an array of numbers, this transform returns an array of bins into which the values fall. This transform interprets a string as a numerical value.

  • Convert to Integer: Rounds a numerical input attribute value down to the nearest integer

    This transform interprets a string as a number.

  • Convert to Long:Returns a long point-precision floating point representation of a numerical input attribute value

    This transform interprets a string as a number.

  • Divide:Divides the value of one input attribute by the value of a second input attribute

    This transform interprets a string as a number.

  • Convert to Double:Returns a double-precision floating point representation of a numerical input attribute value

    This transform interprets a string as a number.

  • Multiply: Returns the product of two input attribute values

    This transform is equivalent to applying the '*' operator and interprets a string as a numerical value.

  • Subtract: Subtracts the value of one input attribute from the value of another input attribute

    This transform is equivalent to applying the '-' operator and interprets a string as a numerical value.

  • To Precision: Returns a fixed-precision floating point value representation of a numerical input attribute value

    This transform returns a floating point value representation that is accurate to a user-specified fixed precision and interprets a string as a numerical value.

11. Miscellaneous

  • Constant: Always returns a constant value

    The constant value can be a string or number.

  • Equal to Attribute : Returns an input attribute as-is without any transformation

  • Remove Attribute: Removes an input attribute from the output

  • Hoist Object Properties: Extracts all properties of an input object and adds them to the root

12. Security

  • Hash MD5: Tokenizes an input attribute value using the MD5 algorithm

    This transform automatically MD5-encrypts any string value.

  • Hash SHA256: Tokenizes an input attribute value using the SHA256 algorithm

    This transform automatically SHA256-encrypts any string value.

The video below provides information about using these transforms for PII data masking:

13. String Operations

  • Check if string matches pattern: Returns boolean true or false based on whether an input string matches the provided regular expression

    This function returns boolean true if the input string matches the provided regular expression; it returns boolean false if the input string does not match the provided expression.

  • Concatenate Two Attributes: Concatenates two input string attributes or function outputs into a single attribute

    This function includes the option to include a delimiter. This function is also different from the Join function for arrays.

  • Convert JSON Object to JSON String: Converts a JSON object/array to a JSON string

    This function is useful for writing nested objects to databases and/or lookup tables. If the input is already a string, it will be written as-is.

  • Convert to String: Returns a string representation of an input attribute

    For an input array, this function a string representation of the array contents—a list of the array contents—enclosed in square brackets ([ ]).

  • Extract Substring: Returns a substring of an input string according to specified start and end positions

    This function returns a substring beginning at the specified start position ('From Position') and extending to include the character before the specified end position (Up to Position), with position counting beginning with index 0. To extract a substring through the end of the input string, leave the end position blank. To enter an end position relative to the end of the string, use a negative number.

  • Extract Substrings Matching Pattern: Returns an array of all substrings in an input string that match the specified regular expression

  • Lowercase String: Converts all characters in an input string to lowercase characters

  • Parse log lines by Grok Pattern: Parses input unstructured log data into an object with structured fields using a selected or user-defined valid grok pattern

    If the input text can be parsed, this function returns an object with predefined keys for the corresponding log format; if the input text cannot be parsed, this function returns an empty object.

  • Replace Substring: Replaces all substrings in an input string that match the entered substring pattern with the defined replacement

  • Split: Splits an input string into an array of strings based on a specified delimiter

    This function does not include the specified delimiter in the output string array, and it treats adjacent delimiters as a single delimiter.

  • String Length: Returns the length of an input string

    This function returns a length equal to the number of Unicode units included in the input string.

  • Trim: Returns a string with any leading and/or trailing whitespace characters in an input string removed

  • Uppercase String: Converts all characters in an input string to uppercase characters

14. User Agent

  • User Agent to Browser: Extracts the browser from an input user agent string

  • User Agent to Browser Version: Extracts the browser version from an input user agent string

  • User Agent to Device Make: Extracts the device make from an input user agent string

  • User Agent to Device Type: Extracts the device type from an input user agent string

  • User Agent to OS: Extracts the operating system from an input user agent string

15. Reusable Attribute Transform Code

  • This category lists reusable custom transform codes created by or shared with the user

    Any listed custom transform can be used by selecting it.

    For more information about reusable attribute transform codes, see our Reusable Attribute Transforms article.