Apama 10.15.0 | Building and Using Apama Dashboards | Dashboard Function Reference | Tabular Functions | Group By Time and Unique Values
 
Group By Time and Unique Values
Returns a table that contains a summary of all the data in a given table, aggregated over both time and index columns. The summary data in the returned table is grouped into specified time intervals, with a further breakdown by unique values in specified index columns.
Arguments
The function has the following arguments:
*Table: Table whose data is to be summarized.
*Group Type: Text string that specifies the type of aggregation to perform. Enter one or more of the following: sum, count, average, min, max. The default is sum. For multiple group types, use a semicolon-separated list and set Use Column Names to 0. The default is sum.
*Date/Time Column Name: Text string that specifies a column of Table that contains a timestamp. If this argument is not supplied, the first column of Table is assumed to contain a timestamp.
*Date Part: Text string that specifies the date unit to use. Enter s, m, h, d, w, M, q, or y, for seconds, minutes, hours, days, weeks, months, quarters, or years. The default unit is seconds.
*Date Parts Per Interval: Numerical value that specifies he size of each interval in Date Parts.
*Number Of Intervals: Numerical value that specifies the number of intervals to include in the summary table. The returned table contains one row for each interval. If set to 0, the number of intervals is determined from the range of data in Table, or by the specified time range.
*Time Range Start: Text string that specifies the start of the desired time range. If this argument is not supplied, the time range is unbounded at the lower end.
*Time Range End: Text string that specifies the end of the desired time range. The time range itself does not include this value, but does include a value that is one second less than Time Range End. If this argument is not supplied, the time range is unbounded at the upper end.
*Restrict To Time Range: Numerical value (0 or 1) that determines whether Time Range Start and Time Range End are ignored. If set to 1, the resulting summary table includes only those time intervals within the specified range. If set to 0, the specified time range is ignored.
*Index Column Names: Text string that specifies the column or columns to be used to form indexes. Separate column names with a semicolon. If this argument is not supplied, the function aggregates only by time interval. If this argument is supplied, the function forms indexes by concatenating the values contained in each index column, and aggregates by index value within time-interval aggregations.
*Value List: Table column that contains a set of values to be included in the set of values for the first index column. This is useful if you want the summary table to include values that may or may not be in the Table data.
*Restrict To Value List: Numerical value (0 or 1) that determines whether the table includes only rows that include the values of Value List. If set to 1, only such values are included.
*Use Column Names: Numerical value (0 or 1) that determines whether original column names are retained in the returned table. If Use Column Names is set to 1, original column names are retained. If set to 0, columns are given generic names. Set this to 0 if multiple group types are specified.
*Restrict To Data Combinations: Numerical value (0 or 1) that determines whether the returned table is restricted to only those combinations of values found in the specified index columns that occur in the data. If set to 0, the returned table contains all possible combinations of unique values found in the specified index columns.
This function returns a table.