This unit explains the SDMX components, or building blocks, for recoding data.
Structure maps link components together in a source/target relationship where there is a semantic equivalence between the source and the target components.
A typical use of structure maps is to provide mappings between:
SDMX v3.0 structure mapping provides the ability to define:
This relationship allows for the automatic recoding of data from one structure to another. For example, a source dataset may contain eight dimensions and use certain coding schemes, which may map to a dataset with only five dimensions using different coding schemes.
The structure map defines one or more component maps which can then link to a representation map.
Some output components may have a fixed value and there may be instances when values do not require mapping.
Select each aspect of recoding with SDMX to learn more.
Component map
The structure map defines one or more component maps, each component map has one or more components from the source DSD, mapping to one or more components in the target DSD.
Each component map can link to a representation map, which is used to describe how the source values map to the target values.
Representation map
The linked representation map links to source and target codelists, valuelists, or free text.
Like the component map, the representation map may contain multiple sources and multiple targets. The number and order of sources and targets to a representation map must match exactly that of the component map. For example,
Representation maps can include complex rules, such as regular expressions on source values and can even define periods of time for which a mapping relationship is true. For example,
Note: Cell-level footnotes and dataset-level footnotes are defined in SDMX models as attributes. The same is true for observation status codes (confidentiality, provisional data, estimated data etc.). This concept is represented as an attribute and attached to observations.
Non-mapping and fixed values
If values do not require mapping, for example if the source FREQ maps to target FREQ and the values are the same in both the source and target DSD, then the component map should not link to a representation map. The lack of a link will inform the system that the value should be copied across verbatim.
Some components on the output may have a fixed value, for example frequency is always ‘M’ regardless of the input data. This is defined at the level of the structure map. As mappings can be bi-directional the input can also have a fixed value, so when mapping the other way (from target to source) the input becomes the output.
Let’s now take a moment to consider three example uses cases to illustrate the component map and representation map relationship.
Select each example use case for the details.
One solution is to create a single component map which maps the source REF_AREA based on the ISO2 coding scheme to the output REF_AREA based on the ISO3 coding scheme.
A single representation map is required to map each UNIQUE ID to the matching output.
The mapping rules split the unique key:
SERIES1 maps to FREQ:M, REF_AREA:UK and INDICATOR:EMPLOYED.
SERIES2 maps to FREQ:M, REF_AREA:FR and INDICATOR:EMPLOYED.
SERIES3 maps to FREQ:A, REF_AREA:UK and INDICATOR:EMPLOYED.
Solution 1
This type of use case can be solved by creating three component maps:
Each component map is backed by a representation map, which maps the value of the unique key to the output.
Solution 2
An alternative solution is to create a single component map which maps the source UNIQUE_KEY to three outputs FREQ, REF_AREA, INDICATOR.
A single representation map is required to map each UNIQUE KEY to the three outputs.
The choice of whether to split the mapping up into separate components vs a single rule should be based on what will be more maintainable, understandable, and whether individual mapping rules will be reused by other structure maps.
The many-to-one use case therefore is simply the reverse of the one-to-many use case detailed above and has the same two solutions:
The example use case is dimensions FREQ, REF_AREA, INDICATOR whose values are to be combined in a mapped DSD as a single dimension with ID UNIQUE_KEY and unique series SERIES1, SERIES2, SERIES3.
The mapping rules combine the dimensions:
Solution 2
The simplest solution to understand and maintain is to create a single component map which maps the source FREQ, REF_AREA, INDICATOR combinations to the output UNIQUE_KEY.
A single representation map is required to map the three inputs to the UNIQUE_KEY.
Using FMR, the creation and maintenance of structure maps and representation maps are accessible from the main menu as shown below.
In this unit you learned about the SDMX components, or building blocks, for recoding data.
Which of the following best describes the role of a representation map?
Select your answer and then select Submit.
The structure map defines one or more component maps, each component map has one or more components from the source DSD, mapping to one or more components in the target DSD.
Each component map can link to a representation map, which is used to describe how the source values map to the target values.
The linked representation map links to source and target codelists, valuelists, or free text.
The correct answer is option 4.
The structure map defines one or more component maps, each component map has one or more components from the source DSD, mapping to one or more components in the target DSD.
Each component map can link to a representation map, which is used to describe how the source values map to the target values.
The linked representation map links to source and target codelists, valuelists, or free text.