← time_agg operator page · time/time_agg/period_from/quarter_to_year

Quarter to year 🟢 all ok

pandas ✅ · DuckDB ✅

Tests:

time_agg("A", "Q", SC_1) with SC_1 = 2012Q2: the optional periodIndFrom given, Q, the duration of the operand.

Manual:

Time aggregation: the syntax time_agg ( periodIndTo { , periodIndFrom } { , op } { , first | last } ), and "It is only possible to convert smaller duration values to larger duration values", as a quarter to a year is.

Expected:

DS_r = 2012, a Time_Period: the second quarter of 2012 is in the year 2012.

script.vtl ⇩

DS_r := time_agg("A", "Q", SC_1);

input/scalars.csv ⇩

SC_1
2012Q2

input/scalars.json ⇩

{
  "scalars": [
    {"name": "SC_1", "type": "Time_Period"}
  ]
}

expected/scalars.json ⇩

{
  "scalars": [
    {"name": "DS_r", "type": "Time_Period", "value": "2012"}
  ]
}