Open topic with navigation

TIBCO BusinessEvents® Enterprise Edition 6.3.1

# Map and Reduce

ESP queries can be used to implement a kind of "map and reduce" data processing pattern.

A message arrives at a destination that transforms it into an event of a certain type.

A query configured to listen for events of that type (as specified in the query’s `from` clause) then executes:

In the callback rule function for the following query, you would perform some kind of mapping operation. You would create event instances and then assert them using the following function:

`Query.Statement.assertEvent("myStatement", myEvent)`;

The function sends the named event directly to all query instances registered under the given statement name. You can use the function one or more times in the callback rule function, according to your needs.

The callback rule function for each of the second-level queries could perform some kind of "reduce" operation, and then create and assert an event locally using the function `Event.assertEvent(e)`. The event is piped to any query that is listening for it.

The callback rule function for the final level of query would create and send out an event containing the reduced, higher-value information, for example to a TIBCO BusinessEvents application.

Did you find this helpful?

YesNo
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO BusinessEvents® Enterprise Edition

Copyright © 2004-2024. Cloud Software Group, Inc. All Rights Reserved.