Managing attributes
You can add, edit and remove attributes as required. All attributes in the Metadata belong to the Attributes Domain. When adding a new attribute, you can either select an existing attribute from the Attributes Domain or create a new Attributes Domain. Both of these options are described below.
To add an attribute from the attributes domain:
-
Click the New Attribute button in the Attributes toolbar.
The New Attribute window opens.
- From the Attribute domain drop-down list, select the desired attribute.
- To edit the selected attribute domain on-the-fly, click the edit button located after the Attribute domain drop-down list. This will open the Edit - AttributeDomainName window. Then, continue from Step 2 in Edit an attribute domain.
-
In the Attribute name field, optionally change the default instance name for the attribute domain.
Information noteThe name cannot contain any of the following forbidden (by Hive) characters:
: ; . , ' "
You can create multiple instances of a single Attribute Domain. This is especially useful if you want to use the same Attribute Domain across multiple tables, with each "instance" having its own unique name. This also allows you to edit the properties of each attribute without affecting the other attributes, even though all of the Attribute Domain instances share the same parent Attribute Domain. For example, if the Attribute Domain name is "ID", you could create one instance for it in the "Categories" entity named "CategoryID" and another instance in the "Employees" entity named "EmployeeID". If, however, you edit the parent Attribute Domain attribute, all instances of that attribute will be updated as well.
- Data type: The data type of the Attribute Domain. This can only be edited by editing the Attribute Domain.
-
To add a prefix to the attribute name, enter the desired prefix in the Prefix field.
Adding a prefix to an attribute name allows you to add multiple instances of the same attribute domain. For example, the attribute "Employee" could become two different attributes: "ReportsTo_Employee" and "HiredBy_Employee".
-
To create an expression for the attribute, click the fx button located after the Expression field and then continue from Creating transformations.
- Click OK to save your settings.
To create a new attribute domain and add it to the Metadata:
-
Click the New Attribute button in the Attributes toolbar.
The New Attribute window opens.
-
Click the plus sign to the right of the Attribute domain drop-down list.
The New Attribute Domain window opens.
-
Specify a Name for the attributes domain.
Information noteThe name cannot contain any of the following forbidden (by Hive) characters:
: ; . , ' " :
-
From the Type drop-down list, select one of the available data types.
-
If the selected data type requires further configuration, additional fields will be displayed. For example, when Decimal is selected, the Length and Scale fields will be displayed. Set the values as desired.
-
Optionally, specify a Description.
-
Click OK to add the newly created attribute domain to the Attribute domain field and close the New Attribute Domain window.
-
-
Continue from Step 4 in Add an existing attribute domain above.
Information noteYou can also add new attribute domains via the Manage Attribute Domains window. For more information, see Managing the Attributes Domain
To edit an attribute:
Method 1:
-
Select the attribute you want to edit and then click the Edit button in the Attributes toolbar.
The Edit Attribute Name window opens.
-
Edit the values as required and then click OK.
Method 2:
-
Double-click the attribute you want to edit.
The values in the attribute row become editable.
-
Edit the values as required and then click the tick button at the end of the row.
To remove an attribute:
- Select the attribute(s) you want to delete.
- Click the Delete button in the Attributes toolbar.
- When prompted to confirm the deletion, click Yes.
The Storage Zone needs to be "adjusted" when deleting an attribute from the metadata and then adding the same attribute back to the metadata. However, the "Adjust" operation will also delete the data from the corresponding Storage Zone column.
To change the attribute order:
- Select the attribute you want to move and use the Move Up/Move to Top and Move Down /Move to Bottom toolbar buttons to move the attribute
To manage the Attributes Domain:
To create an expression for an attribute:
- See Add an attribute from the attributes domain or Edit an attribute above.
To export the attributes to a TSV file:
-
Select an entity from the Entities list on the left of the Manage Metadata window and then select Export to TSV from the drop-down menu in the Attributes toolbar.
Depending on your browser settings, you will either be prompted to download the <entityname>_Attributes.tsv file or it will be downloaded to your default Downloads location.