Follow me on LinkedIn - AI, GA4, BigQuery

Empty strings in query results from a GA4 BigQuery data table often indicate that certain fields are unpopulated or undefined for specific events.
Article content

You should convert empty values to NULL.

Unlike NULL values, aggregation functions (like COUNT, SUM, GROUP BY) do not ignore the empty strings, leading to incorrect results.

Your SQL query may behave differently based on whether you are dealing with a missing value (NULL) or an intentional empty string.

So, every query you run, make sure that any empty value is converted to null.


Converting empty strings to NULL ensures that truly missing data is correctly identified and handled.

To convert empty values to 'null', you can use the following text prompt: