This topic describes how to create a dimension table. After a dimension table is created, you can edit or delete the dimension table.
- 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
- 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.
- On the DataStudio page, click the DataWorks icon in the upper-left corner and choose .
- On the DataAnalysis homepage, click Experience Now. The Web Excel page appears.
- In the top navigation bar, click Dimension. The Dimension page appears.
- Click 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.
- 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.
- 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
- 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.
- In the top navigation bar, click Web Excel.
- In the All Spreadsheets section, click the name of the target workbook. The workbook editing page appears.
- In the upper-right corner of the workbook editing page, choose .
- 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.
- 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.