Solved

Replacing null values

  • 21 February 2024
  • 2 replies
  • 34 views

Userlevel 1
Badge +1

Hello everyone,

How can I replace null values in a column with a float data type in OneWeb? I need to substitute null values with 0 and apply a formula in advanced expressions.

Thanks in advance.

icon

Best answer by Lisa Kovalskaia 22 February 2024, 10:38

View original

2 replies

Userlevel 4
Badge +5

Hi @aysel_jafarzade, I imagine you could go with one of these options:

  • create an SQL CI e.g. something like this
    SELECT attribute_1, attribute_2,

    CASE

        WHEN attribute_3 is null THEN 0

        ELSE attribute_3

    END AS attribute_3

    FROM table;


     then work with this SQL CI in your DQ evaluation;
     
  • in the rule implementation, create a variable that transforms the input attribute value e.g. iif(attribute_3 is null, 0, attribute_3)

Could you please describe your use case in some more detail? What do you want to achieve once you have the completed the setup? Thanks!

Userlevel 1
Badge +1

Thank you so much @Lisa Kovalskaia . your answer was helpful

Reply