All Products
Search
Document Center

DataWorks:Data warehouse layering

Last Updated:Sep 18, 2025

Data warehouse layering defines the architecture and hierarchy of your data model based on business scenarios, data, and system usage. It is used to classify and assign data with different purposes to distinct layers, helping you better organize, manage, and maintain your data.

Layer categories

DataWorks provides the following layer categories: Data Import Layer, Common Layer, Application Layer. Assign layers to the appropriate categories to present a hierarchical structure. The following figure uses the default five-layer data architecture as an example. After you plan the data layers, you can store tables in different layers according to your planning.

image
  • Data Import Layer: Ingests source data from databases, logs, and message queues. After ETL, the data is stored in this layer. You can load only source tables to this layer.

  • Common Layer: Processes and integrates data from the data import layer, establishes unified metrics and dimensions, and builds reusable detail-level fact data and summary data for analysis and statistics. You can attach fact tables, dimension tables, and aggregate tables to this layer category. Data domains and business processes are managed in this layer.

  • Application Layer: Accesses the processed and integrated data from the common layer to produce personalized metrics and reports for specific applications or products. You can attach application tables and dimension tables to this layer. Data marts and subject areas fall under the scope of this layer.

Define data warehouse layers

Built-in layers

By default, DataWorks provides five layers: Operational Data Store (ODS)Dimension (DIM)Data Warehouse Detail (DWD)Data Warehouse Summary (DWS), and Application Data Service (ADS).

The functions of each layer are as follows:

ODS

The ODS layer receives and stages raw data for the data warehouse. The table structures in this layer are identical to those in the source data systems, serving as a staging area for the data warehouse. The ODS layer performs the following operations on raw data:

  • Synchronizes raw structured data to the data warehouse, either incrementally or in full.

  • Structures raw unstructured data, such as log information, and stores it in the data warehouse.

  • Ensures table names in this layer start with ods.

DWD

The DWD layer models business events at the most granular level. You can denormalize data tables by adding key dimension attributes. This practice reduces the need for joins between fact and dimension tables, improving query performance.

DWS

The DWS layer builds data models based on the subjects of analysis. It creates public aggregate tables to support upstream metric needs.

For example, user behavior from the ODS layer can be pre-classified and aggregated to derive common dimensions such as timeIP address, and ID. This data can be used to calculate metrics, such as the number of products a user purchased from different IP addresses during various time periods.

In the DWS layer, you can perform additional lightweight aggregations to improve calculation efficiency. For example, applications can use these daily aggregates to calculate behavior metrics for 7-day, 30-day, and 90-day periods, which can save considerable processing time.

ADS

The ADS layer stores custom statistical metrics for data products and is used to generate various reports. For example, an e-commerce company could report on the sales volumes and rankings of various sports balls sold in Singapore between June 9 and 19.

DIM

The DIM layer builds data models using dimensions. Based on actual business needs, it can store dimension tables from logical models or dimension definitions from conceptual models. By defining dimensions, specifying primary keys, adding dimension attributes, and associating different dimensions, you can build consistent enterprise-wide dimension tables for analytics. This helps reduce risks associated with inconsistent data calculation logic and algorithms.

Custom layers

Go to the Data Warehouse Layering page to view the preset data warehouse layers. Switch between Tiled Display and Hierarchy Display to adjust the page layout.

If the preset layers do not meet your needs, create custom layers:

  1. Click Create and configure the basic information for the layer in the Create Data Layer panel. Key parameters are described below:

    Parameter

    Description

    Category

    Used with Model Type. It assigns the layer to a category and associates model types with the layer category.

    Note

    After you set Category, you cannot change it.

    Model Type

    Used with Category. It attaches the corresponding model types to different layer categories.

    1. Data Import Layer: You can attach only source tables.

    2. Common Layer: You can attach fact tables, aggregate tables, dimension tables, and dimensions. Dimension tables and dimensions can be attached separately or together.

    3. Application Layer: You can attach application tables, dimension tables, and dimensions. Dimension tables and dimensions can be attached separately or together.

    Note

    After you set Model Type, you cannot change it.

    Description

    Enter a description for the data warehouse layer. This helps users quickly understand its purpose and ensure data is stored in the correct layer.

  2. Delete a layer. If a layer contains data tables, you must delete all tables before you can delete the layer.

