A Coalesce Node is used to select the first non Null occurrence in a list of selected columns. Say we have selected columns A, B, C, D and for a given row we have these values (A->Null), (B->Null), (C-> 1), (D->2), the Coalesce function returns 1, as the first value instead of Null. Here’s a guide on how to add and set up a Coalesce Node:
Note: In order to use the Model feature you already should have already imported data sources into Y42.
- Select Model on the right of your window and click Add Model. Name your new Model and choose a privacy level.
- Create at least one input table by dragging & dropping the Input field into your data model structure. Choose a data table by clicking on it, then click Apply.
- Drag & drop a Coalesce Node close to the Input field.
- Click on the Coalesce Node to apply the settings.
- Begin by selecting the Target Column or write the name of a new column.
- Then choose your Source Columns.
- You can bring additional columns to the party by clicking on Add Filter, the big + button below.
- When you are done, press Save.
Once you're done changing the order of your columns and filtering null values, you can either perform further transformations or, if you want to export the new data table, click Commit Model.