Creating Derivative Metrics

Derivative metrics are aggregated from the definitions, modifiers, and dimensions of atomic metrics. Therefore, their definitions, modifiers, and dimensions are derived from the attributes of atomic metrics as well.

Derivative metric = Atomic metric + Statistical Dimension + Time filter + General filter.

  • Atomic metric specifies the statistical standards, namely, the computing logic.
  • Statistical Dimension is the perspective to observe and analyze business data and assist in data aggregation, drilling, slicing, and analysis, and used as a GROUP BY condition in SQLs.
  • Time filter is a standard definition of a time condition.
  • General filter collects statistics on the business scope and select the records that meet the business rules (similar to the where clause in the SQL statement, excluding the time range).

Prerequisites

  • Before creating a derivative metric, ensure that an atomic metric has been created and approved.
  • If the derivative metric will use a statistical dimension or time filter, ensure that the dimension and time filter have been created and approved.

Creating and Publishing a Derivative Metric

  1. Log in to the DGC console, select a DGC instance, and click Access.

    On the displayed page, click the Workspaces tab. In the workspace list, locate the required workspace.

  2. Click Data Design of the corresponding workspace to access the Data Design console.
  3. Choose Technical Metrics from the left navigation bar and click the Derivative Metrics tab.
  4. Select a subject from the subject tree on the left and click Create.
  5. On the displayed page, set parameters as prompted.
    Figure 1 Creating a derivative metric
    Table 1 Parameters for creating derivative metrics

    Parameter

    Description

    Atomic Metric

    Select an atomic metric. Only approved atomic metrics are displayed in the drop-down list.

    Subject

    Subject information.

    Statistical Dimension

    Select one or more dimensions from the drop-down list. Only the dimensions in the fact table associated with the atomic metrics can be selected.

    Time Filter

    Select the required time filter from the drop-down list and select the associated field. Some time filters are preconfigured in the system. If the reconfigured time filters cannot meet the requirements, customize one. See Creating Time Filters for details,

    General Filter

    To set general filters, click Create to create one or more general filters.

    In the General Filter area shown in Figure 2, set the following parameters:

    • Filter Name specifies the name of a general filter.
    • Adding Condition (and) allows you to select And condition or Or condition to add a condition. After you specify the condition, select a field from the field drop-down list and set the parameters as prompted. You can add multiple conditions.

      You can click to delete the unwanted conditions.

    • Add Formula (and) allows you to select And Formula or OR formula to add a formula. Click Edit Formula if needed. In the displayed dialog box, select the required functions and fields and set the expression.

      You can click to delete the unwanted formulas.

    Figure 2 Setting a general filter

    Alarm Triggering Condition

    An alarm triggering condition consists of derivative metrics and expressions. An expression consists of alarm parameters and logical operators. When a metric is running, the system calculates the result of the alarm condition expression and determines whether to trigger the alarm based on the result of the expression. If the expression result is true, the alarm will be triggered. Otherwise, no quality alarm will be triggered.

    Description

    A description of the derivative metric to be created. Up to 600 characters are supported.

  6. In the lower part of the page, click Trial Run. In the dialog box that is displayed, click Trial Run to check whether the derivative metric can run properly.

    If the trial run fails, locate the fault based on the error message, correct the configurations, and click Trial Run to try again.

  7. If the trial run is successful, click Save and Publish.
  8. In the dialog box that is displayed, select a reviewer and click Confirm.
  9. (Optional) Create and publish other derivative metrics by repeating steps 3 to 8.
  10. Wait for the reviewer to approve the application.

    After the application is approved, the derivative metric is created.

Managing a Derivative Metric

On the Data Design console, choose Technical Metrics > Derivative Metrics. On the displayed page, you can edit, publish, suspend, or delete derivative metrics.

Figure 3 Managing derivative metrics
  1. Choose Technical Metrics from the left navigation bar and click the Derivative Metrics tab.
  2. Manage your derivative metrics as required. Refer to the following table for details.

    Operation

    Helpful Link

    Create

    Refer to step Creating and Publishing a Derivative Metric for details.

    Edit

    Refer to step 3 for details.

    Publish

    Refer to step 4 for details.

    View Publish History

    Refer to step 5 for details.

    Preview SQL

    Refer to step 6 for details.

    Suspend

    Refer to step 7 for details.

    Delete

    Refer to step 8 for details.

  3. Edit a derivative metric.
    1. Click Edit to the right of the derivative metric you want to edit. The Edit Derivative Metric page is displayed.
    2. Edit the derivative metric as required.
    3. In the lower part of the page, click Trial Run. In the dialog box that is displayed, click Trial Run to check whether the derivative metric can run properly.

      If the trial run fails, locate the fault based on the error message, correct the configurations, and click Trial Run to try again.

    4. If the trial run is successful, click Save and Publish.
  4. Publish a derivative metric.
    1. Click Publish to the right of the derivative metric you selected. The Submit for Publishing dialog box is displayed.
    2. Select a reviewer from the drop-down list.
    3. Click Confirm.
  5. View the publish history.
    1. Select a derivative metric in the list and choose More > View Publish History.
    2. On the displayed page, you can view the publish history and version comparison information of the metric.
  6. Preview a SQL statement.
    1. Select a derivative metric in the list and choose More > Preview SQL.
    2. On the displayed page, you can view or copy the SQL statement.
  7. Suspend a derivative metric.
    1. On the right of the derivative metric you want to suspend, choose More > Suspend. The Submit for Suspension dialog box is displayed.
    2. Select a reviewer from the drop-down list.
    3. Click Confirm.
  8. Delete a derivative metric.
    1. Select one or more derivative metrics in the list and click Delete in the upper left corner. The Delete Derivative Metric dialog box is displayed.
    2. Click OK.