Skip to content

Commit

Permalink
Merge pull request #483 from dbt-labs/fix/freshness-set-to-null
Browse files Browse the repository at this point in the history
  • Loading branch information
b-per authored Aug 20, 2024
2 parents 087f02d + 78761aa commit fb96c46
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions integration_tests/models/staging/source_1/source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ sources:
- name: table_2
- name: table_4
- name: table_5
freshness: # default freshness
warn_after: null
freshness: null
- name: raw_table_5
identifier: table_5

Expand Down
4 changes: 2 additions & 2 deletions macros/unpack/get_source_values.sql
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
"cast(" ~ dbt_project_evaluator.is_not_empty_string(node.description) | trim ~ " as boolean)",
"cast(" ~ node.config.enabled ~ " as boolean)",
wrap_string_with_quotes(node.loaded_at_field | replace("'", "_")),
"cast(" ~ (dbt_project_evaluator.is_not_empty_string(node.freshness.warn_after.count)
or dbt_project_evaluator.is_not_empty_string(node.freshness.error_after.count)) | trim ~ " as boolean)",
"cast(" ~ ((node.freshness != None) and (dbt_project_evaluator.is_not_empty_string(node.freshness.warn_after.count)
or dbt_project_evaluator.is_not_empty_string(node.freshness.error_after.count))) | trim ~ " as boolean)",
wrap_string_with_quotes(node.database),
wrap_string_with_quotes(node.schema),
wrap_string_with_quotes(node.package_name),
Expand Down

0 comments on commit fb96c46

Please sign in to comment.