Unit 6: Use Case #3 – Many-to-One Mapping

In this unit, we'll consider our third use case, this time involving many-to-one mapping.

Many-to-one mapping

As we move onto the third use case scenario involving transcoding data using a many-to-one mapping, you'll see very quickly that it's really the reverse of the one-to-many use case. However, it has the same two possible solutions, which involve choosing between one of the following:

  • Split the rules into individual maps, or
  • Describe the relationship in a single map

Let's look at an example of a challenge and how it's solved using one of these solutions.

Select each option to discover more.

Challenge
The example use case has Dimensions SEX, EDU_LEVEL, and STAT_UNIT, whose values are to be combined in a mapped DSD as a single Dimension with ID INDICATOR and unique series INDICATOR1, INDICATOR2, INDICATOR3.
Solution A
This type of use case can be solved by creating three component maps:
  • Component Map 1: Source=SEX Target=INDICATOR
  • Component Map 2: Source=EDU_LEVEL Target=INDICATOR
  • Component Map 3: Source=STAT_UNIT Target=INDICATOR

Each component map is backed by a representation map, which maps the value of the Unique Key to the output as follows:

Select the representation map to enlarge.

Solution B

The second solution involves creating a single component map, which maps the three sources (SEX, EDU_LEVEL, STAT_UNIT) to the output INDICATOR.

A Single Representation Map is required to map the three inputs to the INDICATOR output.

  • Representation Map = SEX:EDU_LEVEL:STAT_UNIT -> INDICATOR
  • Values:
    • _T:PRIMARY:ENROLMENT=INDICATOR1
    • F:PRIMARY:ENROLMENT=INDICATOR2
    • M:PRIMARY:ENROLMENT=INDICATOR3
Reflection
As with the one-to-many use case, the choice of whether to split the mapping up into separate components (Solution A) versus a single rule (Solution B), should be based on what will be more maintainable and understandable, along with whether individual mapping rules will be reused by other structure maps or not.

Coming next

Now, it's time to take a look at our fourth and final use case involving many-to-many mapping.

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.