-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature: nullable error_after in source (#3955)
* Add nullable error after feature * add merge_error_after method * Fix FreshnessThreshold merged test * Fix other tests * Fix merge error after * Fix test docs generate integration test * Fix source integration test * Typo and fix linting. * Fix mypy test * More terse way to express merge_freshness_time_thresholds * Update Changelog.md * Add integration test * Fix conflict * Fix contributing.md * Fix integration tests * Move up changelog entry Co-authored-by: Jeremy Cohen <jeremy@dbtlabs.com>
- Loading branch information
Showing
8 changed files
with
167 additions
and
21 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
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
42 changes: 42 additions & 0 deletions
42
test/integration/042_sources_test/override_freshness_models/schema.yml
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,42 @@ | ||
version: 2 | ||
sources: | ||
- name: test_source | ||
loader: custom | ||
freshness: # default freshness | ||
warn_after: {count: 12, period: hour} | ||
error_after: {count: 24, period: hour} | ||
schema: "{{ var(env_var('DBT_TEST_SCHEMA_NAME_VARIABLE')) }}" | ||
loaded_at_field: loaded_at | ||
quoting: | ||
identifier: True | ||
tags: | ||
- my_test_source_tag | ||
tables: | ||
- name: source_a | ||
identifier: source | ||
loaded_at_field: "{{ var('test_loaded_at') | as_text }}" | ||
freshness: | ||
warn_after: {count: 6, period: hour} | ||
# use the default error_after defined above | ||
- name: source_b | ||
identifier: source | ||
loaded_at_field: "{{ var('test_loaded_at') | as_text }}" | ||
freshness: | ||
warn_after: {count: 6, period: hour} | ||
error_after: {} # use the default error_after defined above | ||
- name: source_c | ||
identifier: source | ||
loaded_at_field: "{{ var('test_loaded_at') | as_text }}" | ||
freshness: | ||
warn_after: {count: 6, period: hour} | ||
error_after: null # override: disable error_after for this table | ||
- name: source_d | ||
identifier: source | ||
loaded_at_field: "{{ var('test_loaded_at') | as_text }}" | ||
freshness: | ||
warn_after: {count: 6, period: hour} | ||
error_after: {count: 72, period: hour} # override: use this new behavior instead of error_after defined above | ||
- name: source_e | ||
identifier: source | ||
loaded_at_field: "{{ var('test_loaded_at') | as_text }}" | ||
freshness: null # override: disable freshness for this table |
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