VTL artefacts

Note

Additional information about how VTL artefacts can be used for validating and transforming SDMX data is available in the following tutorial:

Model for VTL artefacts.

class pysdmx.model.vtl.CustomType(id: str, uri: str | None = None, urn: str | None = None, name: str | None = None, description: str | None = None, data_type: str = '', null_value: str | None = None, output_format: str | None = None, vtl_literal_format: str | None = None, vtl_scalar_type: str = '', *, annotations: Sequence[Annotation] = ())

Custom specification for a VTL basic scalar type.

class pysdmx.model.vtl.CustomTypeScheme(id: str, uri: str | None = None, urn: str | None = None, name: str | None = None, description: str | None = None, version: str = '1.0', valid_from: datetime | None = None, valid_to: datetime | None = None, is_final: bool = False, is_external_reference: bool = False, service_url: str | None = None, structure_url: str | None = None, agency: str | Agency = '', items: Sequence[Item] = (), is_partial: bool = False, vtl_version: str | None = None, *, annotations: Sequence[Annotation] = ())

A collection of custom specifications for VTL basic scalar types.

class pysdmx.model.vtl.FromVtlMapping(from_vtl_sub_space: Sequence[str] = (), method: str | None = None)

The mapping method and filter used when mapping from VTL to SDMX.

class pysdmx.model.vtl.NamePersonalisation(id: str, uri: str | None = None, urn: str | None = None, name: str | None = None, description: str | None = None, personalised_name: str = '', vtl_artefact: str = '', vtl_default_name: str = '', *, annotations: Sequence[Annotation] = ())

Definition of personalised name.

class pysdmx.model.vtl.NamePersonalisationScheme(id: str, uri: str | None = None, urn: str | None = None, name: str | None = None, description: str | None = None, version: str = '1.0', valid_from: datetime | None = None, valid_to: datetime | None = None, is_final: bool = False, is_external_reference: bool = False, service_url: str | None = None, structure_url: str | None = None, agency: str | Agency = '', items: Sequence[Item] = (), is_partial: bool = False, vtl_version: str | None = None, *, annotations: Sequence[Annotation] = ())

A collection of name personalisations.

class pysdmx.model.vtl.Ruleset(id: str, uri: str | None = None, urn: str | None = None, name: str | None = None, description: str | None = None, ruleset_definition: str = '', ruleset_scope: str = '', ruleset_type: str = '', *, annotations: Sequence[Annotation] = ())

A persistent set of rules.

class pysdmx.model.vtl.RulesetScheme(id: str, uri: str | None = None, urn: str | None = None, name: str | None = None, description: str | None = None, version: str = '1.0', valid_from: datetime | None = None, valid_to: datetime | None = None, is_final: bool = False, is_external_reference: bool = False, service_url: str | None = None, structure_url: str | None = None, agency: str | Agency = '', items: Sequence[Item] = (), is_partial: bool = False, vtl_version: str | None = None, vtl_mapping_scheme: str | None = None, *, annotations: Sequence[Annotation] = ())

A collection of rulesets.

class pysdmx.model.vtl.ToVtlMapping(to_vtl_sub_space: Sequence[str] = (), method: str | None = None)

The mapping method and filter used when mapping from SDMX to VTL.

class pysdmx.model.vtl.Transformation(id: str, uri: str | None = None, urn: str | None = None, name: str | None = None, description: str | None = None, expression: str = '', is_persistent: bool = False, result: str = '', *, annotations: Sequence[Annotation] = ())

A statement which assigns the outcome of an expression to a result.

expression

str. The expression bound to the Transformation (no semicolon).

result

str. The Dataset or Scalar name where we store the result.

is_persistent

bool = False. If the result is persistent.

property full_expression: str

Return the full expression with the semicolon.

