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.
📌 #1257 · Membership · Manual example 5 (General purpose operators ›
DS#Id)📌 #1257 · Membership · Manual example 4 (General purpose operators ›
DS#Me)📌 #1257 · Membership · Manual example 6 (General purpose operators ›
DS#At (viral))📌 #1257 · Membership · Manual example 8 (General purpose operators ›
DS#At (viral))📌 #1254 · Type conversion · Start and end dates (General purpose operators ›
cast(comp<time_period>, string))📌 #1258 · Inner Join · Attribute becomes measure (Join operators ›
inner_join(DS, DS calc C := expr))📌 #1257 · Inner Join · Constant viral attribute (Join operators ›
inner_join(DS, DS calc viral attribute C := expr))📌 #1258 · Inner Join · Attribute becomes measure (Join operators ›
inner_join(DS, DS aggr C := agg group by Id))📌 #1257 · Inner Join · Max as viral attribute (Join operators ›
inner_join(DS, DS aggr C := agg, viral attribute A := agg group by Id))📌 #1257 · Left Join · Viral attribute becomes measure (Join operators ›
left_join(DS, DS calc C := expr))📌 #1257 · Left Join · Constant viral attribute (Join operators ›
left_join(DS, DS calc viral attribute C := expr))📌 #1257 · Left Join · Viral attribute becomes measure (Join operators ›
left_join(DS, DS aggr C := agg group by Id))📌 #1257 · Left Join · Max as viral attribute (Join operators ›
left_join(DS, DS aggr C := agg, viral attribute A := agg group by Id))📌 #1257 · Full Join · Viral attribute becomes measure (Join operators ›
full_join(DS, DS calc C := expr))📌 #1257 · Full Join · Constant viral attribute (Join operators ›
full_join(DS, DS calc viral attribute C := expr))📌 #1257 · Full Join · Viral attribute becomes measure (Join operators ›
full_join(DS, DS aggr C := agg group by Id))📌 #1257 · Full Join · Max as viral attribute (Join operators ›
full_join(DS, DS aggr C := agg, viral attribute A := agg group by Id))📌 #1258 · Cross Join · Attribute becomes measure (Join operators ›
cross_join(DS, DS calc C := expr))📌 #1257 · Cross Join · Constant viral attribute (Join operators ›
cross_join(DS, DS calc viral attribute C := expr))📌 #1258 · Cross Join · Attribute becomes measure (Join operators ›
cross_join(DS, DS aggr C := agg group by Id))📌 #1257 · Cross Join · Max as viral attribute (Join operators ›
cross_join(DS, DS aggr C := agg, viral attribute A := agg group by Id))📌 #394 · Number of days to years and days · Manual example 1 (Time operators ›
calc daytoyear(comp))📌 #394 · Number of days to years and days · Years of 365 days (Time operators ›
daytoyear(sc))📌 #394 · Number of days to months and days · Manual example 2 (Time operators ›
calc daytomonth(comp))📌 #394 · Number of days to months and days · Months of thirty days (Time operators ›
daytomonth(sc))📌 #394 · Years and days to number of days · Manual example 1 (Time operators ›
calc yeartoday(comp))📌 #394 · Years and days to number of days · One year and twenty days (Time operators ›
yeartoday(sc))📌 #394 · Months and days to number of days · Iso month and day durations (Time operators ›
calc monthtoday(comp))📌 #394 · Months and days to number of days · Three months and ten days (Time operators ›
monthtoday(sc))📌 #1193 · Hierarchical roll-up · Overlapping rules that agree (Hierarchical aggregation ›
hierarchy(DS, HR condition C))📌 #633 · Analytic invocation · Manual example 2 (Aggregate and Analytic operators ›
an(over (partition except all order by Id)))📌 #1049 · Counting the number of data points · Single group no identifiers (Aggregate and Analytic operators ›
count(DS))📌 #1049 · Counting the number of data points · All null data point ignored (Aggregate and Analytic operators ›
count(DS group by Id))📌 #1049 · Counting the number of data points · Drops the listed identifier (Aggregate and Analytic operators ›
count(DS group except Id))📌 #1049 · Counting the number of data points · Quarters to years (Aggregate and Analytic operators ›
count(DS group all time_agg("A")))📌 #1049 · Counting the number of data points · Two measures (Aggregate and Analytic operators ›
count(DS group by Id having cond))📌 #1257 · Calculation of a Component · Constant viral attribute (Clause operators ›
DS[calc viral attribute At := expr])📌 #1257 · Aggregation · Viral attribute next to measure (Clause operators ›
DS[aggr viral attribute At := agg(Me) group by Id])📌 #1257 · Aggregation · Viral attribute without measure (Clause operators ›
DS[aggr viral attribute At := agg(Me) group by Id])📌 #1257 · define operator · Viral attribute overwritten in calc (Definitions (VTL-DL) ›
c component | identifier | measure | attribute | viral attribute <…>)
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 givesInner 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_1Stock 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 NumbersNumber 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 HNumber 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 HYears 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_1Aggregate 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-checkedRandom · Manual example 2 (Numeric operators ›
random(comp, n)): the manual's illustrative random values are not reproducible; the random column is property-checkedFill 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