Compare aggregate metrics
Compare aggregate metrics let you track the degree to which two similar aggregate metrics behave the same. Although it is possible to create a compare aggregate metric that compares aggregate metrics you just created, we recommend comparing existing metrics that you already understand. This will help ensure that you get the comparison you want, and that the metrics you compare to each other already have data.
A compare aggregate metric always compares the most recent pair of datapoints from the metrics you compare— the datapoints with the last timestamp when both metrics collected data. If either of the metrics is paused, the compare aggregate metric also pauses, and it resumes when both of the aggregate metrics are live.
Create a Compare aggregate metric
-
In the Explorer tree, select the data asset that you want to measure.
-
On the asset's Explorer menu select + Create Metric:
-
A new metric opens at Step 1 of the metric configuration form. Under Metric Info, select Compare aggragate.
-
Enter a Metric name.
-
By default, new metrics go Live shortly after you create them. If you want the metric to start off paused, under Metric status, set Status to Paused.
-
If desired, change the value of Quality dimension. Each data quality metric measures one dimension of data quality: accuracy, completeness, timeliness, or (if none of these applies), custom. You can sort and filter your metrics by dimension, and you can view them summarized by dimension in a data quality dashboard.
-
Select Next. Step 2 (Configure Metric) appears in the main form:
- Under Datasource and target, select datasources, schemas, and tables for Source and Target. Your choices determine what metrics you can compare.
- To the right of Metrics to compare, select Add.
- In the Add Metrics modal, (1) select two metrics that have the same aggregation interval (these are the metrics you will compare), and then (2) select Add Metrics.
- Adjust the backfill duration.
- Add any tags, then select Next to proceed to Step 3, where you can preview and save your metric.
Preview
Once you have configured your metric you can preview it to view a live query without creating a datapoint. If the preview doesn't work the way you want, you can select the tab for a previous step and modify the configuration as needed.
- On the Step 3 (Preview) tab, set the date range for the preview, then select Preview.
- When you're happy with the result, select Next to continue.
You don't have to preview your metric— you can just click Next to proceed to Step 4 (Related metrics).
Note:
- A Compare Aggregate Metrics metric produces a table rather than a chart.
- The table shows the difference % between the source and target metric for each metric pair, for a given time period (aggregation interval).
- Below the table a timeline control lets you choose the time period displayed in the table.
Add Related metrics
You add related metrics at Step 4 of metric configuration. Related metrics always appear in the list of metrics available during incident analysis.
- To add a related metric, select Add + and then choose a metric in the listbox that appears.
- Select Show info inside a related metric to display the metric's ID and data asset(s).
- When you've added the related metrics you want, select Create (for a new metric) or Save.
- During incident analysis of the metric, any related metrics appear in the metrics listed on the left. You can then easily add them to the Metrics of interest, making the metric chart available within the incident.
Result
After configuring a compare aggregate metric and adding a monitor, the explorer will display as follows. Incidents will be flagged in the 'Difference(%)' column, with a yellow alert icon for metrics and/or slices with incidents present.
Updated 3 months ago