Changes for page 12 Validation and Transformation Language (VTL)
Last modified by Helena on 2025/09/10 11:19
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -533,7 +533,7 @@ 533 533 534 534 DF2bis_GDPPERCAPITA_USA and so on) by adding the identifiers INDICATOR and COUNTRY with the desired values (//INDICATORvalue// and //COUNTRYvalue)//. Finally, all these non-persistent Data Sets are united and give the final result DF2(1.0){{footnote}}The result is persistent in this example but it can be also non persistent if needed.{{/footnote}}, which can be mapped one-to-one to the homonymous SDMX Dataflow having the dimension components TIME_PERIOD, INDICATOR and COUNTRY. 535 535 536 -Therefore, mapping different VTL datasets having the same data structure to different parts of a SDMX Dataflow, i.e. in the direction from VTL to SDMX, through the ordered concatenation notation is equivalent to a proper use of the operators “calc” and “union” on such datasets.{{footnote}}In case the ordered concatenation notation from VTL to SDMX is used, the set of Transformations described above is implicitly performed; therefore, in order to test the overall compliance of the VTL program to the VTL consistency rules, these implicit Transformations have to be considered as part of the VTL program even if they are not explicitly coded.{{/footnote}} 536 +Therefore, mapping different VTL datasets having the same data structure to different parts of a SDMX Dataflow, i.e. in the direction from VTL to SDMX, through the ordered concatenation notation is equivalent to a proper use of the operators “calc” and “union” on such datasets.{{footnote}}In case the ordered concatenation notation from VTL to SDMX is used, the set of Transformations described above is implicitly performed; therefore, in order to test the overall compliance of the VTL program to the VTL consistency rules, these implicit Transformations have to be considered as part of the VTL program even if they are not explicitly coded.{{/footnote}}{{footnote}}Through SDMX Constraints, it is possible to specify the values that a Component of a Dataflow can assume.{{/footnote}} 537 537 538 538 It is worth noting that in the direction from VTL to SDMX it is mandatory to specify the value for every Dimension on which the mapping is based (in other word, in the name of the calculated VTL dataset is __not__ possible to omit the value of some of the Dimensions). 539 539 ... ... @@ -541,51 +541,52 @@ 541 541 542 542 With reference to the VTL “model for Variables and Value domains”, the following additional mappings have to be considered: 543 543 544 -(% style="width:1170.29px" %) 545 -|**VTL**|(% style="width:754px" %)**SDMX** 546 -|**Data Set Component**|(% style="width:754px" %)Although this abstraction exists in SDMX, it does not have an explicit definition and correspond to a Component (either a DimensionComponent or a Measure or a DataAttribute) belonging to one specific Dataflow{{footnote}}Through SDMX Constraints, it is possible to specify the values that a Component of a Dataflow can assume.{{/footnote}} 547 -|**Represented Variable**|(% style="width:754px" %)((( 544 +|VTL|SDMX 545 +|**Data Set Component**|Although this abstraction exists in SDMX, it does not have an explicit definition and correspond to a Component (either a DimensionComponent or a Measure or a DataAttribute) belonging to one specific Dataflow^^43^^ 546 +|**Represented Variable**|((( 548 548 **Concept** with a definite 549 549 550 550 Representation 551 551 ))) 552 -|**Value Domain**|( % style="width:754px" %)(((551 +|**Value Domain**|((( 553 553 **Representation** (see the Structure 554 554 555 555 Pattern in the Base Package) 556 556 ))) 557 -|**Enumerated Value Domain / Code List**| (% style="width:754px" %)**Codelist**558 -|**Code**|( % style="width:754px" %)(((556 +|**Enumerated Value Domain / Code List**|**Codelist** 557 +|**Code**|((( 559 559 **Code** (for enumerated 560 560 561 561 DimensionComponent, Measure, DataAttribute) 562 562 ))) 563 -|**Described Value Domain**|( % style="width:754px" %)(((564 -non-enumerated** Representation** 562 +|**Described Value Domain**|((( 563 +non-enumerated** Representation** 565 565 566 566 (having Facets / ExtendedFacets, see the Structure Pattern in the Base Package) 567 567 ))) 568 -|**Value**|(% style="width:754px" %)Although this abstraction exists in SDMX, it does not have an explicit definition and correspond to a **Code** of a Codelist (for enumerated Representations) or 569 -| |(% style="width:754px" %)((( 570 -to a valid **value **(for non-enumerated** **Representations) 567 +|**Value**|Although this abstraction exists in SDMX, it does not have an explicit definition and correspond to a **Code** of a Codelist (for enumerated Representations) or 568 +| |((( 569 +to a valid **value **(for non-enumerated** ** 570 + 571 +Representations) 571 571 ))) 572 -|**Value Domain Subset / Set**| (% style="width:754px" %)This abstraction does not exist in SDMX573 -|**Enumerated Value Domain Subset / Enumerated Set**| (% style="width:754px" %)This abstraction does not exist in SDMX574 -|**Described Value Domain Subset / Described Set**| (% style="width:754px" %)This abstraction does not exist in SDMX575 -|**Set list**| (% style="width:754px" %)This abstraction does not exist in SDMX573 +|**Value Domain Subset / Set**|This abstraction does not exist in SDMX 574 +|**Enumerated Value Domain Subset / Enumerated Set**|This abstraction does not exist in SDMX 575 +|**Described Value Domain Subset / Described Set**|This abstraction does not exist in SDMX 576 +|**Set list**|This abstraction does not exist in SDMX 576 576 577 577 The main difference between VTL and SDMX relies on the fact that the VTL artefacts for defining subsets of Value Domains do not exist in SDMX, therefore the VTL features for referring to predefined subsets are not available in SDMX. These artefacts are the Value Domain Subset (or Set), either enumerated or described, the Set List (list of values belonging to enumerated subsets) and the Data Set Component (aimed at defining the set of values that the Component of a Data Set can take, possibly a subset of the codes of Value Domain). 578 578 579 -Another difference consists in the fact that all Value Domains are considered as identifiable objects in VTL either if enumerated or not, while in SDMX the Codelist (corresponding to a VTL enumerated Value Domain) is identifiable, while the SDMX non-enumerated Representation (corresponding to a VTL non-enumerated Value Domain) is not identifiable. As a consequence, the definition of the VTL Rulesets, which in VTL can refer either to enumerated or non-enumerated value domains, in SDMX can refer only to enumerated Value Domains (i.e. to SDMX Codelists). As for the mapping between VTL variables and SDMX Concepts, it should be noted that these artefacts do not coincide perfectly. In fact, the VTL variables are represented variables, defined always on the same Value Domain (“Representation” in SDMX) independently of the data set / data structure in which they appear {{footnote}}By usingrepresented variables,VTL can assume thatdatastructureshavingthesamevariablesasidentifierscanbecomposedone anotherbecause thecorrespondentvaluescanmatch.{{/footnote}}, while the SDMX Concepts can have different Representations in different DataStructures.{{footnote}}AConceptbecomesaComponentin aDataStructureDefinition,andComponents canhavedifferentLocalRepresentationsindifferentDataStructureDefinitions,alsooverridingthe(possible)base representationoftheConcept.{{/footnote}}This means that one SDMX Concept can correspond to many VTL Variables, one for each representation the Concept has.580 +Another difference consists in the fact that all Value Domains are considered as identifiable objects in VTL either if enumerated or not, while in SDMX the Codelist (corresponding to a VTL enumerated Value Domain) is identifiable, while the SDMX non-enumerated Representation (corresponding to a VTL non-enumerated Value Domain) is not identifiable. As a consequence, the definition of the VTL Rulesets, which in VTL can refer either to enumerated or non-enumerated value domains, in SDMX can refer only to enumerated Value Domains (i.e. to SDMX Codelists). As for the mapping between VTL variables and SDMX Concepts, it should be noted that these artefacts do not coincide perfectly. In fact, the VTL variables are represented variables, defined always on the same Value Domain (“Representation” in SDMX) independently of the data set / data structure in which they appear^^[[(% class="wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink" %)^^40^^>>path:#sdfootnote40sym||name="sdfootnote40anc"]](%%)^^, while the SDMX Concepts can have different Representations in different DataStructures.^^[[(% class="wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink" %)^^41^^>>path:#sdfootnote41sym||name="sdfootnote41anc"]](%%)^^ This means that one SDMX Concept can correspond to many VTL Variables, one for each representation the Concept has. 580 580 581 581 Therefore, it is important to be aware that some VTL operations (for example the binary operations at data set level) are consistent only if the components having the same names in the operated VTL Data Sets have also the same representation (i.e. the same Value Domain as for VTL). For example, it is possible to obtain correct results from the VTL expression 582 582 583 -DS_c := DS_a + DS_b (where DS_a, DS_b, DS_c are VTL Data Sets) 584 +DS_c := DS_a + DS_b (where DS_a, DS_b, DS_c are VTL Data Sets) if the matching components in DS_a and DS_b (e.g. ref_date, geo_area, sector …) refer to the same general representation. In simpler words, DS_a and DS_b must use the same values/codes (for ref_date, geo_area, sector … ), otherwise the relevant values would not match and the result of the operation would be wrong. 584 584 585 -if the matching components in DS_a and DS_b (e.g. ref_date, geo_area, sector …) refer to the same general representation. In simpler words, DS_a and DS_b must use the same values/codes (for ref_date, geo_area, sector … ), otherwise the relevant values would not match and the result of the operation would be wrong. 586 - 587 587 As mentioned, the property above is not enforced by construction in SDMX, and different representations of the same Concept can be not compatible one another (for example, it may happen that geo_area is represented by ISO-alpha-3 codes in DS_a and by ISO alpha-2 codes in DS_b). Therefore, it will be up to the definer of VTL 588 588 588 +[[image:SDMX 3-0-0 SECTION 6 FINAL-1.0_en_59eee18f.gif||alt="Shape5" height="1" width="192"]] 589 + 589 589 Transformations to ensure that the VTL expressions are consistent with the actual representations of the correspondent SDMX Concepts. 590 590 591 591 It remains up to the SDMX-VTL definer also the assurance of the consistency between a VTL Ruleset defined on Variables and the SDMX Components on which the Ruleset is applied. In fact, a VTL Ruleset is expressed by means of the values of the Variables (i.e. SDMX Concepts), i.e. assuming definite representations for them (e.g. ISOalpha-3 for country). If the Ruleset is applied to SDMX Components that have the same name of the Concept they refer to but different representations (e.g. ISO-alpha-2 for country), the Ruleset cannot work properly. ... ... @@ -1045,7 +1045,7 @@ 1045 1045 |N|fixed number of digits used in the preceding textual representation of the month or the day 1046 1046 | | 1047 1047 1048 -The default conversion, either standard or customized, can be used to deduce automatically the representation of the components of the result of a VTL Transformation. In alternative, the representation of the resulting SDMX Dataflow can be given explicitly by providing its DataStructureDefinition. In other words, the representation specified in the DSD, if available, overrides any default conversion^^[[(% class="wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink" %)^^42^^>>path:#sdfootnote42sym||name="sdfootnote42anc"]](%%)^^.1049 +The default conversion, either standard or customized, can be used to deduce automatically the representation of the components of the result of a VTL Transformation. In alternative, the representation of the resulting SDMX Dataflow can be given explicitly by providing its DataStructureDefinition. In other words, the representation specified in the DSD, if available, overrides any default conversion^^[[(% class="wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink" %)^^42^^>>path:#sdfootnote42sym||name="sdfootnote42anc"]](%%)^^. 1049 1049 1050 1050 === 12.4.5 Null Values === 1051 1051