← round operator page · numeric/round/sc_placeholder/placeholder_for_digits

Placeholder for digits 🟢 all ok

pandas ✅ · DuckDB ✅

Tests:

the placeholder _ for numDigit, on a scalar: round(SC_1, _) with SC_1 = 12345.6.

Manual:

Rounding: "round ( 12345.6, _ ) gives 12346".

Expected:

SC_r = 12346, an Integer: the placeholder stands for an omitted numDigit.

script.vtl ⇩

SC_r := round(SC_1, _);

input/scalars.csv ⇩

SC_1
12345.6

input/scalars.json ⇩

{
  "scalars": [
    {"name": "SC_1", "type": "Number"}
  ]
}

expected/scalars.json ⇩

{
  "scalars": [
    {
      "name": "SC_r",
      "type": "Integer",
      "value": "12346"
    }
  ]
}