Book page

VTL 2.0

• 14 November 2023

Validation and transformation language (VTL) is a standard language for defining validation and transformation rules (set of operators, their syntax and semantics) for any kind of statistical data. 

In the ESS, VTL offers the possibility to formalise data validation algorithms for sharing validation rules between Eurostat and data providers. This contributes to specify the quality requirements expected on data to be exchanged in the ESS and facilitates validation prior to data exchange.


Important high level characteristics that have been taken into account for the development of VTL are:

  • User orientation,
  • Integrated approach,
  • Active role for processing,
  • Independence of IT implementation,
  • Extensibility, customizability,
  • Language effectiveness.

Main operators and functions of VTL 2.0

Main operators and functions of VTL 2.0

 

Example of validation rule in VTL 2.0 code

Validation rule:

(VAD) Values for Aggregates are consistent with details

VTL code:

ds_Total:= IntraEUTravellers [ sub AGE = "TOTAL" ] ;

ds_SumDetails:= sum(IntraEUTravellers [ filter AGE in {"Y0", "Y1", "Y2", … , "Y122", “UNK”} ]

                                                group by  AGE);

 

check ( abs(ds_Total - ds_SumDetails) / ds_Total <  0.01,

                errorcode ("The total number of travellers should correspond (+/-1%) to the sum of travelers of all ages"), errorlevel ("Warning"))

 

Quick Guide on VTL 2.0 (26 pages)

VTL 2.0 Quick Reference Guide (January 2019)

Validation and Transformation Language (VTL) on the SDMX website