All Products
Search
Document Center

DataWorks:Relationship diagram

Last Updated:Sep 04, 2023

DataWorks Data Modeling provides the relationship diagram feature. This feature can help you quickly build an architecture for models in your data warehouse to show the relationships between models such as dimensions, dimension tables, fact tables, aggregate tables, and application tables in the data warehouse. Each relationship diagram displays relationships between models in one data warehouse. You can create multiple relationship diagrams within one Alibaba Cloud account. This topic describes how to use the relationship diagram feature.

Prerequisites

Required models are created. DataWorks Data Modeling supports multiple types of models. You must create models based on your business requirements in advance. DataWorks supports the following types of models:

  • Conceptual model - dimension: A dimension is a perspective from which you observe your business. You can plan and create a dimension in Dimensional Modeling and associate the dimension with a dimension table when you create the dimension table. This way, you can analyze the business data stored in the dimension table from this dimension.

  • Logical model - dimension table: You can extract dimensions that may exist during analysis of data in data domains based on your planning on data domains. Then, you can store dimensions and their attributes in a dimension table.

  • Logical model - fact table: You can sort and analyze actual data that may be generated in business processes based on your planning on business processes. Then, you can store the actual data as fields in a fact table.

  • Logical model - aggregate table: An aggregate table is used to store statistical data of multiple derived metrics that have the same statistical period and dimension in a data domain. An aggregate table is obtained based on business abstraction and sorting results of business data and can be used as a basis for subsequent business queries, online analytical processing (OLAP) analysis, and data distribution.

  • Logical model - application table: An application table is used to organize statistical data of multiple atomic metrics and derived metrics of the same statistical period and dimension, or statistical data of specific granularities. An application table can be used as a basis for subsequent business queries, OLAP analysis, and data distribution.

Note

Before you create models, you must create the required items, such as data layers, business categories, and data domains. For more information about the relationships among these items, see Overview.

Go to the entry points of creating a relationship diagram

  1. Go to the Data Modeling page.

    Log on to the DataWorks console. In the left-side navigation pane, choose Data Modeling and Development > Data Modeling. On the page that appears, select the desired workspace from the drop-down list and click Go to Data Modeling.

  2. Go to the Relationship Diagrams page.

    In the top navigation bar of the Data Modeling page, click more and select Data Diagram to go to the Relationship Diagrams page.

    The first time you use the relationship diagram feature, you can create a relationship diagram from the entry points shown in the following figure.

    image.png

Use the relationship diagram feature to build an architecture for models in a data warehouse

On the Relationship Diagrams page, you can perform the following operations to create a relationship diagram:

  • Drag the models that you want to use from the model list on the To-Be-Added Objects tab to the canvas and draw lines to connect the models to build a relationship diagram for the models. If you want to use the relationship diagram on your on-premises machine, you can click Export above the canvas to export the relationship diagram after the relationship diagram is built.

  • Add notes and descriptions and group the models in the canvas. This way, you can easily understand and view the architecture of the models.

The following figure shows a sample relationship diagram.

Note
  • The model list displayed on the To-Be-Added Objects tab is the same as the model list displayed on the Dimensional Modeling page.

  • After you drag a model to the canvas, you can click the image.png icon, click a model, and then click the Model Details icon that is displayed above the model to go to the details page of the model and view the details of the model. For more information about icons in the canvas, see Icons for relationship diagrams.

image.png

Icons in the canvas

The icons in the canvas are classified into two types: icons that represent the types of elements and icons that allow you to perform specific operations. The following tables describe the icons.

  • Icons that represent the types of elements

    Icon

    Description

    image.png

    Represents a dimension.

    image.png

    Represents a fact table.

    image.png

    Represents a dimension table.

    image.png

    Represents an application table.

    image.png

    Represents an aggregate table.

    image.png

    Represents a note. You can use a note to record information about models. This facilitates subsequent model searches and use. For example, you can use a note to record the method that is used to build an architecture for models.

  • Icons that allow you to perform specific operations

    Icon

    Description

    image.png

    Allows you to select an element in the canvas. After you select an element in the canvas, you can perform operations on the element, such as viewing, editing, dragging, or deleting the element.

    image.png

    Allows you to add a description for the architecture for models in the blank area of the canvas. For example, you can add a description for the name and features of the architecture for models.

    image.png

    Allows you to add a note in the blank area of the canvas.

    image.png

    Allows you to draw lines to connect the selected models. The arrow represents the direction of a connection. You can double-click a line to add a description.

    image.png

    Allows you to group the selected models. You can specify a name and a color block for a model group. The color blocks that represent different model groups are placed at the bottom layer of a relationship diagram.

    image.png

    Displays a list of the shortcut keys that are supported by DataWorks. You can use the shortcut keys to perform operations in the canvas.

    For example, you can press Ctrl+Z to cancel an operation.

    移动画布.png

    Allows you to move the canvas.

    编辑.png

    Allows you to edit text or a note.

    删除项.png

    Allows you to delete an element from the canvas.

    Note

    If the element that you want to delete is associated with other elements, the associated elements are also deleted when you delete the element.

    视图-刷新.png
    • Refresh icon on the To-Be-Added Objects tab

      If you make changes to the data warehouse or data source in the current workspace, such as creating a table in Dimensional Modeling, you can click the Refresh icon on the To-Be-Added Objects tab to refresh the model list.

      Note

      After you click the Refresh icon on the To-Be-Added Objects tab, only the model list is refreshed. The elements in the canvas are not affected.

    • Refresh icon in the canvas

      You can click the Refresh icon in the canvas to refresh the current relationship diagram.

    视图-搜索.png

    Allows you to search for the desired element in the canvas by keyword.

    You can search for an element in the canvas by display name, name, code, and UUID. You can also search for text or a note by content.

    Note

    After you enter a keyword in the search box, Data Modeling performs a fuzzy match based on the keyword and displays all matched results.