Skip to main content

Core

Macrometa core functions are described in the table below.

FunctionDescription
andReturns the results of AND operation for all the events.
avgCalculates the average for all the events.
castConverts the first parameter according to the cast.to parameter.
coalesceReturns the value of the first input parameter that is not null, and all input parameters have to be on the same type.
convertConverts the first input parameter according to the convertedTo parameter.
countReturns the count of all the events.
createSetIncludes the given input parameter in a java.util.HashSet and returns the set.
currentTimeMillisReturns the current timestamp of stream processor application in milliseconds.
defaultChecks if the attribute parameter is null and if so returns the value of the default parameter.
distinctCountThis returns the count of distinct occurrences for a given arg.
eventTimestampReturns the timestamp of the processed event.
frequencyCounts the number of occurrences of different values of a given attribute.
ifThenElseEvaluates the condition parameter and returns value of the if.expression.
instanceOfBooleanChecks whether the parameter is an instance of Boolean or not.
instanceOfDoubleChecks whether the parameter is an instance of Double or not.
instanceOfFloatChecks if the parameter is an instance of Float or not.
instanceOfIntegerChecks whether the parameter is an instance of Integer or not.
instanceOfLongChecks whether the parameter is an instance of Long or not.
instanceOfStringChecks whether the parameter is an instance of String or not.
logLogs the message on the given priority with or without the processed event.
maxReturns the maximum value for all the events.
maxForeverThis is the attribute aggregator to store the maximum value for a given attribute.
maximumReturns the maximum value of the input parameters.
minReturns the minimum value for all the events.
minForeverThis is the attribute aggregator to store the minimum value for a given attribute throughout the lifetime of the query regardless of any windows.
minimumReturns the minimum value of the input parameters.
orReturns the results of OR operation for all the events.
pol2Cart (sizeOfSet - Stream)The pol2Cart function calculating the cartesian coordinates x & y for the given theta.
sizeOfSetReturns the size of an object of type java.util.Set.
stdDevReturns the calculated standard deviation for all the events.
sumReturns the sum for all the events.
unionSetUnion multiple sets.
uuidGenerates a UUID (Universally Unique Identifier).