Changes for page 13 Structure Mapping

Last modified by Artur on 2025/09/10 11:19

From version 4.13
edited by Helena
on 2025/06/16 15:02
Change comment: There is no comment for this version
To version 4.21
edited by Helena
on 2025/06/16 15:26
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -478,86 +478,81 @@
478 478  
479 479  )))
480 480  
481 -The bold Dimensions map from source to target verbatim. The mapping simply specifies:
481 +The bold [[Dimensions>>doc:sdmx:Glossary.Dimension.WebHome]] (% style="color:#e74c3c" %)map(%%) from source to target verbatim. The mapping simply specifies:
482 482  
483 -FREQ => FREQ
483 +> FREQ => FREQ
484 +> REF_AREA=> REF_AREA
485 +> COUNTERPART_AREA=> COUNTERPART _AREA
484 484  
485 -REF_AREA=> REF_AREA
487 +No [[Representation>>doc:sdmx:Glossary.Representation.WebHome]] Mapping is required. The source value simply copies across unmodified.
486 486  
487 -COUNTERPART_AREA=> COUNTERPART _AREA
489 +The remaining [[Dimensions>>doc:sdmx:Glossary.Dimension.WebHome]] all (% style="color:#e74c3c" %)map(%%) to the Indicator [[Dimension>>doc:sdmx:Glossary.Dimension.WebHome]]. This is an example of many [[Dimensions>>doc:sdmx:Glossary.Dimension.WebHome]] mapping to one [[Dimension>>doc:sdmx:Glossary.Dimension.WebHome]]. In this case a [[Representation>>doc:sdmx:Glossary.Representation.WebHome]] Mapping is required, and the mapping first describes the input 'partial key' and how this (% style="color:#e74c3c" %)maps(%%) to the target indicator:
488 488  
489 -No Representation Mapping is required. The source value simply copies across unmodified.
491 +> N:S1:S1:B:B5G => IND_ABC
490 490  
491 -The remaining Dimensions all map to the Indicator Dimension. This is an example of many Dimensions mapping to one Dimension. In this case a Representation Mapping is required, and the mapping first describes the input 'partial key' and how this maps to the target indicator:
493 +Where the key sequence is based on the order specified in the (% style="color:#e74c3c" %)mapping(%%) (i.e [[ADJUSTMENT>>doc:sdmx:Glossary.Adjustment.WebHome]], REF_SECTOR, etc will result in the first value N being taken from [[ADJUSTMENT>>doc:sdmx:Glossary.Adjustment.WebHome]] as this was the first item in the source [[Dimension>>doc:sdmx:Glossary.Dimension.WebHome]] list.
492 492  
493 -N:S1:S1:B:B5G => IND_ABC
495 +**Note**: The key order is NOT based on the [[Dimension>>doc:sdmx:Glossary.Dimension.WebHome]] order of the [[DSD>>doc:sdmx:Glossary.Data structure definition.WebHome]], as the (% style="color:#e74c3c" %)mapping(%%) needs to be resilient to the [[DSD>>doc:sdmx:Glossary.Data structure definition.WebHome]] changing.
494 494  
495 -Where the key sequence is based on the order specified in the mapping (i.e ADJUSTMENT, REF_SECTOR, etc will result in the first value N being taken from ADJUSTMENT as this was the first item in the source Dimension list.
497 +=== 13.10.2 Mapping other data types to Code Id ===
496 496  
497 -**Note**: The key order is NOT based on the Dimension order of the DSD, as the mapping needs to be resilient to the DSD changing.
499 +In the case where the incoming data type is not a string and not a [[code>>doc:sdmx:Glossary.Code.WebHome]] identifier i.e. the source [[Dimension>>doc:sdmx:Glossary.Dimension.WebHome]] is of type Integer and the target is Codelist. This is supported by the RepresentationMap. The RepresentationMap source can reference a Codelist, Valuelist, or be free text, the free text can include regular expressions.
498 498  
499 -1.
500 -11.
501 -111. Mapping other data types to Code Id
501 +The following [[representation>>doc:sdmx:Glossary.Representation.WebHome]] (% style="color:#e74c3c" %)mapping(%%) can be used to explicitly (% style="color:#e74c3c" %)map(%%) each [[age>>doc:sdmx:Glossary.Age.WebHome]] to an output [[code>>doc:sdmx:Glossary.Code.WebHome]].
502 502  
503 -In the case where the incoming data type is not a string and not a code identifier i.e. the source Dimension is of type Integer and the target is Codelist. This is supported by the RepresentationMap. The RepresentationMap source can reference a Codelist, Valuelist, or be free text, the free text can include regular expressions.
503 +(% style="width:402.294px" %)
504 +|(% style="width:197px" %)**Source Input Free Text**|(% style="width:204px" %)**Desired Output Code Id**
505 +|(% style="width:197px" %)0|(% style="width:204px" %)A
506 +|(% style="width:197px" %)1|(% style="width:204px" %)A
507 +|(% style="width:197px" %)2|(% style="width:204px" %)A
508 +|(% style="width:197px" %)3|(% style="width:204px" %)B
509 +|(% style="width:197px" %)4|(% style="width:204px" %)B
504 504  
505 -The following representation mapping can be used to explicitly map each age to an output code.
506 -
507 -|Source Input Free Text|Desired Output Code Id
508 -|0|A
509 -|1|A
510 -|2|A
511 -|3|B
512 -|4|B
513 -
514 514  If this mapping takes advantage of regular expressions it can be expressed in two rules:
515 515  
513 +(% style="width:336.294px" %)
514 +|(% style="width:182px" %)**Regular Expression**|(% style="width:151px" %)**Desired Output**
515 +|(% style="width:182px" %)[0-2]|(% style="width:151px" %)A
516 +|(% style="width:182px" %)[3-4]|(% style="width:151px" %)B
516 516  
517 -Regular Expression Desired Output
518 +=== 13.10.3 Observation Attributes for Time Period ===
518 518  
519 -|[0-2]|A
520 -|[3-4]|B
520 +This use case is where a specific observation for a specific [[time period>>doc:sdmx:Glossary.Time period.WebHome]] has an [[attribute>>doc:sdmx:Glossary.Attribute.WebHome]] value.
521 521  
522 -=== 13. Observation Attributes for Time Period ===
522 +(% style="width:621.294px" %)
523 +|(% style="width:201px" %)Input INDICATOR|(% style="width:192px" %)Input TIME_PERIOD|(% style="width:225px" %)Output OBS_CONF
524 +|(% style="width:201px" %)XULADS|(% style="width:192px" %)2008|(% style="width:225px" %)C
525 +|(% style="width:201px" %)XULADS|(% style="width:192px" %)2009|(% style="width:225px" %)C
526 +|(% style="width:201px" %)XULADS|(% style="width:192px" %)2010|(% style="width:225px" %)C
523 523  
524 -This use case is where a specific observation for a specific time period has an attribute value.
528 +Or using a validity period on the [[Representation>>doc:sdmx:Glossary.Representation.WebHome]] Mapping:
525 525  
526 -|Input INDICATOR|Input TIME_PERIOD|Output OBS_CONF
527 -|XULADS|2008|C
528 -|XULADS|2009|C
529 -|XULADS|2010|C
530 +(% style="width:629.294px" %)
531 +|(% style="width:202px" %)Input INDICATOR|(% style="width:197px" %)Valid From/ Valid To|(% style="width:227px" %) Output OBS_CONF
532 +|(% style="width:202px" %)XULADS|(% style="width:197px" %) 2008/2010|(% style="width:227px" %)С
530 530  
531 -Or using a validity period on the Representation Mapping:
534 +=== 13.10.4  Time mapping ===
532 532  
533 -Input INDICATOR Valid From/ Valid To Output OBS_CONF
536 +This use case is to create a [[time period>>doc:sdmx:Glossary.Time period.WebHome]] from an input that does not respect [[SDMX>>doc:sdmx:Glossary.Statistical data and metadata exchange.WebHome]] Time Formats.
534 534  
535 -XULADS 2008/2010 C
538 +The [[Component>>doc:sdmx:Glossary.Component.WebHome]] Mapping from SYS_TIME to TIME_PERIOD specifies itself as a time mapping with the following details:
536 536  
537 -=== 13. Time mapping ===
540 +(% style="width:652.294px" %)
541 +|(% style="width:139px" %)Source Value|(% style="width:165px" %)Source Mapping|(% style="width:182px" %)Target Frequency|(% style="width:163px" %)Output
542 +|(% style="width:139px" %)18/07/1981|(% style="width:165px" %)dd/MM/yyyy|(% style="width:182px" %)A|(% style="width:163px" %)1981
538 538  
539 -This use case is to create a time period from an input that does not respect SDMX Time Formats.
544 +When the target frequency is based on another target [[Dimension>>doc:sdmx:Glossary.Dimension.WebHome]] value, in this example the value of the FREQ [[Dimension>>doc:sdmx:Glossary.Dimension.WebHome]] in the target [[DSD>>doc:sdmx:Glossary.Data structure definition.WebHome]].
540 540  
541 -The Component Mapping from SYS_TIME to TIME_PERIOD specifies itself as a time mapping with the following details:
546 +(% style="width:658.294px" %)
547 +|(% style="width:143px" %)Source Value|(% style="width:163px" %) Source Mapping|(% style="width:176px" %)Target Dimension|(% style="width:173px" %)Frequency Output
548 +|(% style="width:143px" %)18/07/1981|(% style="width:163px" %)dd/MM/yyyy|(% style="width:176px" %)FREQ|(% style="width:173px" %)1981-07-18 (when FREQ=D)
542 542  
543 -|Source Value|Source Mapping|Target Frequency|Output
544 -|18/07/1981|dd/MM/yyyy|A|1981
550 + When the source is a numerical format.
545 545  
546 -When the target frequency is based on another target Dimension value, in this example the value of the FREQ Dimension in the target DSD.
552 +(% style="width:658.294px" %)
553 +|(% style="width:143px" %)Source Value|(% style="width:163px" %) Start Period|(% style="width:176px" %)Interval|(% style="width:176px" %)Target FREQ|(% style="width:173px" %) Output
554 +|(% style="width:143px" %)1589808220|(% style="width:163px" %)1970|(% style="width:176px" %) millisecond|(% style="width:176px" %)M|(% style="width:173px" %)2020-05
547 547  
548 -Source Value Source Mapping Target Frequency Output
549 -
550 -Dimension
551 -
552 -|18/07/1981 dd/MM/yyyy FREQ| |1981-07-18 (when FREQ=D)
553 -| When the source is a numerical format| |
554 -|Source Value Start Period Interval|(((
555 -Target
556 -
557 -FREQ
558 -)))|Output
559 -|1589808220 1970 millisecond|M|2020-05
560 -
561 561  When the source frequency is lower than the target frequency additional information 3568 can be provided for resolve to start of period, end of period, or mid period, as shown 3569 in the following example:
562 562  
563 563   Source Value Source Mapping Target Frequency Output