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)
Details
- Page properties
-
- Content
-
... ... @@ -730,20 +730,27 @@ 730 730 |IdentifiableReference|Metadata type – not applicable 731 731 |DataSetReference|Metadata type – not applicable 732 732 733 - **Figure 14 – Mappings from SDMX data types to VTL Basic Scalar Types**733 +додол 734 734 735 +==== Figure 14 – Mappings from SDMX data types to VTL Basic Scalar Types ==== 736 + 735 735 When VTL takes in input SDMX artefacts, it is assumed that a type conversion according to the table above always happens. In case a different VTL basic scalar type is desired, it can be achieved in the VTL program taking in input the default VTL basic scalar type above and applying to it the VTL type conversion features (see the implicit and explicit type conversion and the "cast" operator in the VTL Reference Manual). 736 736 737 -=== 12.4.4 Mapping VTL basic scalar types to SDMX data types === 739 +1. 740 +11. 741 +111. Mapping VTL basic scalar types to SDMX data types 738 738 739 739 The following table describes the default conversion from the VTL basic scalar types to the SDMX data types . 740 740 741 741 |((( 742 742 VTL basic 747 + 743 743 scalar type 744 744 )))|((( 745 745 Default SDMX data type 751 + 746 746 (BasicComponentDataType 753 + 747 747 ) 748 748 )))|Default output format 749 749 |String|String|Like XML (xs:string) ... ... @@ -753,15 +753,17 @@ 753 753 |Time|StandardTimePeriod|<date>/<date> (as defined above) 754 754 |time_period|((( 755 755 ReportingTimePeriod 763 + 756 756 (StandardReportingPeriod) 757 757 )))|((( 758 758 YYYY-Pppp 767 + 759 759 (according to SDMX ) 760 760 ))) 761 761 |Duration|Duration|Like XML (xs:duration) PnYnMnDTnHnMnS 762 762 |Boolean|Boolean|Like XML (xs:boolean) with the values "true" or "false" 763 763 764 - **Figure 14 – Mappings from SDMX data types to VTL Basic Scalar Types**773 +==== Figure 14 – Mappings from SDMX data types to VTL Basic Scalar Types ==== 765 765 766 766 In case a different default conversion is desired, it can be achieved through the CustomTypeScheme and CustomType artefacts (see also the section 767 767 ... ... @@ -819,13 +819,17 @@ 819 819 820 820 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{{footnote}}The representation given in the DSD should obviously be compatible with the VTL data type.{{/footnote}}. 821 821 822 -=== 12.4.3 Null Values === 831 +1. 832 +11. 833 +111. Null Values 823 823 824 824 In the conversions from SDMX to VTL it is assumed by default that a missing value in SDMX becomes a NULL in VTL. After the conversion, the NULLs can be manipulated through the proper VTL operators. 825 825 826 826 On the other side, the VTL programs can produce in output NULL values for Measures and Attributes (Null values are not allowed in the Identifiers). In the conversion from VTL to SDMX, it is assumed that a NULL in VTL becomes a missing value in SDMX. In the conversion from VTL to SDMX, the default assumption can be overridden, separately for each VTL basic scalar type, by specifying which the value that represents the NULL in SDMX is. This can be specified in the attribute "nullValue" of the CustomType artefact (see also the section Transformations and Expressions of the SDMX information model). A CustomType belongs to a CustomTypeScheme, which can be referenced by one or more TransformationScheme (i.e. VTL programs). The overriding assumption is applied for all the SDMX Dataflows calculated in the TransformationScheme. 827 827 828 -=== 12.4.5 Format of the literals used in VTL Transformations === 839 +1. 840 +11. 841 +111. Format of the literals used in VTL Transformations 829 829 830 830 The VTL programs can contain literals, i.e. specific values of certain data types written directly in the VTL definitions or expressions. The VTL does not prescribe a specific format for the literals and leave the specific VTL systems and the definers of VTL Transformations free of using their preferred formats. 831 831 ... ... @@ -839,6 +839,7 @@ 839 839 840 840 In case a literal is operand of a VTL Cast operation, the format specified in the Cast overrides all the possible otherwise specified formats. 841 841 855 + 842 842 ---- 843 843 844 844 {{putFootnotes/}}