← concat operator page · string/concat/comp_sc/manual_ex_2
pandas ✅ · DuckDB ✅
Me_1 || " world" inside calc, where the new measure Me_2 takes the result.
String concatenation, Example 2, output verbatim: "Concatenates two strings."
Me_2 is hello world and hi world; Me_1 is kept.
DS_r := DS_1[calc Me_2 := Me_1 || " world"];
| Id_1 | Id_2 | Me_1 |
|---|---|---|
| 1 | A | hello |
| 2 | B | hi |
{
"datasets": [
{
"name": "DS_1",
"DataStructure": [
{"name": "Id_1", "type": "Integer", "role": "Identifier", "nullable": false},
{"name": "Id_2", "type": "String", "role": "Identifier", "nullable": false},
{"name": "Me_1", "type": "String", "role": "Measure", "nullable": true}
]
}
]
}
| Id_1 | Id_2 | Me_1 | Me_2 |
|---|---|---|---|
| 1 | A | hello | hello world |
| 2 | B | hi | hi world |
{
"datasets": [
{
"name": "DS_r",
"DataStructure": [
{"name": "Id_1", "type": "Integer", "role": "Identifier"},
{"name": "Id_2", "type": "String", "role": "Identifier"},
{"name": "Me_1", "type": "String", "role": "Measure"},
{"name": "Me_2", "type": "String", "role": "Measure"}
]
}
]
}