Aggregating Billed Quantities

Aggregating billed service quantities involves identifying constituent usage transactions for an Aggregation Measuring Component, retrieving the service quantity data that falls within the aggregation period, and aggregating that data.

Aggregation of billed quantities is handled by the Aggregate Billed Service Quantities (D1_​AGGBSQ) algorithm. The algorithm performs the following steps:

  • It calls the Find Constituents for Billing Data (D1-FINDCONSB) algorithm and populates the GTT5 global temporary table (see Find Constituents for more details about this process).

  • It deletes any constituents from the GTT5 table that do not have 100% coverage for the dates in the aggregation period.

  • For each remaining constituent in GTT5, the algorithm retrieves billing data for the aggregation period (based on the service quantity configuration on the data source) and inserts it into the GTT6 global temporary table. If the UOM is different from that of the Aggregation Measuring Component, the service quantities are converted to a common UOM.

  • It performs aggregation calculations on the measurement data in the GTT6 table, using data source template SQL, extended by the value identifiers defined on the measuring component type of the Aggregation Measuring Component.

  • It applies a profile to the aggregated values to create interval measurements with the same SPI as the Aggregation Measuring Component.

  • It either inserts or updates the results to the appropriate measurement table (the standard Measurement table, or the Aggregation Measurement table)

  • If there is no data for any dates in the aggregation period and previously aggregated measurements exist, those measurements are deleted to indicate the absence of data.

  • It updates the Most Recent Measurement Date/Time and Latest Measurement Date/Time values on the Aggregation Measuring Component.