Reporting: Warehouse Database Rule Definition Modes

Document created by RSA Information Design and Development on Jun 26, 2017
Version 1Show Document
  • View in full screen mode
  

This topic describes Warehouse DB rule definition modes. You can generate reports of the Warehouse data source by creating rules to query the data source. The rules can be defined in two modes:

  • Default Mode
  • Expert Mode

Default Mode

In Default Mode, you can create rules containing simple SQL like HIVE queries that contain clauses like Select, Where, Group By, and Having. By default, you can create rules to query sessions or raw logs. For more information on Simple query syntax and examples, see Warehouse DB Simple Rules.

The following figure is an example of the Build Rule view that displays when you select Warehouse DB for Rule Type without the Expert Mode selected.

Warehousedb1.png

Querying Raw Logs

The raw log format is used in the select or where clause to query for raw logs.

Note: The time range that you can specify in your query is a day (24 hours).  If you have specified a time range less than a day in your query, the result set contains data of at least a day (24 hours).

The following figure is an example of the Build Rule view that displays when you select Warehouse DB for Rule Type and create a rule for querying raw logs.

Warehousedb2.png

Expert Mode

The following figure is an example of the Build Rule view that displays when you select Warehouse DB for Rule Type with Expert Mode selected.

Warehousedb3.png

If you want to generate a report for a specific time range, you need to manually define the time range in the query using the following two variables:

  • ${report_starttime} - The starting time of the range in seconds.
  • ${report_endtime} - The ending time of the range in seconds.

For example, SELECT col1, col2 FROM custom_table WHERE timecol >= ${report_starttime} AND timecol <= ${report_endtime};

Note: By default, Reporting Engine treats ${keyword} as a variable. If you want to specify HIVE variables, you must mention the complete syntax of a variable. For example, ${hiveconf:hive.exec.scratchdir}.

Topics:

Previous Topic:Rule References
You are here
Table of Contents > Reporting Module References > Rule References > Warehouse Database Rule Definition Modes

Attachments

    Outcomes