Skip to main content
Solved

Replacing null values


aysel_jafarzade
Data Pioneer
Forum|alt.badge.img

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.

Best answer by Lisa Kovalskaia

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!

View original
Did this topic help you find an answer to your question?

2 replies

Lisa Kovalskaia
Ataccamer
Forum|alt.badge.img+3

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!


aysel_jafarzade
Data Pioneer
Forum|alt.badge.img

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


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings