How to perform exception handling in Google Bigquery SQL Functions
When there is an error while computing a SQL Function, it it fails for any of the rows the entire SQL query will abort. You can overcome this by using the SAFE PREFIX in Bigquery
Below are the list of SAFE Functions available in Bigquery.
- SAFE_OFFSET and SAFE_ORDINAL
When a row fails during computation of a function, Bigquery will throw a NULL Value instead of aborting the entire query.
It is a best practice to use the safe prefix wherever applicable
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