Using NULL to replace values in BigQuery
13:56 15 Apr 2023

When is the best case to use NULL, 0, or FLOAT64 in Google BigQuery?

For example, replacing default values of temperatures, precipitation and wind speed (from a previous activity) as

IF(
        temp=9999.9,
        NULL,
        temp) AS temperature,

or

IF(
       prcp=99.99,
       0,
       prcp) AS precipitation

or

IF(
        wdsp="999.9",
        NULL,
        CAST(wdsp AS Float64)) AS wind_speed,
google-bigquery