Builtin Functions
A % B (number)
Computes the modulus of two numbers.
Parameters
-
a : numberThe dividend in the modulus operation.
-
b : numberThe divisor in the modulus operation.
Returns
A + B (number)
Add two numbers.
Parameters
-
a : numberthe first number
-
b : numberthe second number
Returns
A – B (number)
Subtract the second number from the fist number.
Parameters
-
a : numberthe first number
-
b : numberthe second number
Returns
A / B (number)
Divide the first number by the second.
Parameters
-
a : numberthe first number
-
b : numberthe second number
Returns
A // B (number)
Computes the floor division of two numbers
Parameters
-
a : numberThe dividend in the floor division operation.
-
b : numberThe divisor in the floor division operation.
Returns
A ^ B (number)
Computes the power of a number raised to an exponent.
Parameters
-
a : numberThe base number.
-
b : numberThe exponent to which the base is raised.
Returns
A x B (number)
Multiply two numbers
Parameters
-
a : numberthe first number
-
b : numberthe second number
Returns
ABS (number)
Calculate the absolute value of a number
Parameters
-
a : numberthe number for which to calculate the absolute value
Returns
Add (datetime)
Add a specified interval to a given date.
Parameters
-
a : datetimedatetime object to which the interval is added
-
interval : numberamount of time to add
-
unit : stringunit of time to add, must be one of ‘years’, ‘months’, ‘days’, ‘hours’, ‘minutes’ or ‘seconds’
Returns
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 : objectlistCollective data
-
column : stringColumn name
-
value : string | number | boolean | datetime | list_string | list_number | list_boolean | list_datetimeIf 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
Aggregate Across Columns
Applies row-wise aggregation (min, max, avg, sum) across multiple columns and stores the result in a new field.
Parameters
-
data : objectlistInput objectlist.
-
columns : list_stringColumns used for aggregation.
-
op : stringAggregation operation.
-
new_field : stringOutput field name for aggregated value.
-
default_value : floatdefault value.
Returns
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 : objectlistSource OBJECTLIST.
-
other : objectlistOBJECTLIST to append.
Returns
Check String Array Overlap
Checks if there is any overlap between two arrays of strings.
Parameters
-
a : list_stringThe first array of strings
-
b : list_stringThe second array of strings
Returns
Check value exists in collective data
Check if a value is found in this OBJECTLIST at the specified json path.
Parameters
-
data : objectlistCollective data
-
jpath : jsonpathJSONPATH string
-
value : string | number | boolean | datetimeAn object (of type int, float, string or other) to find in this Collective data
-
wildcard : boolean, default to FalseUse wildcard ? for single character and * for any number of characters in value. Valid only if value is a string; otherwise ignored
Returns
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 : objectlistThe data on which to perform the operation.
-
left_operand : stringThe left operand, which can be a column name.
-
operator : stringThe mathematical operator to apply.
-
right_operand : string | numberThe right operand, which can be a column name or a constant value.
-
result_column : stringThe name of the new column where the result will be stored.
Returns
Concat (string)
Concatenate two strings.
Parameters
-
a : stringthe first string
-
b : stringthe second string
Returns
Contains (string)
Check if one string is contained within another.
Parameters
-
a : stringthe substring to search for
-
b : stringthe string to search within
Returns
Count Array
Count the number of elements in the array.
Parameters
-
a : list_string | list_number | list_datetimeThe array whose elements are to be counted
Returns
Diff (datetime)
Calculate the difference between a and b.
Parameters
-
a : datetimeThe first datetime
-
b : datetimeThe second datetime
-
unit : stringThe unit of time to measure the difference. Can be ‘years’, ‘months’, ‘days’, ‘hours’, ‘minutes’, or ‘seconds’
Returns
Difference Between Two OBJECTLISTs
Find the difference between two OBJECTLISTs based on specified attributes.
Parameters
-
data1 : objectlistFirst OBJECTLIST to compare
-
data2 : objectlistSecond OBJECTLIST to compare
-
compare_attributes : list_stringList of attribute names to compare
Returns
Extract (datetime)
Extract a specific component from a datetime.
Parameters
-
a : datetimedatetime object from which the component is extracted
-
unit : stringcomponent to extract, must be one of ‘year’, ‘month’, ‘day’, ‘hour’, ‘minute’, ‘second’
Returns
Filter LookupTable by Column
Filter LookupTable by column using value from transaction
Parameters
-
data : objectlistThe data on which to perform the operation.
-
column : stringThe column name used to filter.
-
value : string | numberThe column’s value to match.
Returns
Flat Group By
Groups the data by specified columns.
Parameters
-
data : objectlistThe data to be grouped.
-
columns : list_stringColumns by which to group the data.
-
group_id_key : stringThe key name to assign group IDs.
Returns
Flat Group By Time Period
Groups the data by time periods based on the specified column and time threshold.
Parameters
-
data : objectlistThe data to be grouped.
-
column : stringThe column containing the time values for grouping.
-
time_period : integerThe maximum time period (in seconds) between entries in the same group.
-
group_id_key : stringThe key name to assign group IDs.
Returns
Get String Array Intersection
Computes the intersection of two arrays of strings, returning the common elements.
Parameters
-
a : list_stringThe first array of strings
-
b : list_stringThe second array of strings
Returns
Intersection of Two OBJECTLISTs
Find the intersection of two OBJECTLISTs based on specified attributes.
Parameters
-
data1 : objectlistFirst OBJECTLIST to compare
-
data2 : objectlistSecond OBJECTLIST to compare
-
compare_attributes : list_stringList of attribute names to compare
Returns
Left (string)
Extract the leftmost n characters from a string.
Parameters
-
a : stringthe string from which to extract
-
n : integerthe number of characters to extract from the left
Returns
Lowercase (string)
Convert a string to lowercase.
Parameters
-
a : stringthe string to convert
Returns
Match (string)
Check if a string matches a pattern (ignoring case) with wildcard support
Parameters
-
a : stringthe string to check
-
pattern : stringthe pattern with ‘*’ for multiple characters and ‘?’ for a single character
Returns
Max (datetime)
Find the maximum datetime from a list of datetimes.
Parameters
-
datetimes : list_datetimethe list of datetimes
Returns
Max (number)
Find the maximum number in a list of numbers.
Parameters
-
a : list_numberList of number values to find the maximum from
Returns
Mid (string)
Extract a substring from a text string, starting at a specified position and continuing for a specified number of characters
Parameters
-
a : stringthe string from which to extract
-
start_n : integerthe position in the text string where the extraction starts (The first character in the string is position 1)
-
num_chars : integerthe number of characters to extract from the text string
Returns
Min (datetime)
Find the minimum date from a list of datetimes.
Parameters
-
datetimes : list_datetimethe list of datetimes
Returns
Min (number)
Find the minimum number in a list of numbers.
Parameters
-
a : list_numberList of number values to find the minimum from
Returns
ROUND (number)
Rounds a number to a specified number of decimal places.
Parameters
-
a : numberThe number to be rounded.
-
ndigits : numberThe number of decimal places to round to. If less than or equal to 0, rounds to the nearest integer.
Returns
Right (string)
tract the rightmost n characters from a string.
Parameters
-
a : stringthe string from which to extract
-
n : integerthe number of characters to extract from the right
Returns
Split (string)
Splits a string into a list of substrings based on a specified separator.
Parameters
-
a : stringThe string to be split
-
separator : stringThe separator used to split the string
Returns
String to datetime (datetime)
Convert a string to a datetime
Parameters
-
txt : stringstring representation of the date and time
-
format : stringFormats datetime values according to https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes
Returns
Subtract (datetime)
Subtract a specified interval from a given date.
Parameters
-
a : datetimedatetime object from which the interval is subtracted
-
interval : numberamount of time to subtract
-
unit : stringunit of time to subtract, must be one of ‘years’, ‘months’, ‘days’, ‘hours’, ‘minutes’ or ‘seconds’
Returns
Trim (string)
Remove leading and trailing whitespace from a string.
Parameters
-
a : stringthe string to strip
Returns
Truncate (datetime)
Truncate a date to the specified unit.
Parameters
-
a : datetimedatetime object to be truncated
-
unit : stringunit to truncate to, must be one of ‘year’, ‘month’, ‘day’, ‘hour’, ‘minute’ or ‘second’
Returns
Uppercase (string)
Convert a string to uppercase.
Parameters
-
a : stringthe string to convert
