Support results with no rows in matches_pattern check (#6521)
* Support results with no rows in matches_pattern check * remove extra )
This commit is contained in:
Родитель
6890005c1d
Коммит
1e13a6c29a
|
@ -4,7 +4,10 @@
|
|||
|
||||
SELECT
|
||||
IF(
|
||||
ROUND((COUNTIF(NOT REGEXP_CONTAINS({{ column }}, r"{{ pattern }}"))) / COUNT(*) * 100, 2) > {{ threshold_fail_percentage }},
|
||||
ROUND(
|
||||
COUNTIF(NOT REGEXP_CONTAINS({{ column }}, r"{{ pattern }}")) / GREATEST(COUNT(*), 1) * 100,
|
||||
2
|
||||
) > {{ threshold_fail_percentage }},
|
||||
ERROR("{{ message }}"),
|
||||
NULL
|
||||
)
|
||||
|
|
Загрузка…
Ссылка в новой задаче