A dimension table consists of the data of a specific dimension. For example, if you want to analyze product sales, you can use the product category and time as dimensions and create a product dimension table and a time dimension table. This topic describes how to create a dimension table.

Prerequisites

  • A data layer is created. Each data layer stores tables that serve the same purpose. This helps you easily find and use tables. In most cases, dimension tables are stored at the dimension (DIM) layer. You can also store dimension tables at other data layers based on your business requirements. For more information about how to create a data layer, see Create a data layer.
  • A data domain is created. A data domain determines the type of business data that can be stored in a dimension table. For more information about how to create a data domain, see Data domain.

Background information

Dimension tableAs illustrated in the preceding figure:
  • When you create a dimension table, take note of the following points:
    • You can specify the business category and data domain that are analyzed by using the dimension table. This way, you can view the dimension tables of a specific business category or data domain in the future.
    • You can specify the data layer that stores the dimension table when the dimension table is used for data modeling analysis. In most cases, dimension tables are stored at the DIM layer.
  • After you create a dimension table, you can add dimension attributes as fields in the dimension table. You can also associate the dimension table with fields of other dimension tables, partition the dimension table, and specify each field against a uniform data standard. This ensures consistent attributes for the dimension data across the entire data domain.
  • After you create and configure a dimension table, you can publish and materialize the dimension table to a compute engine. The dimension table can be used in the compute engine for data analysis.
  • After you configure a dimension table, you can directly associate and use the fields in the dimension table when you design and create derived metrics and aggregate tables.

Create a dimension table

  1. Go to the Data Modeling page.
  2. Go to the Dimensional Modeling page.
    In the top navigation bar of the Data Modeling page, click Dimensional Modeling.
  3. Create a dimension table.
    On the Dimensional Modeling page, click the Plus sign icon, select Create Dimension Table, and then specify the parameters that are described in the following table. Create Dimension Table
    Parameter Description
    Data Layer Set the parameter to the created data layer. The dimension table data is stored at the data layer when the dimension table is used in the future. For more information about how to create a data layer, see Create a data layer.
    Data Domain Set the parameter to the created data domain. For more information, see Data domain.
    Business Category Set the parameter to the created business category. For more information, see Business category.
    Storage Policy The policy that is used by a dimension table to store data. Valid values include Daily Increment (di) and Daily Full (df).
    Naming Rule Set the parameter to the configured checker. The parameter checks whether the names of tables at a data layer conform to the naming conventions that are specified in the checker. For more information about how to configure a checker, see Configure a data layer checker.
    Name The internal name of the table. The name can contain lowercase letters, digits, and underscores (_), and must start with a lowercase letter.
    Display Name The display name of the table. The display name can contain letters, digits, underscores (_), ampersands (&), and parentheses (). It must start with a letter or a digit.
    Lifecycle The lifecycle of the dimension table.
    Table Type Select a table type from the following options based on your business requirements:
    • Common Dimension Table: a common dimension table. You can select this option if you do not have special requirements.
    • Enumeration Dimension Table: a dimension table that supports enumeration, such as a gender dimension table.
    • Hierarchy Dimension Table: a dimension table in which fields are at different hierarchy levels. This type of dimension table supports metric roll-up and drill-down operations, such as a dimension table that contains the country, province, city, and county fields.
    Description The description of the dimension table.
  4. After you complete the configuration, click Save. You can view the dimension table in the left-side directory tree.

What to do next

After the table is created, you must configure field management, association, and partition management for the table, and publish the table to the corresponding environment. For more information, see Publish and manage a table.