Skip to content

Data Manipulation Functions

Julio Zevallos edited this page Jun 13, 2019 · 6 revisions

Below are the available functions one can enter to manipulate data. These functions can be used in overrides and exports for both service and UI steps, as well as UI inputs.

Note: All functions start with '(#' ,followed by function name, parameters seperated by '||', and finished with ')'.

  • Example: (#randNum||8) or (#randDOB).

Parameters can also take in dynamic variables.

  • Example: (#timeStamp||{{format}}) , where {{format}} is a variable with proper format for timestamp.
keyword Parameters Description
randNum (digits) or (min,max) Function that generates a random number. Takes 1 parameter as # of digits, or 2 parameters, specifying min and max
timeStamp (format) or (format,interval) or (format,start,end) Function that generates a timestamp. Giving 1 parameter generates the current timestamp in given format. 2 parameters can generate a random timestamp when given the interval 'Y', 'M', 'W', 'D', specifying to generate a random timestamp in the current year, month, week, or day, respectively. When the interval contains a '+' or '-' , it will generate the current timestamp and modify it by the amount specified. If given '+2Y', it will generate the timestamp 2 years in the future, '-4W' generates the time 4 weeks in the past. Use 'Y' or 'y' for year, 'M' for month, 'W' or 'w' for week, 'd' for day, 'H' or 'h' for hour, 'm' for minute, 's' for second, and 'S' for millisecond. 3 parameters generates a random timestamp with given format, and between the start and end time. For examples of valid formats, visit https://help.sumologic.com/03Send-Data/Sources/04Reference-Information-for-Sources/Timestamps%2C-Time-Zones%2C-Time-Ranges%2C-and-Date-Formats
randAlphaNum (length) or (format) Function that generates a random alphanumeric value. Takes 1 parameter, a number that specifies the length of the value generated, or a format for the value. Example, format can be 'DD??LLUU', which will generate an 8 length value, where 'D' specifies number, 'L' specifies lower case leters, 'U' for upper case letters, and '?' for all 3.
randName no params or (nameType) Function that generates a random name. No parameters generates a full name. 1 parameter takes in 'FIRSTNAME', 'LASTNAME', generating a first or last name, respectively.
randDOB no params or (age) or (format) or (min,max) or (format, age) or (format, min, max) Generates a random date of birth. No params generates a random DOB for a person 0-100 years old, with default format: 'MM/dd/YYYY'. 1 Param of age generates a DOB of someone with specified age, with default format. 1 Param of format generates a DOB of someone age of 0-100, with given format. 2 params of min,max generates a random DOB of someone between the min-max age, with default format. 2 params of format,age generates a random DOB of someone with given age, and given format. 3 params generates a random DOB of someone between min-max age, and given format.