This topic describes how to create a dimension table. After a dimension table is created, you can edit or delete the dimension table.

Background information

Dimension tables are directly created in MaxCompute. The DataAnalysis service of DataWorks only synchronizes data to MaxCompute and does not store the data.
Note
  • Before you create a dimension table, activate MaxCompute.
  • The current account must be a member of a DataWorks workspace so that the account can access MaxCompute resources in this workspace.
  • When you create a dimension table, you can add only fields of the String type. If you need to use fields of other data types, execute Data Definition Language (DDL) statements to create the dimension table on the DataStudio page.

Create a dimension table in DataAnalysis

  1. Log on to the DataWorks console. In the left-side navigation pane, click Workspaces. On the Workspaces page, find the target workspace and click Data Analytics in the Actions column.
  2. On the DataStudio page, click the DataWorks icon in the upper-left corner and choose All Products > DataAnalysis.
  3. On the DataAnalysis homepage, click Experience Now. The Web Excel page appears.
  4. In the top navigation bar, click Dimension. The Dimension page appears.
  5. Click Create in the New Dimension Table section.
    Note If you have created dimension tables, you can search for a dimension table by entering its name in the search box in the All Dimension Tables section. Then, click the table name in the File Name column to go to the table editing page.
  6. In the New Dimension Table dialog box, set relevant parameters. The following table describes the parameters for creating a dimension table.
    Parameter Description
    Target Workspace The DataWorks workspace to which the MaxCompute table that corresponds to the dimension table belongs.
    Table Name The name of the dimension table. The name of the MaxCompute table that corresponds to the dimension table uses the same name as the dimension table. Enter the name that you want to assign to the MaxCompute table in this field.
    Table Description The description of the dimension table, such as the purpose or features.
    Field The fields of the dimension table. Only fields of the String type are supported.
    Lifecycle The lifecycle of the dimension table. The dimension table occupies storage resources in MaxCompute. To make sure that the resources can be recycled, select a proper lifecycle for the dimension table from the drop-down list.
  7. 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.
    The MaxCompute table created in DataAnalysis is maintained in the production environment. As the owner of the table, you are responsible for the maintenance of the table.

View all dimension tables

In the All Dimension Tables section, you can view all the created dimension tables and edit or delete a dimension table.
  • Find the target dimension table and click Edit in the Operation column. The table editing page appears. For more information, see Edit a dimension table.
  • Find the target dimension table and click Delete in the Operation column. In the Delete message, click OK.

Save a workbook as a MaxCompute table

You can create and edit a dimension table. Alternatively, you can save a workbook as a MaxCompute table.

  1. In the top navigation bar, click Web Excel.
  2. In the All Spreadsheets section, click the name of the target workbook. The workbook editing page appears.
  3. In the upper-right corner of the workbook editing page, choose Export > Save as MaxCompute Table.
  4. In the Transfer to dimension table dialog box, set relevant parameters.
    You can select certain fields in the current worksheet to save them to the MaxCompute table as needed.
  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.