Team decisions, errata and adaptations

The examples whose expected output does not come from the manual as it is written: it follows a recorded team decision, corrects an erratum of the manual, or adapts the manual’s representation to vtlengine’s. Each one links to the example on the page of its operator.

📌 Team decisions

Expected outputs that follow a recorded team decision. The notes of an example say what the manual says and how its output was derived.

Manual errata (corrected expected outputs, scripts or inputs)

Examples where the manual gets an expected output, a script or an input wrong. The example holds the corrected version, and its notes quote the manual’s. These are the ones to report upstream.

  • Membership · Manual example 8 (General purpose operators › DS#At (viral)): DS_2 has identifiers, so DS_2#At_1 is a dataset (the one of ex_6), not the scalar 'P' that the manual gives

  • Inner Join · Manual example 5 (Join operators › inner_join(DS, DS, DS)): Me_3 is in both IBSC and IBSD, so stripping the alias prefixes gives two Me_3, an error by the Behaviour section; the script adds drop IBSC#Me_3 (all null), which gives the printed result. ds_5.json also declares Me_2 an Identifier, but the result has Me_21 and Me_22 as Measures: it is loaded as a Measure.

  • Flow to stock · Manual example 1 (Time operators › flow_to_stock(DS) on time): the expected output declares Me_1 as String; flow_to_stock keeps the Integer measure of DS_1

  • Stock to flow · Manual example 1 (Time operators › stock_to_flow(DS) on time): the input DS_1 declares Me_1 as String; stock_to_flow needs a number measure, and the values and the result are Numbers

  • Number of days to years and days · Manual example 1 (Time operators › calc daytoyear(comp)): the expected output repeats Id_1 = G on the second data point, where the input has H

  • Number of days to months and days · Manual example 2 (Time operators › calc daytomonth(comp)): the expected output repeats Id_1 = G on the second data point, where the input has H

  • Years and days to number of days · Manual example 1 (Time operators › calc yeartoday(comp)): the expected data points are those of Number days to duration ex_1 (Me_1 = 240, Me_2 = P0Y240D...), not yeartoday of DS_1

  • Aggregate invocation · Manual example 1 (Aggregate and Analytic operators › agg(DS group by Id)): The script comments its alternative forms with '#', which is not a VTL comment (the manual's conventions define /* */ and //): they are commented with // here.

  • Aggregate invocation · Manual example 4 (Aggregate and Analytic operators › DS[aggr Me := agg(Me), Me := agg(Me) group by Id]): The result is named DS_3, not DS_r, and keeps At_1 as a ViralAttribute; DS_1 declares At_1 a plain (non-viral) Attribute, which the default propagation rule drops, so DS_r has Id_1, Me_2 and Me_3 only.

  • Pivoting · Manual example 1 (Clause operators › DS[pivot Id, Me]): the Measures come from the data (each distinct value of identifier) and ds_1.json types Id_2 String, but they must be known without the data: Id_2 is defined on the value domain VD_1 of A, B and C, whose values give the Measures

Adaptations

Examples where the manual’s representation of an input or of an output name was rewritten to the equivalent representation vtlengine documents (such as the time values 2010M1/2010M12 of an input, or the default measure name string_var of an output, which vtlengine writes str_var), or values that no engine can reproduce (the manual’s illustrative random draws) were left out of the expected output and are property-checked. The notes of the example keep the original. These are not errata.

  • Membership · Manual example 3 (General purpose operators › DS#At): the default measure name string_var is written str_var, the name vtlengine documents (the manual's default names can be personalised in the implementations)

  • Membership · Manual example 6 (General purpose operators › DS#At (viral)): the default measure name string_var is written str_var, the name vtlengine documents (the manual's default names can be personalised in the implementations)

  • Membership · Manual example 8 (General purpose operators › DS#At (viral)): the default measure name string_var is written str_var, the name vtlengine documents (the manual's default names can be personalised in the implementations)

  • Random · Manual example 1 (Numeric operators › random(DS, n)): the manual's illustrative random values are not reproducible; the random column is property-checked

  • Random · Manual example 2 (Numeric operators › random(comp, n)): the manual's illustrative random values are not reproducible; the random column is property-checked

  • Fill time series · Manual example 1 (Time operators › fill_time_series(DS, single) on time): the manual's time values YYYYMm/YYYYMm (e.g. 2010M1/2010M12), which vtlengine cannot load, are rewritten as YYYY-MM-DD/YYYY-MM-DD (2010-01-01/2010-12-31)

  • Fill time series · Manual example 2 (Time operators › fill_time_series(DS, all) on time): the manual's time values YYYYMm/YYYYMm (e.g. 2010M1/2010M12), which vtlengine cannot load, are rewritten as YYYY-MM-DD/YYYY-MM-DD (2010-01-01/2010-12-31)

  • Flow to stock · Manual example 1 (Time operators › flow_to_stock(DS) on time): the manual's time values YYYYMm/YYYYMm (e.g. 2010M1/2010M12), which vtlengine cannot load, are rewritten as YYYY-MM-DD/YYYY-MM-DD (2010-01-01/2010-12-31)

  • Stock to flow · Manual example 1 (Time operators › stock_to_flow(DS) on time): the manual's time values YYYYMm/YYYYMm (e.g. 2010M1/2010M12), which vtlengine cannot load, are rewritten as YYYY-MM-DD/YYYY-MM-DD (2010-01-01/2010-12-31)

  • Time shift · Manual example 1 (Time operators › timeshift(DS, n) on time): the manual's time values YYYYMm/YYYYMm (e.g. 2010M1/2010M12), which vtlengine cannot load, are rewritten as YYYY-MM-DD/YYYY-MM-DD (2010-01-01/2010-12-31)

  • Add time unit to date · One year later (Time operators › dateadd(date, n, p)): the page writes the year period indicator “Y” (“for years the “Y” is used”); the example writes it A, the year duration of vtlengine and of the chapter's duration codes