A field standard is used to manage the values of fields that have the same meaning but different names in a centralized manner. A field standard can also be used to define the value range and measurement unit for these fields. If changes are made to a field standard, you can quickly identify and modify tables that contain fields defined in the field standard. This significantly improves data application efficiency and data accuracy. This topic describes how to create and delete a field standard.
Background information
Field standards are also known as data dictionaries. DataWorks allows you to use field standards to manage the values of fields that have the same meaning but different names in all your tables. You can associate fields that have the same meaning but different names in multiple tables. You can also define items such as value ranges, measurement units, and lookup tables for the fields. If changes are made to a field standard, you can quickly identify and modify tables that contain fields defined in the field standard. This significantly improves data development and application efficiency, data accuracy, and data governance effect.
Example:
A registration table and a logon table are created. Both tables store member IDs. The registration table uses the user_id field to store member IDs. The logon table uses the userid field to store member IDs. The two fields have the same meaning but different names. In this case, the member IDs are difficult to manage.
Solution:
Create a field standard for member IDs before you create the tables. When you create a registration table and a logon table, apply the field standard to the user_id and userid fields in the two tables. When you analyze data, you can use the created field standard to find all associated fields in the tables. This significantly improves data application efficiency and data accuracy.
Hierarchical relationship
You must create a field standard in a root directory, subdirectory, or standard set.
A root directory is the top-level directory in a system. All subdirectories, standard sets, and field standards can only be stored in the root directory.
A subdirectory is used to store standard sets and field standards. A subdirectory is similar to a folder in an operating system.
A standard set is similar to a subdirectory. However, a standard set stores only field standards.
You can configure a parent field standard for field standards. The configurations of the parent field standard can be applied to the field standards. For example, the configurations of a member ID standard can be applied to both a buyer ID standard and a seller ID standard.
Create a directory and a standard set
Go to the Data Standard tab.
Log on to the DataWorks console. In the top navigation bar, select the desired region. In the left-side navigation pane, choose . On the page that appears, select the desired workspace from the drop-down list and click Go to Data Modeling.
In the top navigation bar of the Data Modeling page, click Data Standard.
In the left-side navigation pane of the page that appears, click Field Standard.
Create a root directory.
In the Field Standard pane, click the icon and select Create Root Directory.
In the Create Root Directory dialog box, enter a name in the Name field, and click OK.
After the root directory is created, you can view the root directory in the Field Standard pane.
(Optional) Create a subdirectory.
In the Field Standard pane, find the created root directory. Right-click the directory name and select Create Subdirectory.
In the Create Subdirectory dialog box, enter a name in the Name field and click OK.
(Optional) Create a standard set.
In the Field Standard pane, find the created root directory or subdirectory.
Right-click the directory name and select Create Standard Set.
In the Create Standard Set dialog box, enter a name in the Name field and click OK.
Create a field standard
In the Field Standard pane, find the created directory or standard set. Right-click the name of the directory or standard set and select Create Standard.
In the Create Standard dialog box, configure the parameters.
Parameter
Description
ID
The ID of the field standard. You can specify an ID based on your business requirements.
Abbreviation
The abbreviation for the name of the field standard.
Name
The name of the field standard.
Display Name
The display name of the field standard.
Data Type
The data type of fields that use the field standard.
Valid values: BIGINT, DOUBLE, DECIMAL, STRING, DATETIME, and BOOLEAN.
Length
The maximum number of digits in the values of fields that use the field standard.
For example, if you specify the DECIMAL data type, the value of this parameter is 20 in DECIMAL(20,4).
Precision
The number of decimal places that you want to retain in the values of fields that use the field standard.
For example, if you specify the DECIMAL data type, the value of this parameter is 4 in DECIMAL(20,4).
Not Empty
Specifies whether the values of fields that use the field standard can be empty. By default, this check box is not selected.
Default Value
The default value of fields that use the field standard. The value of this parameter can be up to 2,048 characters in length.
Business Definition
The business definition of the field standard. The value of this parameter can be up to 2,048 characters in length.
Directory
The directory in which the field standard is stored. The value of this parameter can be a root directory, subdirectory, or standard set.
Parent Standard
You can configure an existing field standard as the parent field standard of the field standard. This way, you can identify the association between fields in an efficient manner.
For example, both buyer IDs and seller IDs are member IDs. In this case, you can configure the member ID standard as the parent field standard of the buyer ID standard and the seller ID standard.
Referenced Lookup Table
You can select a lookup table to define the value range of fields that use the field standard. For more information, see Lookup table.
Delete a field standard, standard set, subdirectory, or root directory
Delete a field standard
NoteBefore you delete a field standard that is associated with fields in different tables, you must cancel the association.
In the Field Standard pane, click the name of the standard set or the directory in which the field standard you want to delete is stored.
In the field standard list that appears, find the field standard and click Delete in the Actions column. In the Delete message, click OK.
Delete a standard set, subdirectory, or root directory
In the Field Standard pane, right-click the name of the standard set, subdirectory, or root directory that you want to delete and select Delete. In the Delete message, click OK.
NoteBefore you delete a standard set, subdirectory, or root directory, you must delete the objects in the standard set, subdirectory, or root directory.
What to do next
When you configure fields for fact tables and dimension tables, you can associate fields with the created field standard. For more information, see Publish and manage a table.