BigQuery Error: No matching signature for function IFNULL

\n\n

Getting error when using IFNULL Function?

\n\n
Error: No matching signature for function IFNULL for argument types: STRING, INT64. \nSupported signature: IFNULL(ANY, ANY) at [4:9]\n
\n\n

Solution:

While using the IFNULL function, make sure to have the same datatype as the column that you are checking nulls for. In the below example, if you are checking for NULLs in a string column, make sure to use a string data type as a substitution value as well

\n\n
IFNULL(value.string_value, CAST(value.int_value AS STRING)) AS NewColumn\n

DataFreak

posted on

Enjoy great content like this and a lot more !

Signup for a free account to write a post / comment / upvote posts. Its simple and takes less than 5 seconds