Skip to content

Commit

Permalink
Limit columns selected in expression_is_true if failures not stored.
Browse files Browse the repository at this point in the history
  • Loading branch information
elyobo committed Sep 25, 2022
1 parent ba7ee52 commit ae1b6ad
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion macros/generic_tests/expression_is_true.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@

{% macro default__test_expression_is_true(model, expression, column_name, condition) %}

{% set column_list = '*' if should_store_failures() else "1" %}

with meet_condition as (
select * from {{ model }} where {{ condition }}
)

select
*
{{ column_list }}
from meet_condition
{% if column_name is none %}
where not({{ expression }})
Expand Down

0 comments on commit ae1b6ad

Please sign in to comment.