Changes for page 12 Validation and Transformation Language (VTL)
Last modified by Artur on 2025/09/10 11:19
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Attachments (0 modified, 0 added, 1 removed)
Details
- Page properties
-
- Content
-
... ... @@ -18,7 +18,7 @@ 18 18 19 19 This section does not explain the VTL language or any of the content published in the VTL guides. Rather, this is a description of how the VTL can be used in the SDMX context and applied to SDMX artefacts. 20 20 21 -== 12.2 References to SDMX artefacts from VTL statements ==21 +== 12.2 References to SDMX artefacts from VTL statements == 22 22 23 23 === 12.2.1 Introduction === 24 24 ... ... @@ -116,7 +116,7 @@ 116 116 117 117 by omitting all the non-essential parts would become simply: 118 118 119 -> DFR : =DF1 + DF2119 +> DFR : = DF1 + DF2 120 120 121 121 The references to the Codelists can be simplified similarly. For example, given the non-abbreviated reference to the Codelist AG:CL_FREQ(1.0.0), which is{{footnote}}Single quotes are needed because this reference is not a VTL regular name. 19 Single quotes are not needed in this case because CL_FREQ is a VTL regular name.{{/footnote}}: 122 122 ... ... @@ -452,31 +452,26 @@ 452 452 453 453 > ‘DF2(1.0.0)/GDPPERCAPITA.USA’ <- expression11; ‘DF2(1.0.0)/GDPPERCAPITA.CANADA’ <- expression12; 454 454 > … … … 455 -> ‘DF2(1.0.0)/POPGROWTH.USA’ <- expression21;455 +> ‘DF2(1.0.0)/POPGROWTH.USA’ <- expression21; 456 456 > ‘DF2(1.0.0)/POPGROWTH.CANADA’ <- expression22; 457 457 > … … … 458 458 459 459 As said, it is assumed that these VTL derived Data Sets have the TIME_PERIOD as the only identifier. In the mapping from VTL to SMDX, the Dimensions INDICATOR and COUNTRY are added to the VTL data structure on order to obtain the SDMX one, with the following values respectively: 460 460 461 -VTL dataset INDICATOR value COUNTRY value462 - 463 -> ‘DF2(1.0.0)/GDPPERCAPITA.USA’ GDPPERCAPITA USA461 +> VTL dataset INDICATOR value COUNTRY value 462 +> 463 +> ‘DF2(1.0.0)/GDPPERCAPITA.USA’ GDPPERCAPITA USA 464 464 > ‘DF2(1.0.0)/GDPPERCAPITA.CANADA’ GDPPERCAPITA CANADA … … … 465 -> ‘DF2(1.0.0)/POPGROWTH.USA’ POPGROWTH USA 466 -> ‘DF2(1.0.0)/POPGROWTH.CANADA’ POPGROWTH CANADA 465 +> 466 +> ‘DF2(1.0.0)/POPGROWTH.USA’ POPGROWTH USA 467 +> ‘DF2(1.0.0)/POPGROWTH.CANADA’ POPGROWTH CANADA 467 467 > … … … 468 468 469 469 It should be noted that the application of this many-to-one mapping from VTL to SDMX is equivalent to an appropriate sequence of VTL Transformations. These use the VTL operator “calc” to add the proper VTL identifiers (in the example, INDICATOR and COUNTRY) and to assign to them the proper values and the operator “union” in order to obtain the final VTL dataset (in the example DF2(1.0.0)), that can be mapped oneto-one to the homonymous SDMX Dataflow. Following the same example, these VTL Transformations would be: 470 470 471 -> DF2bis_GDPPERCAPITA_USA := ‘DF2(1.0.0)/GDPPERCAPITA.USA’ [calc identifier INDICATOR := ”GDPPERCAPITA”, identifier COUNTRY := ”USA”]; 472 -> DF2bis_GDPPERCAPITA_CANADA := ‘DF2(1.0.0)/GDPPERCAPITA.CANADA’ [calc identifier INDICATOR:=”GDPPERCAPITA”, identifier COUNTRY:=”CANADA”]; … … … 473 -> DF2bis_POPGROWTH_USA := ‘DF2(1.0.0)/POPGROWTH.USA’ [calc identifier INDICATOR := ”POPGROWTH”, identifier COUNTRY := ”USA”]; 474 -> DF2bis_POPGROWTH_CANADA’ := ‘DF2(1.0.0)/POPGROWTH.CANADA’ [calc identifier INDICATOR := ”POPGROWTH”, identifier COUNTRY := ”CANADA”]; … … … 475 -> DF2(1.0) <- UNION (DF2bis_GDPPERCAPITA_USA’, 476 -> DF2bis_GDPPERCAPITA_CANADA’, 472 +> DF2bis_GDPPERCAPITA_USA := ‘DF2(1.0.0)/GDPPERCAPITA.USA’ [calc identifier INDICATOR := ”GDPPERCAPITA”, identifier COUNTRY := ”USA”]; DF2bis_GDPPERCAPITA_CANADA := ‘DF2(1.0.0)/GDPPERCAPITA.CANADA’ [calc identifier INDICATOR:=”GDPPERCAPITA”, identifier COUNTRY:=”CANADA”];… … … DF2bis_POPGROWTH_USA := ‘DF2(1.0.0)/POPGROWTH.USA’ [calc identifier INDICATOR := ”POPGROWTH”, identifier COUNTRY := ”USA”]; DF2bis_POPGROWTH_CANADA’ := ‘DF2(1.0.0)/POPGROWTH.CANADA’ [calc identifier INDICATOR := ”POPGROWTH”, identifier COUNTRY := ”CANADA”];… … … DF2(1.0) <- UNION (DF2bis_GDPPERCAPITA_USA’, DF2bis_GDPPERCAPITA_CANADA’, 477 477 > … , 478 -> DF2bis_POPGROWTH_USA’, 479 -> DF2bis_POPGROWTH_CANADA’ 474 +> DF2bis_POPGROWTH_USA’, DF2bis_POPGROWTH_CANADA’ 480 480 > …); 481 481 482 482 In other words, starting from the datasets explicitly calculated through VTL (in the example ‘DF2(1.0)/GDPPERCAPITA.USA’ and so on), the first step consists in calculating other (non-persistent) VTL datasets (in the example 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. ... ... @@ -655,7 +655,7 @@ 655 655 GregorianTimePeriod 656 656 (superset of GregorianYear, GregorianYearMonth, and GregorianDay) 657 657 )))|(% style="width:221px" %)date 658 -|(% style="width:360px" %)GregorianYear (YYYY)|(% style="width:221px" %)date653 +|(% style="width:360px" %)GregorianYear (YYYY)|(% style="width:221px" %)date 659 659 |(% style="width:360px" %)GregorianYearMonth / GregorianMonth (YYYY-MM)|(% style="width:221px" %)date 660 660 |(% style="width:360px" %)GregorianDay (YYYY-MM-DD)|(% style="width:221px" %)date 661 661 |(% style="width:360px" %)(((
- 1750067055028-964.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -xwiki:XWiki.helena - Size
-
... ... @@ -1,1 +1,0 @@ 1 -5.5 KB - Content