Updated on 2024-04-29 GMT+08:00

Managing Dimension Tables

A dimension table corresponds to a dimension and consists of a wide range of dimension fields. Creating, publishing, editing, and suspending a dimension table highly relate to the corresponding dimension. After a dimension is published, the system automatically creates and publishes the corresponding dimension table.

Viewing the Publish History of a Dimension Table

  1. On the DataArts Architecture page, choose Models > Dimensional Modeling in the left navigation pane.
  2. Click the Dimension Tables tab.
  3. Select a dimension table in the list and click View History in the Operation column.
    Figure 1 Dimension Tables tab page

  4. On the page displayed, you can view the publish history, version comparison information, and publish log of the dimension table.

    If the publish log includes error logs, the publishing has failed. You can click Resynchronize to synchronize the table to other DataArts Studio modules.

Previewing SQL

  1. On the DataArts Architecture page, choose Models > Dimensional Modeling in the left navigation pane.
  2. Click the Dimension Tables tab.
  3. Select a dimension table in the list and click Preview SQL in the Operation column.
    Figure 2 Previewing an SQL statement
  4. On the page displayed, you can view or copy the SQL statement.

Synchronizing a Dimension Table

After you create or edit a dimension, you can manually synchronize the dimension table if the synchronization fails.

  • The system performs the synchronization based on the data table update mode on the Function Settings tab page of Configuration Center. For details, see Functions.
  1. On the DataArts Architecture page, choose Models > Dimensional Modeling in the left navigation pane.
  2. Click the Dimension Tables tab.
  3. In the dimension table list, select the target dimension table and click Synchronize above the list. The dialog box for synchronizing the dimension table is displayed.

    You can choose to synchronize the dimension tables to the production or development environment. By default, they are synchronized to the production environment. If you do not choose an environment, the tables cannot be synchronized.

    Figure 3 Synchronizing dimension tables

  4. After confirming that the information is correct, click OK. The synchronization result is displayed.

    After the synchronization, you can view the synchronization status of the dimension table in the dimension table list. You can also click above the list to refresh the status. You can switch between the production environment and development environment to view the synchronization result.

Associating a Dimension Table with a Quality Rule

  1. On the DataArts Architecture page, choose Models > Dimensional Modeling in the left navigation pane.
  2. Click the Dimension Tables tab.
  3. In the dimension table list, select the target dimension table, and click Associate Rule.
    Figure 4 Associating a dimension table with a quality rule
  4. On the page displayed, set the parameters. After the configuration is complete, click OK.
    • Update Existing Rule: If this option is selected, the newly added rule will overwrite the old rule.
    • Table Field: This parameter applies to all fields by default. You can enter a regular expression to filter fields as required.
    • WHERE Clause: This parameter can be used to filter fields.
    • Generate Anomaly Data: If this option is enabled, anomaly data is stored in the specified database based on the configured parameters.
    • Database/Schema: database or schema that stores anomaly data. This parameter is displayed when Generate Anomaly Data is enabled.
    • Table Prefix: prefix of the table that stores anomaly data. This parameter is displayed when Generate Anomaly Data is enabled.
    • Table Suffix: suffix of the table that stores anomaly data. This parameter is displayed when Generate Anomaly Data is enabled.
    • Add Rule: You can click Add Rule to add a rule. For example, add a rule named Unique value, select the rule, click OK, enter an alarm condition expression in the Alarm Condition text box, add other rules in the same way, and click OK.
    • An alarm condition expression consists of alarm parameters and logical operators. When a quality job is running, the system calculates the result of the alarm condition expression and determines whether to trigger the alarm based on the result of the expression. If the expression result is true, the alarm will be triggered. Otherwise, no quality alarm will be triggered. In the Associate Quality Rule dialog box, the alarm parameters of each quality rule are displayed as buttons.

Associating a Single Field with a Quality Rule

  1. On the DataArts Architecture page, choose Models > Dimensional Modeling in the left navigation pane.
  2. Click the Dimension Tables tab.
  3. In the dimension table list, click the name of the target dimension table.
  4. In the field list on the dimension table details page, click in the row of the target field to associate the field with a quality rule.
    Figure 5 Associating a single field with a quality rule
  5. After the configuration is complete, click OK.
    • Update Existing Rule: If this option is selected, the newly added rule will overwrite the old rule.
    • Add Rule: You can click Add Rule to add a rule. For example, add a rule named Unique value, select the rule, click OK, enter an alarm condition expression in the Alarm Condition text box, add other rules in the same way, and click OK.
    • An alarm condition expression consists of alarm parameters and logical operators. When a quality job is running, the system calculates the result of the alarm condition expression and determines whether to trigger the alarm based on the result of the expression. If the expression result is true, the alarm will be triggered. Otherwise, no quality alarm will be triggered. In the Associate Quality Rule dialog box, the alarm parameters of each quality rule are displayed as buttons.
    Figure 6 Adding a rule

Associating Table Fields with a Quality Rule in Batches

  1. On the DataArts Architecture page, choose Models > Dimensional Modeling in the left navigation pane.
  2. Click the Dimension Tables tab.
  3. In the dimension table list, click the name of the target dimension table.
  4. In the table field list on the dimension table details page, select the target table fields and click Associate Rule.
    Figure 7 Associating table fields with a quality rule
  5. On the page displayed, add a rule and set the rule parameters.
    • Update Existing Rule: If this option is selected, the newly added rule will overwrite the old rule.
    • Add Rule: You can click Add Rule to add a rule. For example, add a rule named Unique value, select the rule, click OK, enter an alarm condition expression in the Alarm Condition text box, add other rules in the same way, and click OK.
    • An alarm condition expression consists of alarm parameters and logical operators. When a quality job is running, the system calculates the result of the alarm condition expression and determines whether to trigger the alarm based on the result of the expression. If the expression result is true, the alarm will be triggered. Otherwise, no quality alarm will be triggered. In the Associate Quality Rule dialog box, the alarm parameters of each quality rule are displayed as buttons.
    Figure 8 Associating table fields with a quality rule
  6. (Optional) If you want to store anomaly data that does not comply with the preset rules in the exception table, enable Anomaly Data Output Settings.
    Figure 9 Enabling Anomaly Data Output Settings

    Click the pen icon next to Anomaly Data Output Settings and enable Generate Anomaly Data. The anomaly data will be stored in the specified database based on the settings.

    Figure 10 Anomaly Data Output Settings
    The parameters are as follows:
    • Database/Schema: database or schema that stores anomaly data
    • Table Prefix: prefix of the table that stores anomaly data
    • Table Suffix: suffix of the table that stores anomaly data

    Click to save the settings.

  7. (Optional) By default, the quality rule applies to the entire table. If you want to query data in specified partitions, set the where condition.
    Figure 11 Where condition
  8. After the configuration is complete, click OK.

Deleting a Dimension Table

Dimensions in publishing review, published, or suspension review state cannot be deleted. You can delete a dimension table on the Dimensions page.

  1. On the DataArts Architecture page, choose Models > Dimensional Modeling in the left navigation pane.
  2. Click the Dimension Tables tab.
  3. In the dimension table list, select the target dimension table and click Delete above the list.
    Figure 12 Deleting a dimension table
  4. Confirm the dimension table to delete, and click Yes.