Configure data warehouse layer checkers

Data warehouse layer checkers enforce naming conventions for models and metrics. When you create a model or metric, the checker can automatically generate an object name, making the physical table name easy to understand.

  1. Click the target layer to go to its details page.

  2. In the Checker Management section, click Create Rule and select Create Rule for Model or Create Rule for Metric.

  3. The checker parameters are described in the following tables.

    Create Rule for Model

    Configuration item

    Description

    Rule Name

    The name of the new checker rule.

    Rule Type

    Defaults to Name. When you create a model in Dimensional Modeling, you can select the corresponding checker to automatically generate a table name.

    Rule Definition

    Define the naming convention for the data model. This rule is used to check the model names within the layer during Dimensional Modeling.

    • Enter a prefix for the table to check against. For example, if the data warehouse layer requires table names to start with dim, you can enter dim.

    • You can also click the 新建 icon to define the rule using elements such as business category abbreviation, data domain abbreviation, data mart abbreviation, or subject area abbreviation. You can combine these elements freely.

    • The following are recommended naming conventions:

      • DIM: dim_{business_category}_{data_domain}_{custom_content}_{storage_policy}

      • DWD: dwd_{business_category}_{data_domain}_{business_process}_{custom_content}_{storage_policy}

      • DWS: dws_{business_category}_{data_domain}_{custom_content}_{time_period}

      • ADS: ads_{business_category}_{data_mart}_{subject_area}_{custom_content}_{time_period}

    Description

    The description of the checker.

    Create Rule for Metric

    Configuration item

    Description

    Rule Name

    The name of the new checker rule.

    Rule Type

    Configurable for Display Name or Abbreviation. When you create a metric, the system generates a metric name based on the default rule.

    Rule Definition

    Define metric names by selecting a modifier, atomic metric, and statistical period in any order. In Data Metric, this rule checks metric names within the layer.

    Description

    A description of the checker.

  4. Set the default checker.

    In Default Rule, set a default checker for models or metrics. If no rule is specified when you create a model or metric, the default checker automatically generates names.

  5. Weak and strong rules.

    1. Weak Rule: If a naming checker is set as a weak rule, you can bypass the rule and still save the model with a custom table name.

    2. Strong Rule: If a naming checker is set as a strong rule, you must adhere to the naming convention when creating a model or metric. Otherwise, you cannot save the model or metric.

Use data warehouse layers

After setting up layers, you can go to Dimensional Modeling or Data Metric, select the appropriate data warehouse layer, and create logical models or metrics.

Use checkers

  1. Use in Dimensional Modeling or Data Metric.

    1. Dimensional Modeling

      1. Auto-generate a table name: When creating a logical model, select a checker in Naming Rule. The system suggests a name based on the rule.

      2. Validate table names: When creating or editing a table name, if you do not select a checker, the system checks whether the table name conforms to the checker rules when you save the logical model.

      3. If multiple checkers exist, validation passes if the name conforms to any one of them.

    2. Data Metric

      1. Auto-generate a metric name: When creating a derived metric, select PeriodModifiers, and Atomic Metric, then click Intelligent Recommendation. The system will automatically generate metric names based on the default rule.

      2. Validate table names: When creating or editing the Abbreviation and Display Name of a metric and saving it, the system automatically checks if the entered names conform to the checker rules.

      3. If there are multiple checkers, the validation passes as long as the name conforms to any one of them.

  2. Start Check and View Results.

    After configuring a checker, click Start Check to verify whether the data model names in the current layer conform to the naming conventions. You can then address any non-compliant models based on the results.

    Note
    • The Start Check function is not currently supported for metric rules.

    • Checks run only for enabled checkers. New checkers are enabled by default. If you do not need to use a checker, you can disable it to prevent it from running checks.

    After the check is complete, click View Results to review the check results.

Next steps

After completing these steps, you can proceed to Data Standard to define standards, or go to Dimensional Modeling and Data Metric to develop models and metrics.

If your data warehouse is large and involves cross-team collaboration, you can share your planned warehouse structure with other workspaces. For configuration details, see Modeling workspace.