The following example code could be placed in a preprocessor rule function that receives an event called requestEvent. It includes all steps from creating to closing the query.The example is simplified for clarity. In a real-world use case, the creation step could be performed in a startup rule function, and the output could be sent in an event to an inference agent or other destination.
Query.create("report853", "select agent_name, total_sales, zipcode from /Concepts/Sales");
The last three lines are provided for completeness. However, if the Query.Close() function is used, you would not need to include the Query.ResultSet.close() or Query.Statement.close() functions. See Closing a Statement and Deleting a Query Definition for details about these hierarchical relationships.
Copyright © TIBCO Software Inc. All Rights Reserved.