Table summarising promotion entries by reward, one row per reward showing its total entry count and the number of distinct profiles who entered. Registered with the query engine as a Table so it can be looked up by id and read from reports and exports. Rows are read from the pre-built "reward-entries" query, which aggregates entries by reward and counts distinct users per bucket.
Implements: Table
Properties
| Property | Returns | Description |
|---|---|---|
| description | String | Human readable description of what this table returns, shown to a report author when choosing a table. |
| headers | List<String> | Column header labels for this table: the reward name, its total entry count and its distinct profile count. |
| tableId | String | Fixed id this table is registered and looked up under. |
Inherited from Table
Methods
getRows(int start, Integer maxRows)
Returns: RowsResult
Reads a page of rows starting at the given row, discarding any progress status. Delegates to the three argument overload with a status callback that does nothing.
| Parameter | Description |
|---|---|
start | the zero based index of the first row to return |
maxRows | the maximum number of rows to return, or null for no limit |
getRows(int start, Integer maxRows, Consumer<String> status, Map<String,Object> extraParams)
Returns: RowsResult
Reads a page of rows, optionally taking extra parameters that a specific table implementation can use to filter its results. The default implementation ignores extraParams and reads from row zero rather than the given start; implementations that use extraParams override this method directly.
| Parameter | Description |
|---|---|
start | the zero based index of the first row to return; not used by the default implementation |
maxRows | the maximum number of rows to return, or null for no limit |
status | callback invoked with progress messages while the rows are being read |
extraParams | implementation specific filter parameters; not used by the default implementation |
supportsPagination()
Returns: boolean
Whether this table supports paged reads via the start and maxRows parameters of getRows. A table that returns false always returns its full result set regardless of the paging parameters supplied.
Methods
getTableId()
Returns: String
Fixed id this table is registered and looked up under.
getDescription()
Returns: String
Human readable description of what this table returns, shown to a report author when choosing a table.
getHeaders()
Returns: List<String>
Column header labels for this table: the reward name, its total entry count and its distinct profile count.
getRows(int start, Integer maxRows, Consumer<String> status)
Returns: RowsResult
Runs the "reward-entries" query and returns one row per reward bucket with its entry count and distinct user count. The start and maxRows paging parameters are not applied, since the result is a small, pre-aggregated summary rather than a paged list. If the query has not run or returns no aggregations, a single row explaining the failure is returned instead.
| Parameter | Description |
|---|---|
start | not used by this table, present only to satisfy the Table interface |
maxRows | not used by this table, present only to satisfy the Table interface |
status | not used by this table, present only to satisfy the Table interface |