-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into dependabot/pip/pre-commit-approx-eq-3.7.1
- Loading branch information
Showing
14 changed files
with
267 additions
and
46 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
kind: Fixes | ||
body: 'Handle unit test fixtures where typing goes wrong from first value in column | ||
being Null. ' | ||
time: 2024-06-25T17:03:24.73937-07:00 | ||
custom: | ||
Author: versusfacit | ||
Issue: "821" |
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,6 @@ | ||
kind: Under the Hood | ||
body: Remove `freezegun` as a testing dependency; this package is no longer used | ||
time: 2024-07-19T13:31:51.503575-04:00 | ||
custom: | ||
Author: mikealfare | ||
Issue: "1136" |
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 was deleted.
Oops, something went wrong.
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,21 @@ | ||
#!/bin/bash -e | ||
set -e | ||
|
||
|
||
dbt_adapters_branch=$1 | ||
dbt_core_branch=$2 | ||
dbt_common_branch=$3 | ||
target_req_file="dev-requirements.txt" | ||
core_req_sed_pattern="s|dbt-core.git.*#egg=dbt-core|dbt-core.git@${dbt_core_branch}#egg=dbt-core|g" | ||
adapters_req_sed_pattern="s|dbt-adapters.git|dbt-adapters.git@${dbt_adapters_branch}|g" | ||
common_req_sed_pattern="s|dbt-common.git|dbt-common.git@${dbt_common_branch}|g" | ||
if [[ "$OSTYPE" == darwin* ]]; then | ||
# mac ships with a different version of sed that requires a delimiter arg | ||
sed -i "" "$adapters_req_sed_pattern" $target_req_file | ||
sed -i "" "$core_req_sed_pattern" $target_req_file | ||
sed -i "" "$common_req_sed_pattern" $target_req_file | ||
else | ||
sed -i "$adapters_req_sed_pattern" $target_req_file | ||
sed -i "$core_req_sed_pattern" $target_req_file | ||
sed -i "$common_req_sed_pattern" $target_req_file | ||
fi |
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
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,11 @@ | ||
{%- macro redshift__validate_fixture_rows(rows, row_number) -%} | ||
{%- if rows is not none and rows|length > 0 -%} | ||
{%- set row = rows[0] -%} | ||
{%- for key, value in row.items() -%} | ||
{%- if value is none -%} | ||
{%- set fixture_name = "expected output" if model.resource_type == 'unit_test' else ("'" ~ model.name ~ "'") -%} | ||
{{ exceptions.raise_compiler_error("Unit test fixture " ~ fixture_name ~ " in " ~ model.name ~ " does not have any row free of null values, which may cause type mismatch errors during unit test execution.") }} | ||
{%- endif -%} | ||
{%- endfor -%} | ||
{%- endif -%} | ||
{%- 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
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,73 @@ | ||
model_none_value_base = """ | ||
{{ config(materialized="table") }} | ||
select 1 as id, 'a' as col1 | ||
""" | ||
|
||
model_none_value_model = """ | ||
{{config(materialized="table")}} | ||
select * from {{ ref('none_value_base') }} | ||
""" | ||
|
||
|
||
test_none_column_value_doesnt_throw_error_csv = """ | ||
unit_tests: | ||
- name: test_simple | ||
model: none_value_model | ||
given: | ||
- input: ref('none_value_base') | ||
format: csv | ||
rows: | | ||
id,col1 | ||
,d | ||
,e | ||
6,f | ||
expect: | ||
format: csv | ||
rows: | | ||
id,col1 | ||
,d | ||
,e | ||
6,f | ||
""" | ||
|
||
test_none_column_value_doesnt_throw_error_dct = """ | ||
unit_tests: | ||
- name: test_simple | ||
model: none_value_model | ||
given: | ||
- input: ref('none_value_base') | ||
rows: | ||
- { "id": , "col1": "d"} | ||
- { "id": , "col1": "e"} | ||
- { "id": 6, "col1": "f"} | ||
expect: | ||
rows: | ||
- {id: , "col1": "d"} | ||
- {id: , "col1": "e"} | ||
- {id: 6, "col1": "f"} | ||
""" | ||
|
||
test_none_column_value_will_throw_error = """ | ||
unit_tests: | ||
- name: test_simple | ||
model: none_value_model | ||
given: | ||
- input: ref('none_value_base') | ||
rows: | ||
- { "id": , "col1": "d"} | ||
- { "id": , "col1": "e"} | ||
- { "id": 6, "col1": } | ||
expect: | ||
rows: | ||
- {id: , "col1": "d"} | ||
- {id: , "col1": "e"} | ||
- {id: 6, "col1": } | ||
""" |
Oops, something went wrong.