All Products
Search
Document Center

DataWorks:Atomic metrics

Last Updated:Jul 03, 2026

An atomic metric defines the business definition and calculation logic for a business activity. You create it based on a business process to quantify a specific outcome of that activity. For example, if the business activity is a purchase, the atomic metric can be the payment amount.

Prerequisites

A data domain and a business process are required to define the business activities to analyze. For more information, see Business planning.

Overview

An atomic metric is the smallest unit of measurement in Intelligent Data Modeling. It defines what to calculate and how to calculate it for a given business behavior.

An atomic metric consists of two parts:

  • Basic information: The fundamental attributes and business definition. This is typically a numeric field in a fact table, such as amt (amount).

  • Calculation logic (Aggregation Function): The calculation method, such as SUM (sum), COUNT (count), AVG (average), MAX (maximum), or MIN (minimum).

The core characteristic of an atomic metric is that it is indivisible. Its definition does not include business qualifiers such as time periods or channel sources. It serves as the foundation for building derived metrics and compound indicators.

Create an atomic metric

  1. Go to the Atomic Metric page.

    1. Log on to the DataWorks console. In the target region, click Data Development and O&M > Data Modeling in the left-side navigation pane. Select a workspace from the drop-down list and click Go to Data Modeling.

    2. On the Data Modeling page, click Data Metrics in the top navigation bar.

    3. On the Data Metrics page, click Atomic Metric in the left-side navigation pane to go to the Atomic Metric page.

  2. Create an atomic metric.

    1. On the Atomic Metric page, click the 新建 icon to create an atomic metric.

  3. Configure the atomic metric.

    1. Configure basic information.

      Refer to the following table for the basic information parameters of the atomic metric.

      Parameter

      Description

      Abbreviation

      The abbreviation of the atomic metric. This value is the unique identifier for the metric and cannot be changed after creation.

      Name

      The name of the atomic metric.

      Use a descriptive name that clearly conveys the metric's purpose.

      Display Name

      The display name of the atomic metric.

      Use a descriptive name that clearly conveys the metric's purpose.

      Effective Scope

      Defines the statistical scope of the business activity measured by the atomic metric, helping prevent ambiguity during analysis.

      For example, the business definition for actual order payment amount can be: The total amount that a user pays through a payment channel after an order is generated. This amount is the total sum that the user actually pays after all discounts and coupons are applied.

      Business Category

      A business category can be associated with a data domain or a data mart.

      Business Process

      The business process to which the atomic metric belongs, specifying the business activity to analyze.

      Owner

      The owner of the atomic metric. By default, the owner is the user who creates the metric.

      Description

      The description of the atomic metric.

    2. Configure calculation logic.

      The calculation logic defines only the calculation method and unit for the atomic metric. You must write code to implement and execute the actual calculation. The following table describes the parameters.

      Parameter

      Description

      Function

      Select the aggregation function for the metric calculation.

      Decimal Places

      The number of decimal places, determined by the selected measurement unit. For example, if you measure a payment amount in yuan, set the number of decimal places to 2.

      Data Unit

      Select a measurement unit based on the data type of the atomic metric. For example, for a payment amount, you can select currency unit.

      Note

      If existing unit types do not meet your needs, you can create a new one on the measurement unit page. For more information, see measurement unit.

      Deduplication

      Specifies whether to deduplicate values during statistical analysis. For example, if the atomic metric is the number of members, you must remove duplicates instead of simply summing the values.

  4. Click Save.

  5. Click Submit to publish the current version of the atomic metric. Only submitted atomic metrics can be referenced by models and derived metrics.

    Note
    • Only saved atomic metrics can be submitted.

    • Each submission of an atomic metric generates a new version. A submitted version cannot be modified or resubmitted.

Version management and associated tables

In the right-side navigation pane of the metric editor page, you can manage versions and view associated tables.

Actions

Description

Manage metric versions

View all versions of the metric. You can also perform the following operations:

  • Version Comparison

    Compare the content differences between selected versions. You can select up to two versions for comparison. If you select only one version, it is compared with the currently saved metric content.

  • Roll Back

    Revert to a specific metric version. This action overwrites the metric editor page with the content of the target version.

    Note

    The rollback only updates the editor's configuration to the selected version. To have models and derived metrics reference the latest configuration, you must save and submit the metric again.

