Data Standards

Data standards describe data meanings and business rules that are stipulated and commonly recognized by enterprises and that those enterprises must comply with.

A data standard, also called a data element, is the smallest unit of data used. It cannot be further subdivided. A data standard is a data unit whose definition, identifiers, representations, and allowed values are specified by a group of attributes. You can associate data standards with databases of a wide range of businesses. The identifier, data type, expression format, and value range are the basis of data exchange. They are used to describe field metadata of a table and standardize data information stored in a field.

This section describes how to create a data standard. A created data standard can be associated with fields in a business table created during ER modeling, ensuring that fields in the business table comply with the specified data standards.

Creating a Data Standard Directory

  1. Log in to the DGC console, select a DGC instance, and click Access.

    On the displayed page, click the Workspaces tab. In the workspace list, locate the required workspace.

  2. Click Data Design of the corresponding workspace.
  3. Choose Data Standards from the left navigation bar.
  4. When you access the Data Design page for the first time, the page where you can customize a standard template, shown in the following figure, is displayed. Select the required options for Optional, click to add custom items, and then click OK.

    After saving the template settings, you can modify it on the Standard Template Management page of Configuration Center. For details, see Managing a Standard Template. When creating a data standard, you need to set the selected options in the template.

  5. On the Data Standards page, select a directory and click to create a directory under the selected one. When creating a directory for the first time, you can create a directory under the root directory.
    Figure 1 Data Standards page
  6. In the displayed dialog box, set parameters as prompted and click OK.
    Figure 2 Create Directory dialog page
    Table 1 Parameters for creating data standards

    Parameter

    Description

    Directory Name

    Only letters, digits, and underscores (_) are allowed.

    Select Directory

    Select an existing directory, and create a sub-directory under it.

Creating a Data Standard

  1. In the Data Standards page, select a directory and click Create.
  2. Set parameters by referring to Table 2 and click Publish.

    On the page for creating a data standard, only the selected parameters and custom parameters that have been added on the Standard Template Management tab page of the Configuration Center are displayed. Table 2 lists all parameters that are available in a data standard template. For details on how to configure a data standard template, see Managing a Standard Template.

    Figure 3 Creating a data standard
    Table 2 Parameters

    Parameter

    Description

    *Standard Name

    Letters, digits, brackets, spaces, and underscores (_) are allowed, but field type names must start with letters.

    *Standard Code

    The value must be unique in the workspace. It is used to identify a data standard record. Letters, digits, and brackets, spaces, and underscores (_) are allowed, but standard codes must start with letters.

    *Data Type

    The possible values are STRING, BIGINT, DOUBLE, TIMESTAMP, DATE, BOOLEAN, and DECIMAL.

    The data type varies according to the system. The system converts the data type internally. If the required data type does not exist, you can add one. See Managing a Field Type.

    Data Length

    This field can be left blank. You can also enter a value that ranges from 0 to 10,000. If it is left blank, it means there is no limit to the data length.

    Allowed Value

    If this field is selected, enter a value and press Enter to add an allowed value. You can add up to 20 allowed values.

    Referenced Lookup Table

    Select a created lookup table and corresponding table fields. In this way, the lookup table fields can be associated with data standards. If no lookup table is created, create one. See Managing Lookup Tables. If Create Quality Jobs is selected under Model Design Process on the Function Configuration tab of Configuration Center, and the data standards of the reference lookup tables are associated with the business tables in ER modeling, the system will automatically create quality jobs in the Data Quality Control module of DGC when the business tables are published, and generates quality rules based on the associated data standards and lookup tables. If the quality jobs have already been published, the system will automatically update the quality jobs and add the quality rules generated based on the data standards and lookup tables.

    Quality Rule

    If Create Quality Jobs is selected under Model Design Process on the Function Configuration tab of Configuration Center, your data standard template includes parameter Quality Rule, and the data standard is associated with a table, the system will automatically create a quality job in Data Quality Control of DGC after the table is published. The created quality job contains the quality rule added here. If the table associated with the data standard to be created has been published, the system will automatically update a quality job.

    Click . In the displayed dialog box, click Add Rule.

    For example, add a rule named Field unique value, select the rule, 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.

    The alarm parameters are listed as buttons. If you click these buttons, the alarm condition value is displayed in the sequence of variables such as $1, $2, and $3. The variable names indicate the alarm parameters. In other words, when setting Alarm Triggering Condition, use the variable $1 to represent the first alarm parameter, $2 to represent the second alarm parameter, and so on.

    Rule Designer

    Select a business rule owner from the drop-down list. This owner is responsible for developing quality rules. Only the workspace administrator or developer can be set as the owner.

    Rule Implementer

    Select a data monitoring owner from the drop-down list. This owner is responsible for implementing quality rules. Only the workspace administrator or developer can be set as the owner.

    Standard Level

    • global indicates the global level.
    • domain indicates non-global level.

    userdefine

    Choose Configuration Center > Standard Template Management to add custom items. You can add one or more custom items based on the site requirements. For more information about adding custom items, see Managing a Standard Template.

    Description

    A description of the data standard to be created. Up to 600 characters are supported.

  3. Click Save and Publish. Wait for the reviewer to approve the application.

    After the data standard is approved, the status of the data standard changes to published, indicating that the data standard is released successfully.

