Entity-Relationship Diagrams for aggregation-related tables
This section describes percentiles and aggregates and the way to understand how projections are created.
Percentiles operate against the raw data, i.e., raw_v2_tables, not against an aggregate. Think of the nth_percentile_configuration tables as defining what subset of all the raw data has percentiles calculated, i.e., which rows within a specific raw_v2_table (specific device_key - group filter, specific fct_ts values - business hours filter) and which raw tables are actually read at all (specific metrics).
Projections operate against already calculated daily aggregates or against nth percentile calculations that have already been performed on daily_ or percentile_ tables. You can think of a projection of nth percentiles as a dependency, since nth-percentile configurations can limit the data produced, the projections on that nth percentile have, at a minimum, the same limits. You cannot have projections that specify fewer overall restrictions than the data source it depends on.
Projections groups, business hours, and metric configuration can be thought of as being used to decide which existing aggregate tables the values to be projected are read from, i.e., they only configure which table's values are projected and what additional group filters to apply to select devices.
Some configuration override scenarios:
- The specified nth-percentile metric configuration overrides the projection metric configuration
- The nth-percentile configuration overrides the projection configuration for business hour selection on a per metric basis
- If both nth-percentile and projection have group filters configured, only the intersection of the two sets is used. Otherwise, the configured group filter from either is used, if any are specified at all.
The following Entity-Relationship Diagrams (ERD) show the relationships between aggregation-related tables in the database.
Configuration ERD of aggregation-related tables
Status tracking ERD of the aggregation execution