← persistent_assignment operator page · general/persistent_assignment/identity/manual_ex_1

Manual example 1 🟢 all ok

pandas ✅ · DuckDB ✅

Tests:

DS_r <- DS_1: a dataset assigned as it is to a persistent result.

Manual:

Persistent assignment, Example 1, output verbatim: "The result re is a persistent Data Set that has the same data structure as the Operand."

Expected:

DS_r has the structure and the data points of DS_1.

script.vtl ⇩

DS_r <- DS_1;

input/DS_1.csv ⇩

Id_1Id_2Me_1Me_2
2013Belgium55
2013Denmark210
2013France312
2013Spain420

input/DS_1.json ⇩

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

expected/DS_r.csv ⇩

Id_1Id_2Me_1Me_2
2013Belgium55
2013Denmark210
2013France312
2013Spain420

expected/DS_r.json ⇩

{
  "datasets": [
    {
      "name": "DS_r",
      "DataStructure": [
        {"name": "Id_1", "type": "Time_Period", "role": "Identifier"},
        {"name": "Id_2", "type": "String", "role": "Identifier"},
        {"name": "Me_1", "type": "Integer", "role": "Measure"},
        {"name": "Me_2", "type": "Integer", "role": "Measure"}
      ]
    }
  ]
}