Importing a Data Standard

  1. On the Data Design console, choose Data Standards from the left navigation bar. The Data Standards page is displayed.
  2. On the displayed page, specify a directory and choose More > Import. A dialog box is displayed.

    Figure 4 Import Data Standard dialog box

  3. In the Import Data Standard dialog box, determine whether to update the existing data. Existing data is uniquely identified by a standard code. That is, if a standard code in the import template already exists in the current workspace, the system considers that the group of data to which the standard code in the import template belongs already exists.
  4. On the Import tab page, click Data standard import template to download the template. Open the template, set parameters in the template based on business requirements, and save the settings.

    Table 3 and Table 4 describes the parameters required for importing a data standard. Parameters whose names start with * are mandatory, and those that do not start with * are optional.

    Table 3 Parameters in the "Standards" sheet

    Parameter

    Description

    Directory

    The directory that the imported data standard belongs to.

    *Standard Name

    The name of the data standard to be created. Letters, digits, brackets, spaces, and underscores (_) are allowed, but field type names must start with letters.

    *Standard Code

    The name of the data standard code to be created, which uniquely identifies a data standard record. Letters, digits, and brackets, spaces, and underscores (_) are allowed, but standard codes must start with letters.

    *Data Type

    The possible values are STRING, BIGINT, DOUBLE, TIMESTAMP, DATE, BOOLEAN, and DECIMAL.

    If the required data type does not exist, you can add one. See Managing a Field Type.

    The data type varies according to the system. The system converts the data type internally.

    Data Length

    This field can be left blank. You can also enter a value that ranges from 0 to 10,000. If it is left blank, it means there is no limit to the data length.

    Allowed Value

    The value true indicates that the value is allowed, and the value false indicates that the value is not allowed.

    Yes

    If you select Yes for Allowed Value, you must enter an allowed value.

    You can add up to 20 values. Multiple values must be separated by commas (,), for example, 1,2,3.

    Referenced Lookup Table

    Set this parameter to the name of a created lookup table.

    Lookup Table Field

    If Referenced Lookup Table is not left blank, you need to set Lookup Table Field. In this way, the code table field can be associated with the data standard.

    Owner of Business Rules

    Enter a rule designer. Only the workspace administrator or developer can be set as the owner.

    Owner of Data Monitoring

    Enter a rule implementer. Only the workspace administrator or developer can be set as the owner.

    Standard Level

    • global indicates the global level.
    • domain indicates non-global level.

    Description

    A description of the data standard to be imported. Up to 600 characters are supported.

    (Optional) Custom Item

    If you have added one or more custom fields when customizing a data standard template, you also need to fill in the corresponding fields in the import template. If no custom field is added, you do not need to fill in the fields. For details on how to customize a data standard template, see Managing a Standard Template.

    In the Quality Rule sheet, you can configure quality rules to be added for data standards. If Create Quality Jobs is selected under Model Design Process on the Function Configuration tab of Configuration Center, your data standard template includes parameter Quality Rule, and the data standard is associated with a table, the system will automatically create a quality job in Data Quality Control of DGC after the table is published. The created quality job contains the quality rule added here. If the table associated with the data standard to be created has been published, the system will automatically update a quality job.

    Table 4 Parameters in the "Quality Rule" sheet

    Parameter

    Description

    *Standard Name

    The name of the data standard that a quality rule is added to

    Rule Name

    Enter an existing rule name. In the upper left corner of the DGC console, select Data Quality Control from the drop-down list. Then, you can view the existing rule names on the Rule Template page.

    Alarm Triggering Condition

    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 alarm condition expression, alarm parameters are represented by variables such as $1, $2, and $3. The variable name indicates the alarm parameter of the specified quality rule. The variable $1 indicates the first alarm parameter, $2 indicates the second alarm parameter, and so on. In the upper left corner of the DGC console, select Data Quality Control from the drop-down list. Then, you can go to the Rule Template page and view the alarm parameters supported by the quality rule in the Result Description column.

    Example: ${1} > 100.

    Regular Expression

    A regular expression needs to be configured only when Rule Name is set to Regular Expression or Validity Verification.

  5. Return to the Import Data Standard dialog box, select the data standard template file configured in the previous step, and click Upload and Verify.

    If the uploaded template file fails the verification, modify the file and upload it again.

  6. In the Import Data Standard dialog box, the import result is displayed on the Last Import tab page. If the import is successful, click Close. If the import fails, you can view the failure cause, correct the template file, and upload it again.

Managing a Data Standard

On the DGC Data Design console, choose Data Standards from the left navigation bar. On the displayed page, you can manage data standards as required.

Figure 5 List of data standards
On the Data Standards page, you can perform the following operations:
  • Search

    In the upper part of the Data Standards area, set criteria such as the standard name, creator, reviewer, and modification time, and click the search icon to search for the specified data standards.

    After locating the specified data standards, you can perform the following operations:

    • Edit
    • Publish
    • Suspend
  • Import

    Choose More > Import to import a data standard. Download the template, fill in it and upload it, and click Close.

  • Export
    • Export data standards from a specified directory.

      In the data standard directory tree, select a directory and choose More > Export above the data standard list to export all data standards in the directory.

    • Export specified data standards.

      In the data standard list, select the data standards you want to export and choose More > Export above the list to export the selected data standards.

  • Delete

    Choose More > Delete to delete a data standard. A data standard with the pending publishing, published, or pending suspension status cannot be deleted. Referenced data standards cannot be deleted as well.

  • Publish

    Click Publish to publish a data standard.

Exporting a Data Standard

  1. On the Data Design console, choose Data Standards from the left navigation bar. The Data Standards page is displayed.
  2. In the directory tree of data standards, specify a directory and click Export.