Lower case conversion · lower
---
config:
flowchart:
useMaxWidth: false
---
flowchart TB
classDef ok fill:#d4edda,stroke:#28a745,color:#000
classDef partial fill:#fff3cd,stroke:#ffc107,color:#000
classDef refused fill:#d4edda,stroke:#28a745,stroke-width:3px,stroke-dasharray: 2 2,color:#000
classDef missing fill:#f8d7da,stroke:#dc3545,color:#000
classDef diverge fill:#cce5ff,stroke:#007bff,color:#000
classDef block fill:#2b3a4a,stroke:#2b3a4a,color:#fff,font-weight:bold
classDef ext fill:#fff,stroke:#666,color:#000,stroke-dasharray: 5 5
O["Lower case conversion · lower<br/>🟢3"]:::ok
subgraph G_ds["Dataset"]
direction LR
v_ds["lower(DS)"]:::ok
end
subgraph G_comp["Component"]
direction LR
v_comp["lower(comp)"]:::ok
end
subgraph G_sc["Scalar"]
direction LR
v_sc["lower(sc)"]:::ok
end
O --- G_ds
O --- G_comp
O --- G_sc
style G_ds fill:#f8f9fa,stroke:#495057,stroke-width:2px
style G_comp fill:#f8f9fa,stroke:#495057,stroke-width:2px,stroke-dasharray: 8 5
style G_sc fill:#f8f9fa,stroke:#495057,stroke-width:2px,stroke-dasharray: 2 3
click v_ds href "#form-ds"
click v_comp href "#form-comp"
click v_sc href "#form-sc"
Types
Takes string · Gives string
Comes from · string — 12 operators in 3 blocks 🟢12
General purpose operators (2) 🟢2
String operators (7) 🟢7
Data validation operators (3) 🟢3
Comes from · operators that return any type (their input's) — 37 operators in 8 blocks 🟢37
General purpose operators (5) 🟢5
Join operators (4) 🟢4
Time operators (3) 🟢3
Set operators (4) 🟢4
Hierarchical aggregation (1) 🟢1
Aggregate and Analytic operators (8) 🟢8
Conditional operators (3) 🟢3
Goes to · string — 16 operators in 5 blocks 🟢16
General purpose operators (1) 🟢1
String operators (10) 🟢10
Comparison operators (1) 🟢1
Data validation operators (1) 🟢1
Definitions (VTL-DL) (3) 🟢3
Goes to · operators that take any scalar — 49 operators in 9 blocks 🟢49
General purpose operators (6) 🟢6
Join operators (4) 🟢4
Comparison operators (11) 🟢11
Set operators (4) 🟢4
Aggregate and Analytic operators (10) 🟢10
Data validation operators (1) 🟢1
Conditional operators (3) 🟢3
Clause operators (9) 🟢9
Definitions (VTL-DL) (1) 🟢1
Forms
lower(DS) 🟢 · string → string
All caps and mixed case 🟢 pandas ✅ · DuckDB ✅
- Tests:
loweron a dataset with an all-capitals value, a mixed-case one and a null.- Manual:
Character case conversion: “Converts the character case of a string in upper or lower case.”
- Expected:
HELLOgiveshelloandHi Theregiveshi there. A null operand gives a null result: “most of the scalar operations (arithmetic, logical, and others) return null when any of their arguments is null” (User Manual), as the manual’slengthandinstrexamples show.
DS_r := lower(DS_1);
| Id_1 | Me_1 |
|---|---|
| 1 | HELLO |
| 2 | Hi There |
| 3 |
| Id_1 | Me_1 |
|---|---|
| 1 | hello |
| 2 | hi there |
| 3 |
Files: script.vtl · input/DS_1.csv · input/DS_1.json · expected/DS_r.csv · expected/DS_r.json · example page ↗
lower(comp) 🟢 · string → string
All caps and mixed case 🟢 pandas ✅ · DuckDB ✅
- Tests:
lowerof a component insidecalc, with an all-capitals value, a mixed-case one and a null.- Manual:
Character case conversion: “Converts the character case of a string in upper or lower case.”
- Expected:
the new measure
Me_2ishelloforHELLOandhi thereforHi There;Me_1is kept. A null operand gives a null result: “most of the scalar operations (arithmetic, logical, and others) return null when any of their arguments is null” (User Manual), as the manual’slengthandinstrexamples show.
DS_r := DS_1[calc Me_2 := lower(Me_1)];
| Id_1 | Me_1 |
|---|---|
| 1 | HELLO |
| 2 | Hi There |
| 3 |
| Id_1 | Me_1 | Me_2 |
|---|---|---|
| 1 | HELLO | hello |
| 2 | Hi There | hi there |
| 3 |
Files: script.vtl · input/DS_1.csv · input/DS_1.json · expected/DS_r.csv · expected/DS_r.json · example page ↗
lower(sc) 🟢 · string → string
Capitalised word 🟢 pandas ✅ · DuckDB ✅
- Tests:
lower(SC_1)withSC_1=Hello, a capitalised word, the counterpart of the page’supper("Hello").- Manual:
Character case conversion: “Converts the character case of a string in upper or lower case.” Its scalar example is
upper("Hello"), which gives"HELLO".- Expected:
SC_rishello, a String.
SC_r := lower(SC_1);
| SC_1 |
|---|
| Hello |
Name |
Type |
Value |
|---|---|---|
|
String |
|
Files: script.vtl · input/scalars.csv · input/scalars.json · expected/scalars.json · example page ↗