Other Functions

  • xpath(data, expression [,resultType]) - performs an XPath function on the first parameter value. Data must contain XML (so depends on the serializer used for events). The resultType may be specified to indicate if you want to have an XML

  • node, an XML nodelist, a string or a number returned.

  • jsonpath(data, expression) - performs a jsonpath function on the first parameter value. Data must contain JSON

  • formatDate(data, format [,timezone]) - converts a timestamp value to a readable date

  • concat(listData, delimiter) - concatenates all elements in the listData to a single string, with delimiter between the elements.

  • left( data, n ) - returns the first n characters from data. If data is shorter than n it returns the whole string,

  • right( data, n ) - returns the last n characters from data. If data is shorter than n it returns the whole string,

  • length( data ) - returns the length of the string

  • lower( data ) - converts string to lowercase

  • upper( data) - converts string to lowercase

  • substring( data, first [, last]) - returns substring from first to end of string or last (exclusive). If string is shorter than first it returns an empty string.

  • hour(timestamp)

  • minute(timestamp)

  • day(timestamp)

  • week(timestamp)

  • month(timestamp)

  • year(timestamp)

Examples

select( xpath(payloadData, "//customerId") as customerId)

Gets the first customerId in the payloadData.

xpath(payloadData, "count(//customerId)", "NUMBER") > 10

Returns events with more than 10 customerId elements in the payload.

select(jsonpath(payloadData, "$.book[*].title") as titles)

Gets the titles for all books.