All Products
Search
Document Center

DataWorks:Create and manage a dimension table

Last Updated:Jul 09, 2024

The dimension table feature allows you to create MaxCompute tables in the production environment, import data from your on-premises machine to MaxCompute tables, and modify MaxCompute tables in a visualized manner.

Prerequisites

  1. MaxCompute is activated. For more information, see Activate MaxCompute and DataWorks.

  2. A MaxCompute data source is added to your DataWorks workspace and is associated with DataStudio. For more information, see Add a MaxCompute data source and Preparations before data development: Associate a data source or a cluster with DataStudio.

  3. A MaxCompute table is created. For more information, see Create and manage MaxCompute tables.

Limits

  • To create a dimension table, you must be an administrator, an owner, or a developer of a DataWorks workspace. For more information, see Add workspace members and assign roles to them.

  • For a MaxCompute table that is created by using the dimension table feature, all fields in the MaxCompute table are of the STRING type. If you want to use fields of other data types, execute DDL statements to create a MaxCompute table on the DataStudio page. For more information, see Table operations.

Create a dimension table

  1. Go to the DataAnalysis page. For more information, see Overview.

  2. In the left-side navigation pane, click the 维表 icon to go to the dimension table page.

  3. In the New Dimension Table section of the dimension table page, click the 新建 icon.

  4. In the New Dimension Table dialog box, configure parameters.

    新建维表

    Parameter

    Description

    MaxCompute Project

    The MaxCompute project in which the dimension table is created.

    Table Name

    The name of the dimension table. A MaxCompute table in the production environment is created.

    Note

    The table name can contain only letters, digits, and underscores (_), and must start with a letter.

    Table Description

    The description of the table, such as the purpose or properties.

    Field

    The fields in the table. Only fields of the STRING type can be added.

    Lifecycle

    The lifecycle of the table. The table occupies storage resources in MaxCompute. To make sure that the resources can be recycled, select an appropriate lifecycle for the table from the Lifecycle drop-down list. If the specified lifecycle is exceeded, the table is deleted.

  5. Select I have known this risk and confirmed that as owner of this table, I am responsible for the subsequent changes to this table. and click OK. On the dimension table editing page, view and modify information about the table. For more information, see Edit a dimension table.

    MaxCompute tables that are created in DataAnalysis are maintained in the production environment. The creator of a MaxCompute table is responsible for the creation and maintenance of the table.

View and manage a dimension table

  1. In the left-side navigation pane of the DataAnalysis page, click the 维表 icon.

  2. In the All Dimension Tables section of the page that appears, select I created or Share it with me from the drop-down list in the upper-right corner to view the tables in the selected category.

    全部维表

    You can also share dimension tables with specific users. For more information, see Share a dimension table.

  3. Click the name of a desired table in the File Name column or click the 编辑 icon in the Operation column that corresponds to the table to go to the editing page of the dimension table.

    In the All Dimension Tables section, you can also perform the following operations on a dimension table:

    • Change the owner of a dimension table: Find the dimension table whose owner you want to change and click the 转交 icon in the Operation column. In the Change Owner dialog box, select an owner from the New Owner drop-down list and click OK.

    • Delete a dimension table: Find the dimension table that you want to delete and click the 删除 icon in the Operation column. In the Delete message, click OK.

What to do next

After you create a dimension table, go to the editing page of the dimension table and import data to the table. For more information, see Import data to a dimension table.