Unexpected Result when data source has null values in Mosaic Decisions

44 Views Asked by At

I am designing a data pipeline in Mosaic Decisions. I have a database where some values in the data are nulls. I require to use a CustomSQL Node to query the database, but due to these Null values, the result is unexpected

How can I avoid such situations and convert the nulls into some other values before adding the customSQL.

I have previously used another customSQL just to replace all the null values. However, I need to keep adding complex queries to do that. Is there any other possible way to achieve the same thing without the use of separate customSQL node to handle the null values?

1

There are 1 best solutions below

0
On BEST ANSWER

Mosaic Decisions has recently introduced a new Process Node. The Impute Process Node is capable of handling the null values present in the dataset.

You can follow these steps below to get rid of the null values in your data with the help of the Impute Node and avoid using the complex SQL queries in the CustomSQL Node.

  1. After dragging in the Impute Node into the canvas and connecting the input, open the configuration menu.

  2. Drag and drop the column(s) you would like to handle your null values on.

  3. From the list of Impute Strategies, select the most suitable choice based on the data type of your column(s). You can either select same or different strategies on the selected column(s) and Add them.

    impute node configuration

    added impute strategies

Refer the user manual under the help section for detailed information on the Impute Strategies.

You can direct the output of this node directly to your CustomSQL Node where you are writing the main query for your data pipeline.