All Products
Search
Document Center

DataWorks:Atomic metrics

Last Updated:Mar 26, 2026

An atomic metric is the smallest, indivisible unit of measure in DataWorks intelligent data modeling. It defines *what* to measure and *how* to calculate it—capturing the aggregation logic for a single business activity without any business filters such as time periods or channel sources.

Because an atomic metric contains no filters, the same atomic metric can be reused across any number of derived metrics with different filtering conditions. For example, a single payment_amount atomic metric (using SUM aggregation) serves as the foundation for derived metrics like "monthly payment amount by channel" or "quarterly payment amount in the Chinese mainland."

Atomic metrics are the building blocks of the DataWorks metric hierarchy: atomic metrics → derived metrics → compound indicators.

Prerequisites

Before you begin, ensure that you have:

How it works

An atomic metric has two components:

  • Basic information: The business definition of the metric, typically tied to a numeric field in a fact table. For example, amt (amount).

  • Calculation logic (aggregation function): The aggregation method applied to that field. Supported functions: SUM, COUNT, AVG, MAX, and MIN.

The calculation logic defines only the calculation method and unit for the atomic metric. In practice, you must write code based on the defined calculation logic to perform the actual calculation.

Create an atomic metric

Go to the Atomic Metric page

  1. Log in to the DataWorks console. In the top navigation bar, select a region. In the left-side navigation pane, choose Data Development and O&M > Data Modeling.

  2. Select a workspace from the drop-down list and click Go to Data Modeling.

  3. On the Intelligent Data Modeling page, click Data Metric in the top navigation bar.

  4. In the left-side navigation pane, click Atomic Metric.

Configure and save the metric

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

  2. Configure the Basic information section.

    ParameterDescription
    AbbreviationThe unique identifier of the metric. Cannot be changed after creation.
    NameThe English name of the atomic metric. Use the English term for the value the metric measures.
    Display NameThe Chinese name of the atomic metric.
    Effective ScopeThe business definition of what the metric measures. Prevents ambiguity in statistical analysis. Example: *"The total amount paid by users through payment channels after an order is generated, after all coupon discounts are deducted."*
    Business CategoryAssociates the metric with a data domain or data mart.
    Business ProcessThe business process this metric belongs to. Specifies the business activity for statistical analysis.
    OwnerThe metric owner. Defaults to the user who creates the metric.
    DescriptionAdditional description for the metric.
  3. Configure the Calculation logic section.

    ParameterDescription
    FunctionThe aggregation function: SUM, COUNT, AVG, MAX, or MIN.
    Decimal PlacesThe number of decimal places, determined by the measurement unit. For example, set to 2 for amounts in yuan.
    Data UnitThe measurement unit matching the metric's data type. For payment amounts, select Currency Unit. To create a custom unit, go to the measurement unit page. See Measurement unit.
    DeduplicateWhether to remove duplicates during calculation. For metrics like "number of members," enable deduplication to avoid double-counting.
  4. Click Save.

  5. Click Submit to publish the metric.

Atomic metrics must be submitted before derived metrics or models can reference them. Each submission creates a new version. A version that has already been submitted cannot be submitted again—save your changes first to create a new submission.

Manage versions and associated tables

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

OperationDescription
Version ManagementView all versions of the metric. Select up to two versions to compare their differences. Selecting only one version compares it against the currently saved content.
Roll BackRevert the metric editing page to a previous version. After rolling back, save and submit again to update any models or derived metrics that reference this metric.
Associate TablesView the model table fields associated with this metric. Click View Details to open the model table details page.

Import atomic metrics

To create many atomic metrics at once, use batch import.

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

  2. On the Confirm Import Type tab, select an import type, then download and fill in the corresponding template.

    导入原子指标

  3. On the Data Import tab, upload the completed file and preview the data. For fields whose names already exist in DataWorks, choose to skip or overwrite them. Configure the import behavior:

    Batch import supports .xlsx files only. The maximum file size is 10 MB, and each import can include up to 30,000 records.
    SettingOptions
    Import ModeSkip: Ignores imported objects whose names already exist. Overwrite: Replaces existing objects.
    Import StatusImport And Save: Saves the data without creating a new version. Import And Submit: Saves the data and submits it as a new version.

    导入原子指标

  4. On the OK tab, review the import results. Click View More Details next to a metric to open its editing page. If the import fails, resolve the errors listed and try again.

Export atomic metrics

To export multiple metrics, use batch export.

  1. On the Atomic Metric page, double-click the image icon above the left-side directory tree to open the atomic metric list.

  2. Select the metrics to export. Use keyword search (fuzzy search is supported) or select metrics directly from the list. Skip this step if you plan to use Export All.

  3. Export the metrics using one of the following options:

    • Export All: Exports all atomic metrics in the current workspace.

    • Export Searched Objects: Exports all metrics matching your search keyword.

    • Export Selected Objects: Exports the metrics you selected.

  4. On the Details of Export Status of Atomic Metric page (shown automatically after the export starts), monitor the export status. When the export succeeds, click Download File to save the file locally.

Batch delete and submit atomic metrics

To delete or submit multiple metrics at once, use the atomic metric list.

  1. On the Atomic Metric page, double-click the image icon above the left-side directory tree to open the atomic metric list.

  2. Select the metrics for the batch operation.

    For batch submission, only metrics that are saved but not yet submitted are eligible.
  3. Choose the batch operation:

    • Batch Delete: Removes the selected metrics. Deleted metrics can no longer be referenced by models or derived metrics. If a metric is currently referenced, remove the reference before deleting it.

    • Batch Submit: Submits the selected metrics so they can be referenced by models and derived metrics. Each submission generates a new version record. See Manage versions and associated tables.

What's next

After creating an atomic metric, it can be referenced by derived metrics and models to retrieve the value of a target metric for specific times, dimensions, and business conditions. See Derived metrics and Publish a model to a compute engine.