The IFNULL function writes out a specified value if the source value is a null. Otherwise, it writes the source value. Input can be a literal, a column reference, or a function.

derive type:single value:IFNULL(my_score,'0') as:'final_score'

Output: Generates a new column called, final_score, which contains the value 0 if the value in my_score is a null. 

derive type:single value:IFNULL(column_string, computed_value)

ArgumentRequired?Data TypeDescription
source_valueYstringName of column, string literal or function to be tested
output_valueystringString literal value to write


Name of the column, string literal, or function to be tested for null values.

Required?Data TypeExample Value
YesString literal, column reference, or functionmyColumn


The output value to write if the tested value returns a null value.

Required?Data TypeExample Value
YesString or numeric literal'Null input'

Example - IF* functions for data type validation