← non_persistent_assignment operator page · general/non_persistent_assignment/ds/date_measure

Date measure 🟢 all ok

pandas ✅ · DuckDB ✅

Tests:

DS_r := DS_1 on a Date measure: two dates, 2020-01-15 and 2021-12-31, and a null, which vtlengine loads, keeps and writes as they are.

Manual:

Non-persistent assignment: "The result re is a non-persistent Data Set that has the same data structure as the Operand."

Expected:

DS_1 as it is: every value comes back as it went in, the null included, and the structure keeps Id_1 not nullable and Me_1 nullable.

script.vtl ⇩

DS_r := DS_1;

input/DS_1.csv ⇩

Id_1Me_1
12020-01-15
22021-12-31
3

input/DS_1.json ⇩

{
  "datasets": [
    {
      "name": "DS_1",
      "DataStructure": [
        {"name": "Id_1", "type": "Integer", "role": "Identifier", "nullable": false},
        {"name": "Me_1", "type": "Date", "role": "Measure", "nullable": true}
      ]
    }
  ]
}

expected/DS_r.csv ⇩

Id_1Me_1
12020-01-15
22021-12-31
3

expected/DS_r.json ⇩

{
  "datasets": [
    {
      "name": "DS_r",
      "DataStructure": [
        {"name": "Id_1", "type": "Integer", "role": "Identifier", "nullable": false},
        {"name": "Me_1", "type": "Date", "role": "Measure", "nullable": true}
      ]
    }
  ]
}