Transform data into a different structure using Structure Maps
Contents
Use Case 1
In this example we have a simple Data Structure with a number of Components. They are all Dimensions except the Observation Value which is a measure.
The image below shows that 3 of the Components are Enumerated and the Codes which are in the linked Codelists.
If a datafile is to succeed the Validation process it would have to conform to these codes. However, it this example the source file supplied does not conform instead it contains the codes
FR was used instead of FRA for France ANN was used instead of A for Annual ARAB was used instead of ARA for Arable Land
To successfully validate this data, a Data Structure Map can be created to map the source data to the Target Data Structure. To Achieve this...
Step 1 - Create a new Data Structure for the Source
In this example the source data structure can be exactly the same as the Target however instead of Enumerating the Concepts you can allow any format to be used as shown in the example below.
Step 2 - Create a Structure Set
All maps must belong to a Structure set so first select Structure Maps from the Main Menu followed by Structure sets and create a Structure Set.
Step 3 - Create a Data Structure Map
Complete Step 1 of the Wizard - High Level Details
From the Structure Maps Menu, select Data Structure Map and enter the higle level details as shown below.
Complete Step 2 of the Wizard - Select the Source and Target Data Structures
Complete Step 3 of the Wizard - Map the Components
In this example I am using the Source with a Fixed Value area to specify that no matter what is in the source file for Frequency, Series and Country, the
After this step, the Structure Map can be Finished.
Step 4 - Test Mappings
Once the Data Structure Map has been created you will see the orange Test Mapping button as shown below.
To test the mapping you will need to select a file containing the data in the format specified above namely:
FR instead of FRA for France ANN instead of A for Annual ARAB instead of ARA for Arable Land
Once the file is loaded, you will see the Explain Plan.
The Plan will show you exactly what will happen when this Map is used.
Step 5 - Load the Source Data File
Using the Convert menu option load the data file, you will see Validation Errors as shown below which is to be expected.
Step 6 - Convert the Source Data File
Having Loaded the Data, the next step is to click the Convert button as shown in the image below. Note that I have selected the Data Structure Map. On export the dataset will be converted in terms of its structure, and representation e.g. the dataset can be converted to conform to the target Data Structure Definition.
Step 7 - Load the Converted Data File
This time the the converted datafile will achieve a successful validation.
This article is still work in progress.
FMRWIKI-11