Builtin Functions

A % B (number)

Computes the modulus of two numbers.

Parameters

  • a : number
    The dividend in the modulus operation.
  • b : number
    The divisor in the modulus operation.

Returns

number

A + B (number)

Add two numbers.

Parameters

  • a : number
    the first number
  • b : number
    the second number

Returns

number

A – B (number)

Subtract the second number from the fist number.

Parameters

  • a : number
    the first number
  • b : number
    the second number

Returns

number

A / B (number)

Divide the first number by the second.

Parameters

  • a : number
    the first number
  • b : number
    the second number

Returns

number

A // B (number)

Computes the floor division of two numbers

Parameters

  • a : number
    The dividend in the floor division operation.
  • b : number
    The divisor in the floor division operation.

Returns

number

A ^ B (number)

Computes the power of a number raised to an exponent.

Parameters

  • a : number
    The base number.
  • b : number
    The exponent to which the base is raised.

Returns

number

A x B (number)

Multiply two numbers

Parameters

  • a : number
    the first number
  • b : number
    the second number

Returns

number

ABS (number)

Calculate the absolute value of a number

Parameters

  • a : number
    the number for which to calculate the absolute value

Returns

number

Add (datetime)

Add a specified interval to a given date.

Parameters

  • a : datetime
    datetime object to which the interval is added
  • interval : number
    amount of time to add
  • unit : string
    unit of time to add, must be one of ‘years’, ‘months’, ‘days’, ‘hours’, ‘minutes’ or ‘seconds’
    Valid values are years, months, days, hours, minutes, seconds.

Returns

datetime

Add new column to objectlist

Assign a new column to all objects or replacing the existing column. Return a new OBJECTLIST. This method doesn’t check the schema of objects.

Parameters

  • data : objectlist
    Collective data
  • column : string
    Column name
  • value : string | number | boolean | datetime | list_string | list_number | list_boolean | list_datetime
    If value is a single value, assign it to all objects. If value is a list of values, assign each element to a different object in order.

Returns

objectlist
Attributes are inherited from input parameter data. A new attribute specified by input parameter column is added.

Aggregate Across Columns

Applies row-wise aggregation (min, max, avg, sum) across multiple columns and stores the result in a new field.

Parameters

  • data : objectlist
    Input objectlist.
  • columns : list_string
    Columns used for aggregation.
  • op : string
    Aggregation operation.
    Valid values are min, max, avg, sum.
  • new_field : string
    Output field name for aggregated value.
  • default_value : float
    default value.

Returns

objectlist
Attributes are inherited from input parameter data. A new attribute specified by input parameter new_field is added.

Append Collective Field

Append all objects from another OBJECTLIST to the end of the input OBJECTLIST. Return a new OBJECTLIST without validating object schemas.

Parameters

  • data : objectlist
    Source OBJECTLIST.
  • other : objectlist
    OBJECTLIST to append.

Returns

objectlist
Attributes are inherited from input parameter data.

Check String Array Overlap

Checks if there is any overlap between two arrays of strings.

Parameters

  • a : list_string
    The first array of strings
  • b : list_string
    The second array of strings

Returns

boolean

Check value exists in collective data

Check if a value is found in this OBJECTLIST at the specified json path.

Parameters

  • data : objectlist
    Collective data
  • jpath : jsonpath
    JSONPATH string
  • value : string | number | boolean | datetime
    An object (of type int, float, string or other) to find in this Collective data
  • wildcard : boolean, default to False
    Use wildcard ? for single character and * for any number of characters in value. Valid only if value is a string; otherwise ignored
    Valid values are True, False.

Returns

boolean

Collective Math Apply Function

Applies a mathematical operation between two operands (which can be columns or constants) and stores the result in a new column.

Parameters

  • data : objectlist
    The data on which to perform the operation.
  • left_operand : string
    The left operand, which can be a column name.
  • operator : string
    The mathematical operator to apply.
    Valid values are plus, minus, multiply, divide.
  • right_operand : string | number
    The right operand, which can be a column name or a constant value.
  • result_column : string
    The name of the new column where the result will be stored.

Returns

objectlist
Attributes are inherited from input parameter data. A new attribute specified by input parameter result_column is added.

Concat (string)

Concatenate two strings.

Parameters

  • a : string
    the first string
  • b : string
    the second string

Returns

string

Contains (string)

Check if one string is contained within another.

Parameters

  • a : string
    the substring to search for
  • b : string
    the string to search within

Returns

boolean

Count Array

Count the number of elements in the array.

Parameters

  • a : list_string | list_number | list_datetime
    The array whose elements are to be counted

Returns

number

Diff (datetime)

Calculate the difference between a and b.

Parameters

  • a : datetime
    The first datetime
  • b : datetime
    The second datetime
  • unit : string
    The unit of time to measure the difference. Can be ‘years’, ‘months’, ‘days’, ‘hours’, ‘minutes’, or ‘seconds’
    Valid values are years, months, days, hours, minutes, seconds.

Returns

number

Difference Between Two OBJECTLISTs

Find the difference between two OBJECTLISTs based on specified attributes.

