From 36e0f659e4708bbc767688f8f25762325f0ae240 Mon Sep 17 00:00:00 2001 From: dluftspring Date: Sun, 3 Apr 2022 20:29:07 -0400 Subject: [PATCH] Show group_by columns in validation errors for column increasing test (#158) * Show group_by columns in validation errors for column increasing test * Add github actions workflow (#159) * Add github workflow * Remove pre-commit * Show group_by columns in validation errors for column increasing test * Add .circleci/config.yml (#161) * Add .circleci/config.yml * Remove github action * Update postgres test * Add dbt install * Add env variables * Install dbt dependencies * Empty postgres password * Upgrade postgres image * Update connection settings * Fix postgres profile * Move profiles * Add BigQuery run * Fix job name * Update key path * Update config * Update schema * Add Snowflake tests * Update profile * Add back postgres * Show group_by columns in validation errors for column increasing test * Jinja whitespace update (to force CI) Co-authored-by: Claus Herther --- .../expect_column_values_to_be_increasing.sql | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/macros/schema_tests/column_values_basic/expect_column_values_to_be_increasing.sql b/macros/schema_tests/column_values_basic/expect_column_values_to_be_increasing.sql index 12afb42..6750d92 100644 --- a/macros/schema_tests/column_values_basic/expect_column_values_to_be_increasing.sql +++ b/macros/schema_tests/column_values_basic/expect_column_values_to_be_increasing.sql @@ -5,7 +5,7 @@ group_by=None) %} {%- set sort_column = column_name if not sort_column else sort_column -%} -{%- set operator = ">" if strictly else ">=" %} +{%- set operator = ">" if strictly else ">=" -%} with all_values as ( select @@ -24,6 +24,9 @@ add_lag_values as ( select sort_column, + {%- if group_by -%} + {{ group_by | join(", ") }}, + {%- endif %} value_field, lag(value_field) over {%- if not group_by -%}