Hey there!
Question regarding Metrics & MAQL: How do you handle DivisionZeroError? In Standard SQL (BigQuery), there is the
SAFE_DIVIDE
function, but in MAQL I couldn't find anything similar. Do you have an equivalent or do you automatically safe divide?
m
Michal Hauzírek
01/30/2022, 5:58 PM
Hey Philippe, good question. In MAQL you do not need to worry about division by zero error. It will automatically return NULL in that case so the / operator behaves similar to SAFE_DIVIDE in BQ.
BTW MAQL behaves this way also in other similar cases such as square root of any negative number.
p
Philippe Hébert
01/30/2022, 10:02 PM
Hey Michal! Thanks for the answer 🙂
Great to know!