Skip to content

Commit 82b6bbf

Browse files
committed
return 'true' and 'false' strings in get_test_sql(). this was shamelessly copied from dbt-sqlserver
1 parent cfa3a66 commit 82b6bbf

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

dbt/include/sqlite/macros/adapters.sql

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,16 @@ that here when making the relation and everything else should Just Work
116116

117117
{% do return(tmp_relation) %}
118118
{% endmacro %}
119+
120+
{% macro sqlite__get_test_sql(main_sql, fail_calc, warn_if, error_if, limit) -%}
121+
select
122+
{{ fail_calc }} as failures,
123+
case when {{ fail_calc }} {{ warn_if }}
124+
then 'true' else 'false' end as should_warn,
125+
case when {{ fail_calc }} {{ error_if }}
126+
then 'true' else 'false' end as should_error
127+
from (
128+
{{ main_sql }}
129+
{{ "limit " ~ limit if limit != none }}
130+
) dbt_internal_test
131+
{%- endmacro %}

0 commit comments

Comments
 (0)