Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
为了处理我使用过的 bigquery 的错误 -job.errors[0]['message']到目前为止一切都很好。
job.errors[0]['message']
问题是当您查询时,例如,当您将值除以 0 时,BigQuery 会显示:
问题:通过使用 PYTHON - 如何发现此错误?
或者,在 BigQuery 标准 SQL 中,您可以使用 SAFE_DIVIDE() 来避免错误
SAFE_DIVIDE() 等效于除法运算符 (/),但如果发生错误,例如除零错误,则返回 NULL
所以SELECT 15 / 0 你应该使用SAFE_DIVIDE(15, 0)
SELECT 15 / 0
SAFE_DIVIDE(15, 0)