-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add dbt_dq_tool_database variable * #6 Move tests of log table to integration tests * #6 fix dbt version in pr pipeline * #6 fix hook error * #6 update test script and add security * #6 update config for test * #6 comment in dbt_dq_tool_database for test * #6 fix dbt_dq_tool_database missing deafult * #6 extend test to other dbt versions * # isolate schema for PR with dbt version * #6 fix DBT_SCHEMA in pr ci pipeline --------- Co-authored-by: Dat Nguyen <dat@infinitelambda>
- Loading branch information
Showing
19 changed files
with
131 additions
and
77 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,24 @@ | ||
# Security Policy | ||
|
||
## Supported Versions | ||
|
||
Use this section to tell people about which versions of your project are | ||
currently being supported with security updates. | ||
|
||
| dbt Core | dq_tools 1.1 | dq_tools 1.2 | | ||
| ----------- | ------------------ | ------------------ | | ||
| 1.5.x | :warning: | :white_check_mark: | | ||
| 1.4.x | :warning: | :white_check_mark: | | ||
| 1.3.x | :white_check_mark: | :white_check_mark: | | ||
| 1.2.x | :white_check_mark: | :x: | | ||
| 1.1.x | :white_check_mark: | :x: | | ||
| 1.0.x | :white_check_mark: | :x: | | ||
| < 1.0 | :x: | :x: | | ||
|
||
## Reporting a Vulnerability | ||
|
||
Use this section to tell people how to report a vulnerability. | ||
|
||
Tell them where to go, how often they can expect to get an update on a | ||
reported vulnerability, what to expect if the vulnerability is accepted or | ||
declined, etc. |
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,69 @@ | ||
version: 2 | ||
|
||
sources: | ||
- name: dq_tools_test | ||
database: "{{ var('dbt_dq_tool_database', target.database) }}" | ||
schema: "{{ var('dbt_dq_tool_schema') }}" | ||
tables: | ||
- name: dq_issue_log | ||
tests: | ||
- dq_tools.expression_is_true_db: | ||
where: coalesce(ref_column,'') != '' | ||
expression: coalesce(ref_table,'') != '' | ||
columns: | ||
- name: check_timestamp | ||
tests: | ||
- dq_tools.not_null_where_db | ||
- name: table_name | ||
tests: | ||
- dq_tools.not_null_where_db | ||
- name: dq_issue_type | ||
tests: | ||
- dq_tools.not_null_where_db | ||
- name: invocation_id | ||
tests: | ||
- dq_tools.not_null_where_db | ||
- name: dq_model | ||
tests: | ||
- dq_tools.not_null_where_db | ||
- dq_tools.expression_is_true_db: # singular test error should not exists | ||
expression: dq_model != 'assert_intentional_error' | ||
- dq_tools.expression_is_true_db: # generic test error should not exists | ||
where: table_name like '%.test_failures' and coalesce(column_name,'') = '' | ||
expression: dq_model not like 'dq_tools_expression_is_true_db_test_failures_1_0%' | ||
- name: severity | ||
tests: | ||
- dq_tools.not_null_where_db | ||
- dq_tools.accepted_values_where_db: | ||
values: [ | ||
'warn', | ||
'error' | ||
] | ||
- name: kpi_category | ||
tests: | ||
- dq_tools.not_null_where_db | ||
- dq_tools.accepted_values_where_db: | ||
values: [ | ||
'Other', | ||
'Uniqueness', | ||
'Consistency', | ||
'Validity', | ||
'Timeliness', | ||
'Completeness', | ||
'Accuracy', | ||
] | ||
- name: no_of_records | ||
tests: | ||
- dq_tools.not_null_where_db: | ||
where: coalesce(table_name,'') != '' | ||
- dq_tools.expression_is_true_db: | ||
where: coalesce(ref_table,'') != '' | ||
expression: no_of_records >= 0 | ||
- name: no_of_records_failed | ||
tests: | ||
- dq_tools.not_null_where_db | ||
- dq_tools.expression_is_true_db: | ||
expression: no_of_records_failed >= 0 | ||
- dq_tools.expression_is_true_db: | ||
where: lower(dq_model) like '%failure%' | ||
expression: no_of_records_failed > 0 |
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,4 @@ | ||
packages: | ||
- local: ../ | ||
- package: dbt-labs/dbt_utils | ||
version: [">=1.0.0", "<2.0.0"] |
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
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
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
Oops, something went wrong.