How to get null value in Azure Datafactory Derived columns expression builder

110 Views Asked by At

[![I need Low priority and high priority value is blank] 1]1I am currently using Azure Data factory in that I am creating a Derived column and I want 4 columns data, but I want 2 columns data out put i want is blank so I want the value to be NULL.

I want 2 columns data from output is Blank.

1

There are 1 best solutions below

0
Rakesh Govindula On

Based on your condition in the derived column, you want to get null values when the row values are LowPriority or HighPriority. For the values DefaultOut and DefaultIn, you want to get the numerical values as shown above.

To achieve your requirement, your column data only should contain the above 4 values, if it contains other values, then you need to write the case logic for that value as well because you are changing the data type of the output, so if the same input string value results in the output, then it gives the error.

This is the starting data I took as per your input.

enter image description here

Use the below expression in the derived column.

case(fit_crm_forcastresolution=='DefaultOut',614660000,case(fit_crm_forcastresolution=='DefaultIn',614660001,toInteger(null())))

enter image description here

Output:

enter image description here