Queries

Use one of the many predefined queries that come with Guardium to get information about your data. Use the Query Builder to work with queries.

Use queries to ask questions of your data such as, what are all the clients updating a specific database during weekend hours?

Queries are different from reports. A query describes a set of data, whereas a report describes how the data returned by a query is presented.

Once a query is completed, present the results of the query using reports. Reports usually are presented in tabular form, but you can customize the layout of a report as you like.

To use queries, open the Query Builder by clicking Comply > Custom Reporting > Custom Query Builder. Choose a domain to query, select a main entity, and then use the query as needed.

You cannot modify the predefined queries, but you can create a clone of a query and modify the clone.

The Main Entity

The main entity that you select for a query determines the following:

Note: Note: The Main Entity drop-down list includes only primary entities. However, access to secondary entities (for example Session Start and Session End) can be done through its corresponding primary entity (for example, Session for Session Start and Session End).

Sorting

By default, query data is sorted in ascending order by attribute value, with the sort keys ordered as the attributes appear in the query. Aliases are ignored for sorting purposes. The actual data values are always used for sorting. Attributes for which values are computed by the query (Count, Min, Max, or Avg) cannot be sorted.

To change the default sort order:

  1. Check the Order-by check box.
  2. Enter a number for Sort Rank (1 is the most major sort key).
  3. Optionally, check the Descend check box to sort the values of that attribute in descending sequence.

The last column of a tabular report is a count of main entity occurrences. To sort on this count in descending sequence (in other words, listing the greatest number occurrences first), mark the Sorted by occurrences check box.

Timestamps

A timestamp (lowercase t) is a data type containing a combined date-and-time value, which when printed displays in the format yyyy-mm-dd hh:mm:ss (for example, 2012-07-17 15:40:25). When creating or editing a query, most attributes with a timestamp data type display with a clock icon in the Entity List panel.

A Timestamp (uppercase T) is an attribute defined in many entity types, containing the time that the entity was last updated. For many timestamp attributes, you can print the date, time, weekday or year components separately, by referencing additional Timestamp attributes (Date, Time Weekday, or Year).