sdmx-twg / vtl

This repository is used for maintaining the SDMX-VTL specification
11 stars 7 forks source link

IM inconsistency in accessing artefacts #37

Closed stratosn closed 1 year ago

stratosn commented 7 years ago
reporter issue reference document (UM/RM/EBNF) page line
PL-CSO-25 UM 85 431
PL-CSO-25 RM 23 431
BDI-8 UM 85 All
BDI-9 UM 85 All

Description

There is no operator for referencing code lists too extensive for defining inline (e.g. NUTS 3) Add suitable operator(s) or modify defineValueDomain and defineValueDomainSubset.

Initially proposed solution

Allow referencing external code lists (like operator “get” references persistent datasets). Optionally allow transforming datasets into code lists.

Additional clarifications

In VTL-ML it should be possible either to use artefacts defined through the VTL-DL or to refer to external artefacts (e.g. coming from other standards). At the moment this feature is not homogeneously granted. For example, the VTL-ML allows to refer Value Domains/Code Lists, Sets, Code Item Relations defined through VTL-DL but does not allow to read Value Domains/Code List, Sets, Code Item Relations externally stored. On the contrary, VTL-ML allows to read the Data Set extensions of persistent Data Sets externally stored, but does not allow to define the Data Set extensions through VTL-DL. This general principle should be described in the User Manual (at the moment it is not). Moreover, in the Reference Manual, for each VTL IM artefact which needs to be referenced by VTL expressions, it should be granted that both the possibilities are allowed, i.e. either define the artefact through the VTL-DL or access the artefact externally stored. For achieving the former goal, all the needed artefacts should be definable through the VTL-DL (even the Data Set extensions for example), for the latter goal, there should exist operator/s which allows accessing all the needed artefacts when externally stored (for example it should be possible to access Value Domains/Code Lists, Sets, Code Item Relations externally stored); this/these operator/s should have a goal similar to the GET, which allows accessing Data Set extensions externally stored In VTL-ML it should be possible either to use persistent artefacts (meaning both the artefacts defined through the VTL-DL and externally stored, as described in the previous point) or to use non-persistent artefacts, e.g. artefacts directly written in-line, within the VTL-ML expressions. At the moment this feature is not homogeneously granted. For example, it is not possible to write in line the Data Points that form the extension of a Data Set. The general principle should be described in the User Manual (at the moment it is not). Moreover, in the Reference Manual, for each VTL IM artefact which needs to be used, it should be granted that VTL-ML allows to write it in-line (e.g. even the extension of a Data Set). If an artefact is written in-line it should be considered as non-persistent and therefore is not identified and cannot be reused. It should also be clarified that if an artefact is written in-line in a Ruleset (i.e. by using VTL-DL and not VTL-ML), although in itself it is not identified and non-persistent, nevertheless the Ruleset is identified and persistent and can be reused (therefore the artefact can be reused only within the Ruleset).

Proposed solution

Harmonized with the proposal for issue #36.

The proposed VTL type and module system (see the latest version of type-sys-update-YYYY-MM-DD.pdf attached in comments to issue #36) foresees modules as the main tool for organizing VTL code in a set of reusable units and for making different kinds of named objects, including in particular the IM artefacts, visible to VTL code:

bellomarini commented 7 years ago

Just a clarification. Since the operators have positional and strongly-typed parameters, it is not necessary to have specific literal syntaxes to denote the various data types of the artefacts.

This means, that unlike basic types, whose literals must be distinguishable from their syntax (e.g. 2.0 is a double, 2 is an integer, "2" is a string), it is not the case for names referring to artefacts, as the context makes then unambiguous.

This assumption is also valid for the in-line definition of such artefacts, as we have explicit operators for the various artefacts, which are assumed to exclude name conflicts (also between persistent and temporary ones).