Unit 7: Use Case #4 – Many-to-Many Mapping

In this unit, we'll examine the final use case involving many-to-many mapping.

Many-to-many mapping explained

When it comes to many-to-many mapping, recoding of data can be very complex and SDMX and FMR respond to this complexity by supporting the use of regular expressions (regex) to specify recoding rules.

The structure map defines the source and target DSD. However, if the mapping is dataflow-specific, the structure map defines the source and target dataflow.

The source DSD/dataflow is the one from which the data will be input into the mapping.

While the mapping rules are bi-directional (data mapped one way can be mapped back again) for more complex mappings, which include regular expression matches or substring matches on the source, it is not always possible to map back again.

Therefore, the source DSD or dataflow should be selected based on where the data is coming from, and the target is where the data is going as a result of the mapping.

Many-to-many mapping

Let's take a closer look at the structure maps, component maps and representation maps used in this use case scenario.

Select each option below to learn more.

Structure and component maps
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
  • Can link to a representation map
Representation maps
Each representation map:
  • 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.
  • 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, if a component map has two sources REF_AREA and CURRENCY, then the linked representation map must also have two sources: one for the REF_AREA Codelist and the other for the CURRENCY Codelist.)
  • Can include complex rules, such as regular expressions (regex) on source values
  • Can even define periods of time for which a mapping relationship is true (For example, if a relationship between source country and target currency is defined then one could map France to the French Franc up until 2002 and then map France to the Euro from 2002 onwards.)

If values do not require mapping, (for example, if 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 link will inform the system that the value should be copied across verbatim.

Reflection
Recoding capabilities in SDMX are extremely powerful and the possibilities are endless. The best way to become familiar with SDMX capabilities for recoding and transcoding data is to experiment with both simple and more complex transcoding scenarios.

What do you know?

Now that we have reviewed the various types of mappings, let's try a question.

When presented with a challenge that is most logically solved by splitting the rules into individual maps or describing the relationship in a single map, what type of mapping is being used to transcode the data?

Select all that apply and then select Submit.

Coming next

In the final unit, a short video on testing.

AI assistant

Need help finding something? I am an AI Assistant that's here to help!

Welcome to SDMX AI assistant

What are you looking for?

SDMX AI assistant

By using this AI-powered service ("Service"), you acknowledge and agree to the following:

This Service uses generative AI to assist with statistical analysis and research. While the Service strives to deliver useful information, the output ("Output") may contain inaccuracies, omissions, or biases. The Output is provided for informational purposes only and should not be considered professional advice. You remain responsible for how you interpret and use the Output.

The BIS makes no warranties regarding the accuracy or completeness of the Output and accepts no liability for any loss or damage resulting from its use.

Do not include or share personal, private, confidential or proprietary information when using the Service.

By using this technology, you agree to the Terms and Conditions.

How the assistant can help you

Understand SDMX standards

Ask and get clear explanations about SDMX standards.

Navigate the website

Find tools and documentation on website quickly.

Explore SDMX tools

Ask about API, software and libraries supporting SDMX.

Access documentation

Locate technical guides, specifications, and FAQs.