A period is used to determine the time range or time window of the statistical data that is collected by a derived metric for a business activity, such as last one day or last calendar week. A period defines the time range of statistical data when you use a derived metric to collect statistical data on your business. This topic describes how to create a period.

Background information

An atomic metric, a period, and one or more modifiers constitute a derived metric that can reflect the status of a business activity of an enterprise. For more information about derived metrics, see Derived metric.

Create a period

  1. Go to the Period page.
    1. Log on to the DataWorks console.
    2. In the left-side navigation pane, click Workspaces.
    3. In the top navigation bar, select the region where your workspace resides. Find your workspace on the Workspaces page and click Data Development in the Actions column.
    4. On the DataStudio page, click the Icon icon in the upper-left corner and choose All Products > Data Modeling > Data Metric. The Derived Metric page appears.
  2. In the left-side navigation pane, click Period to go to the Period page.
  3. Create a period.
    1. On the Period page, click the Create icon to create a period.
      By default, DataWorks provides nine period granularities such as Day, Week, and Month. You can create finer-grained periods, such as last one day and last three weeks, based on the period granularity you selected and your business requirements. This way, you can use these finer-grained periods to quickly perform statistical analysis.
    2. Configure basic information for the period.
      Create a period
      Parameter Description
      Period Granularity The granularity to which the period belongs.
      Abbreviation The abbreviation for the name of the period. The abbreviation is the unique identifier of the period and cannot be modified after you create the period.

      The abbreviation can contain lowercase letters, digits, and underscores (_) and must start with a lowercase letter or digit.

      Name The name of the period.

      The name can contain letters, digits, underscores (_), and ampersands (&) and must start with a letter or digit.

      Display Name The display name of the period.

      The display name can contain letters, digits, underscores (_), ampersands (&), and parentheses () and must start with a letter or digit.

      Description The description of the period.

      The description can be a maximum of 1,024 characters in length.

  4. Click Save in the upper part of the configuration tab.

Import periods

If you want to create multiple periods, you can import the periods that you need to use. DataWorks provides a template for you to import periods. You can configure the required information about periods in the template file and import the file.

  1. On the Period page, move the pointer over the Import icon and click Import from Excel.
    You can refer to the steps described in the preceding section to go to the Period page.
  2. In the Import dialog box, configure Import Mode, download the template file, configure the required information about periods in the file, and then upload the file.
    Import
    1. In the Import dialog box, configure Import Mode.
      Ignore Existing Objects with Same Name is the only value of Import Mode. The value is selected by default and cannot be changed.
    2. Click Download Template to download the template file.
    3. In the downloaded template file, configure information such as Period Granularity, Abbreviation, and Display Name for periods and save the file.
      The following table describes the information you can configure in the template file.
      Parameter Description
      Period Granularity The granularity to which the period belongs.
      Abbreviation The abbreviation for the name of the period. The abbreviation is the unique identifier of the period and cannot be modified after you create the period.

      The abbreviation can contain lowercase letters, digits, and underscores (_) and must start with a lowercase letter or digit.

      Name The name of the period.

      The name can contain letters, digits, underscores (_), and ampersands (&) and must start with a letter or digit.

      Display Name The display name of the period.

      The display name can contain letters, digits, underscores (_), ampersands (&), and parentheses () and must start with a letter or digit.

      Description The description of the period.

      The description can be a maximum of 1,024 characters in length.

      Owner Account ID The ID of the Alibaba Cloud account used to create the period.
      Note If you cannot edit the template file after you download it, click Start Edit in the upper part of the template file.
    4. Click Select File. Then, select the template file that you saved and click OK.
      You can view the import result and details in the Import dialog box. Import complete

What to do next

You can reference the created period, an atomic metric, and one or more modifiers when you create a derived metric. The derived metric can be used to collect statistical data on the values of an atomic metric within the period based on specific dimensions and business conditions. If you want to delete a period that is referenced by derived metrics, you must delete all the derived metrics before you can delete the period. For more information about how to reference a period when you create a derived metric, see Derived metric.