-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ability to run dbt tests with ClickHouse, passing TestResultData …
…validation (#18)
- Loading branch information
1 parent
0bc8826
commit 07b94e2
Showing
3 changed files
with
14 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{% macro clickhouse__get_test_sql(main_sql, fail_calc, warn_if, error_if, limit) -%} | ||
select | ||
{{ fail_calc }} as failures, | ||
case when {{ fail_calc }} {{ warn_if }} | ||
then 'true' else 'false' end as should_warn, | ||
case when {{ fail_calc }} {{ error_if }} | ||
then 'true' else 'false' end as should_error | ||
from ( | ||
{{ main_sql }} | ||
{{ "limit " ~ limit if limit != none }} | ||
) dbt_internal_test | ||
{%- endmacro %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters