Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/snowflake support and docs #28

Merged
merged 4 commits into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ packages:
|**Database**|[assertions](#assertions)|[assertions_filter](#assertions_filter)|[\_\_unique__](#__unique__-helper)|[\_\_not_null__](#__not_null__-helper)|[generic_assertions](#generic_assertions)
|:---:|:---:|:---:|:---:|:---:|:---:|
|BigQuery (default)|✅|✅|✅|✅|✅|
|Snowflake|✅ </br> (alpha)|✅ </br> (alpha)|❌|❌|✔️|
|Snowflake|✅|✅|✅ </br>(not nested fields)|✅ </br>(not nested fields)|✅|
|Others|ℹ️|ℹ️|ℹ️|ℹ️|ℹ️|

- ✅: supported
Expand Down Expand Up @@ -210,7 +210,7 @@ WHERE {{ dbt_assertions.assertions_filter(exclude_list=['assertions_id']) }}

#### [generic_assertions](tests/generic/generic_assertions.sql)

Generates a test to get rows based on exceptionss.
Generates a test to get rows based on exceptions.

It will returns the rows without any exception by default.
You can change this default behaviour specifying a exclude_list or include_list (not both).
Expand Down Expand Up @@ -294,7 +294,7 @@ Custom assertions are the basics assertions.
It is represented as key values. Keys are the ID of the assertions.

Each assertions is defined by at least an `expression` which will be rendered
to be evaulated as your test.
to be evaluated as your test.

`description` and [`null_as_exception`](#null_as_exception) are optional.

Expand Down Expand Up @@ -371,7 +371,7 @@ assertions:
---

You can also verify unique keys for nested/repeated structure. It will generate:
- One assertion for the 0-depth guaranteeing uniqueness **accross the rows**.
- One assertion for the 0-depth guaranteeing uniqueness **across the rows**.
- One assertion **for each** repeated field guaranteeing uniqueness **within the row**.


Expand Down Expand Up @@ -495,7 +495,7 @@ WITH final AS
SELECT
*,
{{ dbt_assertions.assertions(column='errors') }},
{{ dbt_assertions.assertions(column='warns') }},
{{ dbt_assertions.assertions(column='warns') }}
FROM {{ ref('my_model') }}
```

Expand Down
4 changes: 2 additions & 2 deletions tests/generic/generic_assertions.sql
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
-#}

WITH
final AS (
dbt_assertions_final AS (
SELECT
*
{%- if re_assert and execute %}
Expand Down Expand Up @@ -45,7 +45,7 @@ WITH

SELECT
*
FROM `final`
FROM dbt_assertions_final
WHERE {{ dbt_assertions.assertions_filter(column, exclude_list, include_list, reverse=true) }}

{% endtest %}