All Products
Search
Document Center

DataWorks:Composite metric

Last Updated:Nov 27, 2023

A derived metric collects only statistics about a business activity within a specific period of time and cannot meet the requirements of users for calculating items such as growth rates and data value differences. For example, you cannot use a derived metric to calculate week-on-week growth rates for a business activity. To resolve this issue, DataWorks provides composite metrics that are calculated based on specific derived metrics and calculation rules. Composite metrics are fine-grained metrics that can help you collect statistics about your business in a flexible manner. This topic describes how to create and use a composite metric.

Prerequisites

  • Derived metrics are created. A composite metric is calculated based on derived metrics. For more information, see Create a derived metric.

  • A data layer is created. A data layer is used to store composite metrics. You can create the following types of data layers. For more information, see Create a data layer.

    • Common layer

    • Application layer

  • A business process, data mart, or subject area is created. A business process is used to determine the category of business data that is collected by using a composite metric. A data mart or subject area is used to determine the category of data that is collected by using a composite metric for a specific scenario or product. The object that you must create depends on the data layer at which you want to create a composite metric.

    • If you want to create a composite metric at a common layer, you must create a business process. For information about how to create a business process, see Business process.

    • If you want to create a composite metric at an application layer, you must create a data mart or subject area. For information about how to create a data mart or subject area, see Data mart or Subject area.

Go to the Composite Metric page

  1. Go to the Data Modeling page.

    Log on to the DataWorks console. In the left-side navigation pane, choose Data Modeling and Development > Data Modeling. On the page that appears, select the desired workspace from the drop-down list and click Go to Data Modeling.

  2. In the top navigation bar of the Data Modeling page, move the pointer over More and select Data Metric. The Derived Metric page appears.

  3. In the left-side navigation pane, click Composite Metric to go to the Composite Metric page.

Create a composite metric

On the Composite Metric page, perform the steps shown in the following figure to create a composite metric.

image.png

You can configure the parameters based on the following descriptions:

  • Computing Logic

    DataWorks provides two methods that you can use to define the statistical criterion of a composite metric:

    • Expression: This method is flexible. You can configure a calculation expression based on your business requirements and use at signs (@) to reference the derived metrics or composite metrics that you want to use.image.png

    • Comparison: This method is used to calculate the result of comparison for data in the same cycle, or the result of comparison between data in the current cycle and data in the previous cycle. If you select this method, you must select a derived metric and a comparison cycle.

  • Basic Information

    You can set the Data Layer parameter to Application Layer or Common Layer based on your business requirements and configure the remaining parameters as required. You can view the parameters that need to be configured in the DataWorks console.

After the preceding configuration is complete, save and submit the composite metric. Only composite metrics that are submitted can be referenced in other metrics.

Note
  • You can submit only composite metrics that are saved.

  • Each time you submit the same composite metric, a new version is generated for the composite metric. Each version of a composite metric can be submitted only once.

Manage the versions of a composite metric

You can click Version Management in the right-side navigation pane of the configuration tab of a composite metric to view the versions of the composite metric and perform the following operations.image.png

  • Compare versions

    You can compare the selected versions. If you select only one version for comparison, the system compares the selected version and the current settings that are saved for the metric.

    Note

    You can select a maximum of two versions for comparison.

  • Roll back settings

    You can roll back the settings displayed on the configuration tab of the metric to a version that you select. After you click Roll Back in the Actions column that corresponds to a selected version, the settings displayed on the configuration tab of the metric are overwritten by the selected version.

    Note

    The rollback operation only rolls back the settings displayed on the configuration tab of the metric to the selected version. If you want to reference the latest settings of the metric when you create a derived metric or table, save and submit the settings again.

Perform an operation on multiple composite metrics at a time

  • Export multiple composite metrics at a time: You can use one of the following methods to export multiple composite metrics at a time.

    image.png

    • Export All: You can click Export All on the page that displays the composite metric list to export all composite metrics in the current workspace.

    • Export Searched Objects: You can enter a keyword in the search box on the page that displays the composite metric list to search for required composite metrics, click Batch Export, and then select Export Searched Objects. Then, all composite metrics that are displayed in the search result are exported.

      Note

      Fuzzy match is supported. After you enter a keyword in the search box and click the search icon, all composite metrics whose names contain the keyword are displayed.

    • Export Selected Objects: You can select the composite metrics that you want to export on the page that displays the composite metric list, click Batch Export, and then select Export Selected Objects to export the selected composite metrics at a time.

    After the composite metrics are exported, you can download the export file to your on-premises machine.

  • Delete or submit multiple composite metrics at a time

    If you want to delete multiple composite metrics that are no longer required at a time or submit multiple composite metrics at a time, you can perform the operation on the page that displays the composite metric list.

    image.png

    • Batch Delete: You can select the composite metrics that you want to delete on the page and click Batch Delete to delete the composite metrics at a time. The deleted composite metrics cannot be referenced and used by tables. If a composite metric is referenced by a table, you must remove the reference relationship before you delete the composite metric.

    • Batch Submit: You can select the composite metrics that you want to submit on the page and click Batch Submit to submit the composite metrics at a time. After the composite metrics are submitted, new versions are generated for the composite metrics. Only composite metrics that are submitted can be referenced and used by tables. For more information about version management operations, see Manage the versions of a composite metric.