Table of Contents

Search

  1. Preface
  2. RulePoint
  3. RulePoint Concepts
  4. Using RulePoint
  5. RulePoint Objects
  6. Working with Topics
  7. Working with Connections
  8. Working with Sources
  9. Working with Responders
  10. Working with Responses
  11. Working with Watchlists
  12. Working with Analytics
  13. DRQL
  14. Working with Rules
  15. Working with Alerts
  16. Setting Access Controls
  17. Troubleshooting RulePoint Issues
  18. Connecting to an Ultra Messaging Application
  19. Creating an Ultra Messaging JMS Source

User Guide

User Guide

SQL Analytic

SQL Analytic

The SQL analytic runs an SQL query or command against a target database.
When you run SQL commands and queries as an analytic, you can enrich the data to provide additional information during rule processing that is not available in the event data. An SQL analytic, when used in a rule, requires an SQL connection, so create an SQL connection before you create the SQL analytic.
The following table defines the properties of an SQL Analytic:
Property
Description
Name
The name of the SQL analytic. This must be a unique name.
Description
(Optional) The description of the analytic.
Type
Select
SQL Analytic
.
Connection
Select the connection type from the list of available connections.
SQL Query
The SQL query to run against the target database.
Use question marks to identify the substitution parameters in the SQL statement that will be replaced by the data values provided in the rule.
Condition Evaluation Required
Specifies whether the analytic is part of conditional evaluation within a rule. Set to 'false' if the result of the analytic can be used only for enrichment. The default value is True.
Cache Duration
Time period, in seconds, for which the result of the analytic is to be cached.

Example

Consider a transaction based SQL Service that you can use to calculate the total number of transactions for a particular merchant.
The following data represents the information that you would provide when creating an SQL analytic called
TransactionCount
to use as an analytic in the rule:
  • Name.
    TransactionCount
  • Description. Returns the total number of transactions made with a specific merchant, with the merchant name and purchase date as the input parameters.
  • Connection. Choose the created SQL connection.
  • SQL Query.
    SELECT count(*) FROM creditcard.purchase where Merchant_Name=? and Purchase_Date < ?
  • Condition Evaluation Required: Select True and False.
  • Cache Duration: Total number of milliseconds for which the analytic result will be cached.
The following rule uses the
TransactionCount
SQL analytic to determine the total number of transactions for a particular merchant before a specified date. If the
TransactionCount
is greater than 40 transactions, then respond appropriately.
WHEN 1 transaction WITH TransactionCount( Merchant_Name , Purchase_Date ) as result > 40 then response with body = “${result}”
The order of arguments of the analytic must match the position of the question marks.

0 COMMENTS

We’d like to hear from you!