Parameters

  • data1 : objectlist
    First OBJECTLIST to compare
  • data2 : objectlist
    Second OBJECTLIST to compare
  • compare_attributes : list_string
    List of attribute names to compare

Returns

objectlist
Attributes are inherited from input parameter data1.

Extract (datetime)

Extract a specific component from a datetime.

Parameters

  • a : datetime
    datetime object from which the component is extracted
  • unit : string
    component to extract, must be one of ‘year’, ‘month’, ‘day’, ‘hour’, ‘minute’, ‘second’
    Valid values are year, month, day, hour, minute, second.

Returns

number

Filter LookupTable by Column

Filter LookupTable by column using value from transaction

Parameters

  • data : objectlist
    The data on which to perform the operation.
  • column : string
    The column name used to filter.
  • value : string | number
    The column’s value to match.

Returns

objectlist
Attributes are inherited from input parameter data.

Flat Group By

Groups the data by specified columns.

Parameters

  • data : objectlist
    The data to be grouped.
  • columns : list_string
    Columns by which to group the data.
  • group_id_key : string
    The key name to assign group IDs.

Returns

objectlist
Attributes are inherited from input parameter data. A new attribute specified by input parameter group_id_key is added.

Flat Group By Time Period

Groups the data by time periods based on the specified column and time threshold.

Parameters

  • data : objectlist
    The data to be grouped.
  • column : string
    The column containing the time values for grouping.
  • time_period : integer
    The maximum time period (in seconds) between entries in the same group.
  • group_id_key : string
    The key name to assign group IDs.

Returns

objectlist
Attributes are inherited from input parameter data. A new attribute specified by input parameter group_id_key is added.

Get String Array Intersection

Computes the intersection of two arrays of strings, returning the common elements.

Parameters

  • a : list_string
    The first array of strings
  • b : list_string
    The second array of strings

Returns

list_string

Intersection of Two OBJECTLISTs

Find the intersection of two OBJECTLISTs based on specified attributes.

Parameters

  • data1 : objectlist
    First OBJECTLIST to compare
  • data2 : objectlist
    Second OBJECTLIST to compare
  • compare_attributes : list_string
    List of attribute names to compare

Returns

objectlist
Attributes are inherited from input parameter data1.

Left (string)

Extract the leftmost n characters from a string.

Parameters

  • a : string
    the string from which to extract
  • n : integer
    the number of characters to extract from the left

Returns

string

Lowercase (string)

Convert a string to lowercase.

Parameters

  • a : string
    the string to convert

Returns

string

Match (string)

Check if a string matches a pattern (ignoring case) with wildcard support

Parameters

  • a : string
    the string to check
  • pattern : string
    the pattern with ‘*’ for multiple characters and ‘?’ for a single character

Returns

boolean

Max (datetime)

Find the maximum datetime from a list of datetimes.

Parameters

  • datetimes : list_datetime
    the list of datetimes

Returns

datetime

Max (number)

Find the maximum number in a list of numbers.

Parameters

  • a : list_number
    List of number values to find the maximum from

Returns

number

Mid (string)

Extract a substring from a text string, starting at a specified position and continuing for a specified number of characters

Parameters

  • a : string
    the string from which to extract
  • start_n : integer
    the position in the text string where the extraction starts (The first character in the string is position 1)
  • num_chars : integer
    the number of characters to extract from the text string

Returns

string

Min (datetime)

Find the minimum date from a list of datetimes.

Parameters

  • datetimes : list_datetime
    the list of datetimes

Returns

datetime

Min (number)

Find the minimum number in a list of numbers.

Parameters

  • a : list_number
    List of number values to find the minimum from

Returns

number

ROUND (number)

Rounds a number to a specified number of decimal places.

Parameters

  • a : number
    The number to be rounded.
  • ndigits : number
    The number of decimal places to round to. If less than or equal to 0, rounds to the nearest integer.

Returns

number

Split (string)

Splits a string into a list of substrings based on a specified separator.

Parameters

  • a : string
    The string to be split
  • separator : string
    The separator used to split the string

Returns

list_string

String to datetime (datetime)

Convert a string to a datetime

Parameters

  • txt : string
    string representation of the date and time
  • format : string
    Formats datetime values according to https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes

Returns

datetime

Subtract (datetime)

Subtract a specified interval from a given date.

Parameters

  • a : datetime
    datetime object from which the interval is subtracted
  • interval : number
    amount of time to subtract
  • unit : string
    unit of time to subtract, must be one of ‘years’, ‘months’, ‘days’, ‘hours’, ‘minutes’ or ‘seconds’
    Valid values are years, months, days, hours, minutes, seconds.

Returns

datetime

Trim (string)

Remove leading and trailing whitespace from a string.

Parameters

  • a : string
    the string to strip

Returns

string

Truncate (datetime)

Truncate a date to the specified unit.

Parameters

  • a : datetime
    datetime object to be truncated
  • unit : string
    unit to truncate to, must be one of ‘year’, ‘month’, ‘day’, ‘hour’, ‘minute’ or ‘second’
    Valid values are year, month, day, hour, minute, second.

Returns

datetime

Uppercase (string)

Convert a string to uppercase.

Parameters

  • a : string
    the string to convert

Returns

string