View associated tables

View the model table fields associated with the metric. Click View Details next to a field to go to its model table details page.

Import atomic metrics

To create many atomic metrics at once, use the batch import feature. DataWorks provides a template that you can fill out and upload to import multiple atomic metrics.

  1. On the Atomic Metric page, hover over the 导入 icon and click Import from Excel.

    For information about how to navigate to the atomic metric page, see the steps in the "Create an atomic metric" section.

  2. Select an import type and download the template.

    On the Confirm Import Type tab, select an import type, download the template, and fill it out.

    Note

    After you select an import type, you can preview the template to prepare the required content.

    The atomic metric import template includes the following fields: Business category, Business process, Abbreviation, Display name, Name, Function, Decimal places, and Measurement unit.

  3. Import and confirm the data.

    On the Data Import tab, upload and preview the data file. You can choose to show only fields that share names with existing fields in DataWorks, and then delete or modify the duplicates.

    • The Import Mode and Import Status are determined by the selected import type.

      • Import Mode: If an imported object has the same name as an existing object in DataWorks, you can either skip the import or overwrite the existing object.

      • Import Status:

        • Import and Save: Imports and saves the data without creating a new version.

        • Import and Submit: Imports the data and submits it as a new version.

    • Batch import supports only .xlsx files. You can import up to 30,000 data records at a time, and the file size cannot exceed 10 MB.

    The file preview table includes the following columns: Business category, Business process, Abbreviation, Display name, Name, Function, Decimal places, and Measurement unit. After you confirm that the data is correct, click confirm import.

  4. View the import result.

    On the Complete tab, you can view the import details. In the details list, click View More Details next to an atomic metric to go to its editor page. If the import fails, you must handle the exception based on the error details and import the data again.

Export atomic metrics

To export a large number of atomic metrics, use the batch export feature. On the atomic metric list page, click export all in the top toolbar to export all metrics, or select the checkboxes of specific metrics and click batch export to export only those.

  1. Go to the atomic metric list page.

    On the atomic metric page, double-click the image icon above the left-side directory tree to go to the atomic metric list. On this page, you can view all created atomic metrics.

  2. Select the metrics to export.

    Note

    This step is not required if you use the Export All option.

    You can select metrics in the following two ways:

    • Search by keyword: Enter a keyword in the search box to find the desired metrics.

      Note

      Fuzzy search is supported. After you enter a keyword, all atomic metrics whose names contain the keyword are displayed.

    • Select directly: Select the checkboxes of the required metrics.

  3. Batch export the atomic metrics.

    You can export metrics in one of the following three ways:

    • Export All: Exports all atomic metrics that have been created in the current workspace.

    • Export Searched Objects: First search for the desired metrics by entering a keyword in the search box. This method exports all matching results.

    • Export Selected Objects: First select the desired metrics. This method exports all selected metrics.

  4. View and download the export result.

    After you start an export task, you are automatically redirected to the Atomic Metric Export Status Details page to view the export status. After the export succeeds, click Download File to download the atomic metrics to your local device.

Batch delete and submit

If you have multiple unused atomic metrics or metrics that have been saved but not submitted, go to the atomic metric list page to perform batch deletions or submissions.

  1. Go to the atomic metric list page.

    On the atomic metric page, double-click the image icon above the left-side directory tree to go to the atomic metric list. On this page, you can view all created atomic metrics.

  2. Select the metrics for the batch operation.

    Note

    For a batch submission, you can select only atomic metrics that have been saved but not submitted.

  3. Choose to batch delete or batch submit the metrics.

    • Batch Delete: Deleted metrics cannot be associated with or referenced by models and derived metrics.

      Note

      If an atomic metric is referenced by a model or derived metric, you must remove the reference before you can delete the metric.

    • Batch Submit: Submitted metrics can be associated with and referenced by models and derived metrics. This action also generates a new version record. For more information about metric versions, see Version management and associated tables.

Next steps

After you create atomic metrics, you can reference them in derived metrics and models to measure values across specific time periods, dimensions, and business conditions. For more information, see derived metrics and materialized logical models.