From d3c6d2f5c057fa945c9e730ff224c39abc00e5aa Mon Sep 17 00:00:00 2001 From: ialdg <39755524+ialdg@users.noreply.github.com> Date: Sun, 11 Feb 2024 07:05:20 +0100 Subject: [PATCH 1/2] Update data-tests.md. Solving double negative. Hi. Since the tests looks for negative amount records, why not say so instead of using a double negative, which is not the easiest to read and involves longer code? Regards. IL. --- website/docs/docs/build/data-tests.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/docs/build/data-tests.md b/website/docs/docs/build/data-tests.md index d981d7e272d..f06e05f6af8 100644 --- a/website/docs/docs/build/data-tests.md +++ b/website/docs/docs/build/data-tests.md @@ -49,7 +49,7 @@ select sum(amount) as total_amount from {{ ref('fct_payments' )}} group by 1 -having not(total_amount >= 0) +having total_amount < 0 ``` From c56d34fcc901557574111946ef8e47fdb033feb4 Mon Sep 17 00:00:00 2001 From: Matt Shaver <60105315+matthewshaver@users.noreply.github.com> Date: Mon, 12 Feb 2024 11:29:34 -0500 Subject: [PATCH 2/2] Update data-tests.md Clarifying language to match changes --- website/docs/docs/build/data-tests.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/docs/build/data-tests.md b/website/docs/docs/build/data-tests.md index af738054fc2..0806842a85c 100644 --- a/website/docs/docs/build/data-tests.md +++ b/website/docs/docs/build/data-tests.md @@ -43,7 +43,7 @@ These tests are defined in `.sql` files, typically in your `tests` directory (as ```sql -- Refunds have a negative amount, so the total amount should always be >= 0. --- Therefore return records where this isn't true to make the test fail +-- Therefore return records where total_amount < 0 to make the test fail. select order_id, sum(amount) as total_amount