← rename operator page · clause/rename/basic/measure_renamed

Measure renamed 🟢 all ok

pandas ✅ · DuckDB ✅

Tests:

rename Me_1 to Me_2: one measure renamed.

Manual:

Change of Component name: "Only the Component name is changed and not the Component Values".

Expected:

Me_2 is a Measure of type Integer, with the values of Me_1: 10 and 20.

script.vtl ⇩

DS_r := DS_1 [ rename Me_1 to Me_2 ];

input/DS_1.csv ⇩

Id_1Me_1
110
220

input/DS_1.json ⇩

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

expected/DS_r.csv ⇩

Id_1Me_2
110
220

expected/DS_r.json ⇩

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