From 34b678df26b56729d649563dac934151f979d960 Mon Sep 17 00:00:00 2001 From: Pablo Martin Date: Thu, 20 Jun 2024 14:43:51 +0200 Subject: [PATCH] new not_negative test --- macros/tests/not_negative.sql | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 macros/tests/not_negative.sql diff --git a/macros/tests/not_negative.sql b/macros/tests/not_negative.sql new file mode 100644 index 0000000..4ac9523 --- /dev/null +++ b/macros/tests/not_negative.sql @@ -0,0 +1,6 @@ +{% test not_negative(model, column_name) %} + with validation as (select {{ column_name }} as value from {{ model }}) + select * + from validation + where value < 0 +{% endtest %}