← rename operator page · clause/rename/multiple/manual_ex_1
pandas ✅ · DuckDB ✅
rename Me_1 to Me_2, At_1 to At_2: a measure and an attribute renamed in one clause.
Change of Component name, Example 1, output verbatim: "The operator assigns new names to one or more Components (Identifier, Measure or Attribute Components)", and "Only the Component name is changed and not the Component Values".
The same data points, with Me_2 and At_2 in place of Me_1 and At_1, with their roles and types.
DS_r := DS_1 [ rename Me_1 to Me_2, At_1 to At_2];
| Id_1 | Id_2 | Id_3 | Me_1 | At_1 |
|---|---|---|---|---|
| 1 | B | XX | 20 | F |
| 1 | B | YY | 1 | F |
| 2 | A | XX | 4 | E |
| 2 | A | YY | 9 | F |
{
"datasets": [
{
"name": "DS_1",
"DataStructure": [
{"name": "Id_1", "type": "Integer", "role": "Identifier", "nullable": false},
{"name": "Id_2", "type": "String", "role": "Identifier", "nullable": false},
{"name": "Id_3", "type": "String", "role": "Identifier", "nullable": false},
{"name": "Me_1", "type": "Integer", "role": "Measure", "nullable": true},
{"name": "At_1", "type": "String", "role": "Attribute", "nullable": true}
]
}
]
}
| Id_1 | Id_2 | Id_3 | Me_2 | At_2 |
|---|---|---|---|---|
| 1 | B | XX | 20 | F |
| 1 | B | YY | 1 | F |
| 2 | A | XX | 4 | E |
| 2 | A | YY | 9 | F |
{
"datasets": [
{
"name": "DS_r",
"DataStructure": [
{"name": "Id_1", "type": "Integer", "role": "Identifier"},
{"name": "Id_2", "type": "String", "role": "Identifier"},
{"name": "Id_3", "type": "String", "role": "Identifier"},
{"name": "Me_2", "type": "Integer", "role": "Measure"},
{"name": "At_2", "type": "String", "role": "Attribute"}
]
}
]
}