Project variable labels are critical for users to find the information they are after.
While you can change labels directly in your Harmoni project using a 1-1 relabel or search and replace, there may be times when the project tree is too big. In this case, bulk relabel is an efficient way for you to update your tree.
To do a bulk relabel, follow these three steps:
- Export the labels from your project tree
- Make the relevant changes in the exported Excel spreadsheet
- Import the information on label changes to your project.
In this article
- Exporting the Relabel Template
- Changing labels in the Relabel Template
- Importing the Relabel Template
- Bulk Relabel and Harmonization
1. Exporting the Relabel Template
The first step is to export the labels from your Project tree. To do this, select the metadata option in the action pane (bottom left menu) and the metadata area opens. You are presented with the Bulk Relabel tile, and when you hover over the tile you see the Upload and Download options.
Select Download to export the RelabelTemplate.xlsx spreadsheet which contains the current labels in the project tree.
- Open your project and switch to edit mode
- Select metadata from the action pane.
- From the Bulk Relabel tile, select download.
- Open the excel file from your downloads location.
2. Changing labels in the Relabel Template
The relabel template is named RelabelTemplate.xlsx.
The file displays: ItemID, ItemName, ItemType, ParentName, ParentType, IsHidden, and a field for the NewItemName. The only column you need to update is the NewItemName column; the rest of the fields are mainly for context.
- You can change as many labels as you need.
- You can change the labels to harmonize items across different sources.
- When updating the labels in the relabel template, you can take advantage of the different features in Excel to make the process more efficient.
- You can delete rows from the template and only keep the relevant rows for what you are changing.
- Make sure all filtering is removed before saving the file in Excel.
|ItemID||Unique Id identifier.|
|ItemName||The item label in the project tree (display label). This is the label you want to change.|
|ItemType||Gives you information about the variable type.|
|ParentName||Gives you information about the parent name, i.e., if the item is under an axis|
|ParentType||Gives you information about the parent variable type.|
|IsHidden||Indicates if the item is marked as hidden in the project tree.|
|NewItemName||This is the field to enter the new label.|
3. Importing the Relabel Template
After changing your template to add the new labels, you need to load the template back into Harmoni. To do this, switch to edit mode and select metadata from the action pane (bottom left menu.) Hover over the Bulk Relabel tile and select upload. Browse to the location of your file and upload. Harmoni will apply the new labels to your project tree.
If there are any conflicts, Harmoni generates a report containing the labels that were not changed (CauseDuplicateRecords.csv). Harmoni asks whether you want to download the report.
In this example, we tried to harmonize two items; however, these are in the same source, so relabel to merge is not supported.
4. Bulk Relabel and Harmonization
You can change the display labels in Harmoni to harmonize items across different sources. To harmonize, you need to change the item label to a common one. When the relabel template is uploaded, Harmoni will confirm which labels have been merged.
In this example, we want to combine the elements New Zealand and NZ, as well as Auckland International and Auckland. The color blue indicates that elements are not present in all files, and for this example, each element comes from a different source.
Enter the new label name and Upload
Where to from here?
Learn more about Harmoni Projects.