class pysdmx.model.vtl.TransformationScheme(id: str, uri: str | None = None, urn: str | None = None, name: str | None = None, description: str | None = None, version: str = '1.0', valid_from: datetime | None = None, valid_to: datetime | None = None, is_final: bool = False, is_external_reference: bool = False, service_url: str | None = None, structure_url: str | None = None, agency: str | Agency = '', items: Sequence[Item] = (), is_partial: bool = False, vtl_version: str | None = None, vtl_mapping_scheme: VtlMappingScheme | None = None, name_personalisation_scheme: NamePersonalisationScheme | None = None, custom_type_scheme: CustomTypeScheme | None = None, ruleset_schemes: Sequence[RulesetScheme] = (), user_defined_operator_schemes: Sequence[UserDefinedOperatorScheme] = (), *, annotations: Sequence[Annotation] = ())

VTL Transformation Scheme class.

TransformationScheme is a set of Transformations aimed at getting some meaningful results for the user (e.g. the validation of one or more Data Sets).

This set of Transformations is meant to be executed together (in the same run) and may contain any number of Transformations to produce any number of results. Therefore, a TransformationScheme can be considered as a VTL program.

The TransformationScheme must include the attribute vtlVersion expressed as a string (e.g. “2.0”), as the version of the VTL determines which syntax is used in defining the transformations of the scheme. This attribute is inherited from the VTLItemScheme class.

vtl_mapping_scheme

Optional[VtlMappingScheme]. The VTL mapping scheme.

name_personalisation_scheme

Optional[NamePersonalisationScheme]. The name personalisation scheme.

custom_type_scheme

Optional[CustomTypeScheme]. The custom type scheme.

ruleset_schemes

Sequence[RulesetScheme]. The ruleset schemes.

user_defined_operator_schemes

Sequence[UserDefinedOperatorScheme]. The user-defined operator schemes.

class pysdmx.model.vtl.UserDefinedOperator(id: str, uri: str | None = None, urn: str | None = None, name: str | None = None, description: str | None = None, operator_definition: str = '', *, annotations: Sequence[Annotation] = ())

Custom VTL operator that extends the VTL standard library.

class pysdmx.model.vtl.UserDefinedOperatorScheme(id: str, uri: str | None = None, urn: str | None = None, name: str | None = None, description: str | None = None, version: str = '1.0', valid_from: datetime | None = None, valid_to: datetime | None = None, is_final: bool = False, is_external_reference: bool = False, service_url: str | None = None, structure_url: str | None = None, agency: str | Agency = '', items: Sequence[Item] = (), is_partial: bool = False, vtl_version: str | None = None, vtl_mapping_scheme: str | None = None, ruleset_schemes: Sequence[str] = (), *, annotations: Sequence[Annotation] = ())

A collection of user-defined operators.

class pysdmx.model.vtl.VtlCodelistMapping(id: str, uri: str | None = None, urn: str | None = None, name: str | None = None, description: str | None = None, codelist: str = '', codelist_alias: str = '', *, annotations: Sequence[Annotation] = ())

Single mapping with a codelist.

class pysdmx.model.vtl.VtlConceptMapping(id: str, uri: str | None = None, urn: str | None = None, name: str | None = None, description: str | None = None, concept: str = '', concept_alias: str = '', *, annotations: Sequence[Annotation] = ())

Single mapping with a concept.

class pysdmx.model.vtl.VtlDataflowMapping(id: str, uri: str | None = None, urn: str | None = None, name: str | None = None, description: str | None = None, dataflow: str = '', dataflow_alias: str = '', to_vtl_mapping_method: ToVtlMapping | None = None, from_vtl_mapping_method: FromVtlMapping | None = None, *, annotations: Sequence[Annotation] = ())

Single mapping with a dataflow.

class pysdmx.model.vtl.VtlMapping(id: str, uri: str | None = None, urn: str | None = None, name: str | None = None, description: str | None = None, *, annotations: Sequence[Annotation] = ())

Single VTL mapping.

class pysdmx.model.vtl.VtlMappingScheme(id: str, uri: str | None = None, urn: str | None = None, name: str | None = None, description: str | None = None, version: str = '1.0', valid_from: datetime | None = None, valid_to: datetime | None = None, is_final: bool = False, is_external_reference: bool = False, service_url: str | None = None, structure_url: str | None = None, agency: str | Agency = '', items: Sequence[Item] = (), is_partial: bool = False, *, annotations: Sequence[Annotation] = ())

A collection of VTL mappings.