How Do I View the Aggregation Query?
The Scheme files for the Genesys-provided hierarchies include high-level constructions that employ macros. These macros simplify development of SQL queries but make it difficult to see the actual queries that are passed to the RDBMS. This page describes where and how to view these queries.
Using LogLevel=FINEST Logs Database Queries
To view the actual SQL queries for the interval-based aggregates (in which subhour data is stored in tables rather than views), you must submit a request to reaggregate data for any range of time and then run aggregation with the finest log level of detail:
printQuery Logs RAA Queries
In autonomous mode, you can also specify the -printQuery runtime parameter on the command line:
- to view a particular query:
java -jar ./agg/GIMAgg.jar -printQuery <queryName>
- <queryName> is any query that is known to the aggregation engine.
- to output a particular query to a file:
java -jar ./agg/GIMAgg.jar -printQuery <queryName> > <sqlfile>
- <queryName> is any query that is known to the aggregation engine, or (in Release 8.5.003 and later) ALL , to print all existing queries.
- <sqlfile> is the name of the log file.
- For example:
java -jar ./agg/GIMAgg.jar -printQuery QUEUE > logfile.sql
Executing this command with this parameter requires no connection to Info Mart. For more information about the -printQuery parameter, refer to its description in the Reporting and Analytics Aggregates Deployment Guide.