After you create a dimension table, fact table, or aggregate table, you can manage fields in the table and configure associations and partitions for the table based on your business requirements. After you perform the preceding operations, you can publish and manage the table. This topic describes how to manage fields in a table and publish and manage the table.

Note
  • You can use fast modeling language (FML) statements to add fields to a table, configure attributes for the fields, and configure associations and partitions for the table. For more information, see Use FML statements to configure and manage data tables.
  • The methods provided in this topic for managing fields in a table, and publishing and managing a table are suitable for dimension tables, fact tables, and aggregate tables.

Field management: Add fields to a table

You can use Shortcut Mode or Script Mode to add fields to a table.
  • Aggregate table: In shortcut mode, you can select Import from Metrics or Import from Table to add fields.
  • Dimension table and fact table: In shortcut mode, you can select only Import from Table to add fields.
  • Shortcut Mode: Import from Metrics (suitable only for aggregate tables)Import fields
    1. Click Quick Import next to Import from Metrics.
    2. In the Import from Metrics panel, all the derived metrics that are created are displayed. You can select the desired derived metrics and click Import in the lower part of the panel.
  • Shortcut Mode: Import from TableImport from Table
    1. Click Expand next to Import from Table.
      Note Expand is displayed only when you create an aggregate table. If you are creating a dimension table or fact table, you can directly select the desired table from the Table drop-down list.
    2. In the Table drop-down list, enter a table name in the format of Workspace name.Table name and select the table from the drop-down list. The table name is displayed in the Referenced Table field. You can click the Import All Fields icon or the Load Specified Fields icon.
    3. If you click the Load Specified Fields icon, a panel that displays all fields in the table appears. You can select the desired fields and click Import in the lower part of the panel to import the fields to the current table.
  • Script Mode
    The script mode allows you to edit code to manage the fields in the table. After you click Script Mode, the statement that is used to manage table fields is generated and displayed in the code editor of the Script Mode panel. You can modify the statement based on your business requirements. Then, click OK. Script Mode

Field management: Configure attributes for fields in the table

Note The attributes of fields in dimension tables, fact tables, and aggregate tables are different. However, the operations required to modify the attributes are similar. In the following example, an aggregate table is used.
After you add fields to the aggregate table, you can configure Associated Granularity/Metric and Redundant Field for the fields. The Redundant Field parameter is used to associate a field in the current table with a field in another table.
  1. Configure Associated Granularity/Metric for the fields.
    You can configure Association Type to specify the statistical type of the value of each field. Association Type has the following options: Statistical Granularity and Statistical Metric.
    • Statistical Granularity: allows you to specify a dimension that needs to be associated with a field in the aggregate table. For example, you can specify the commodity dimension or shop dimension.
    • Statistical Metric: allows you to specify a derived metric that needs to be associated with a field in the aggregate table. For example, you can specify the derived metric payment amount of orders that are placed in the Hema application within the last seven days.
    Note
    • Associated Granularity/Metric is displayed only for aggregate tables.
    • By default, Association Type is set to Statistical Metric for fields that are imported from metrics, and the value of Associated Object for the fields is the derived metrics that need to be associated with the fields.
    • By default, Association Type is not configured for fields that are imported from a table or added in script mode. You can configure Association Type for the fields based on your business requirements.
    To modify Association Type for a field, perform the following steps: Modify Association Type for a fieldClick Associated Granularity/Metric in the Field Management section. In the Associated Granularity/Metric panel, modify Association Type and Associated Object for the field. Then, click OK.
  2. Configure Redundant Field for a field.

    Find a field for which you want to configure Redundant Field and click Redundant Field in the Actions column.

    Redundant Field
  3. Manage other attributes for fields in the table.

    You can click Field Display Settings in the upper-right corner of the fields that are added and select the attributes that you want to display. You can also modify the values of the attributes based on your business requirements.

  4. Then, click Save in the upper-left corner of the configuration tab of the table.

Publish a table

You can publish and materialize a dimension table, fact table, or aggregate table to the compute engine instance that is associated with the current workspace for subsequent data analysis. You can publish and materialize a table to a MaxCompute, Hologres, E-MapReduce (EMR), CDH, or MySQL compute engine instance.

You can also export a table and then import the table to a compute engine instance for subsequent use. When you export a table, you can select the MaxCompute, Hologres, or Hive compute engine. For more information, see Import tables and export a table.

  1. Publish a table.
    After a table is created, you can click Publish in the upper part of the configuration tab of the table. In the Publish dialog box, configure the parameters. Publish a table
    Parameter Description
    Workspace The workspace to which you want to publish and materialize the table. You can select a workspace that is configured as a data development workspace.
    Note
    • If no workspace is configured as a data development workspace, this parameter is not displayed. In this case, the table is published and materialized to the current workspace.
    • For more information about how to configure a workspace as a data development workspace, see Modeling workspace.
    Effective Environment Valid values: Development and Production.
    Note
    • If you use a workspace in basic mode, you can publish the table only to the production environment.
    • If you use a workspace in standard mode, you can publish the table to the development or production environment. If you publish the table to the production environment, the system also automatically publishes the table to the development environment.
    Compute Engine Type The type of compute engine that stores data. Valid values:

    MAXCOMPUTE, EMR, HOLO, CDH, and MYSQL.

    Publish Mode
    Note The mode in which you want to publish the table. Valid values: Incremental Publish and Delete and Recreate. If this is the first time you publish the table, the system publishes the table to the compute engine instance that you select regardless of the mode you use.
    Compute Engine Instance The compute engine instance to which you want to publish and materialize the table.
    Description The description of the table publish task.
  2. After the parameters are configured, click Publish. The system publishes the table to the development or production environment.
    Note
    • The publish operation requires about 1 minute. If the system displays the message deploy plan execute success, the table is published.
    • You can repeat the publish operation to publish the table to the other environment.
  3. Optional:After the publish operation is complete, click View Logs in the upper part of the configuration tab of the table to view the result. If an error occurs, you can view the cause of the error in the log.

Copy a table

If you want to create a table that is the same as an existing table, you can copy the existing table. To copy a table, find the table in the left-side navigation tree of the Dimensional Modeling page, right-click the table name, and then select Copy. The configurations of the parameters for the new table are the same as the configurations of the parameters for the existing table. Copy a table

Manage a table

After a table is created, you can find the table in the left-side navigation tree of the Dimensional Modeling page and double-click the table name to go to the configuration tab of the table. On the configuration tab of the table, you can view the information about the table and perform the following operations on the table. Manage a table
  • Click Edit to modify the basic information and fields configured for the table. Then, click Save to save the modifications.
    Note After you modify the information about the table, you must publish and materialize the table to the desired compute engine instance before you can use the table in subsequent data development.
  • Click Refresh to refresh the table information.
  • Click Association to configure or modify associations of the table.
  • Click Publish to publish and materialize the table to a compute engine instance.
  • Click View Logs to view the publish logs of the table.
  • Click Export DDL Statement to copy or export the CREATE TABLE DDL statements of different types of compute engines for the table.

What to do next

After you publish the table to the desired compute engine instance, you can go to the DataStudio page to perform data development operations based on the table. For more information, see Features on the DataStudio page.