Skip to content

Commit fb96c46

Browse files
authored
Merge pull request #483 from dbt-labs/fix/freshness-set-to-null
2 parents 087f02d + 78761aa commit fb96c46

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

integration_tests/models/staging/source_1/source.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ sources:
1616
- name: table_2
1717
- name: table_4
1818
- name: table_5
19-
freshness: # default freshness
20-
warn_after: null
19+
freshness: null
2120
- name: raw_table_5
2221
identifier: table_5
2322

macros/unpack/get_source_values.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
"cast(" ~ dbt_project_evaluator.is_not_empty_string(node.description) | trim ~ " as boolean)",
2525
"cast(" ~ node.config.enabled ~ " as boolean)",
2626
wrap_string_with_quotes(node.loaded_at_field | replace("'", "_")),
27-
"cast(" ~ (dbt_project_evaluator.is_not_empty_string(node.freshness.warn_after.count)
28-
or dbt_project_evaluator.is_not_empty_string(node.freshness.error_after.count)) | trim ~ " as boolean)",
27+
"cast(" ~ ((node.freshness != None) and (dbt_project_evaluator.is_not_empty_string(node.freshness.warn_after.count)
28+
or dbt_project_evaluator.is_not_empty_string(node.freshness.error_after.count))) | trim ~ " as boolean)",
2929
wrap_string_with_quotes(node.database),
3030
wrap_string_with_quotes(node.schema),
3131
wrap_string_with_quotes(node.package_name),

0 commit comments

Comments
 (0)