dbt-labs/dbt-project-evaluator

Add has_source_freshness test in stg_sources

Victoriapm opened this issue · 1 comments

Describe the feature

Add to the stg_sources model an additional field that validates the source has freshness assigned.

Additional context

Files that need to be modified:

  1. get_source_values.sql: Add field that validates the source has freshness assigned, either as a warn or error
"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)",
  1. stg_sources: Add the field as boolean
    cast(True as boolean) as has_freshness,

Who will this benefit?

Anyone that wants to monitor that, similar to test coverage, their sources have freshness defined.

Are you interested in contributing this feature?

Yes, I already have the code working but I'll need help on how to contribute

To contribute, just create a PR and it will kick of CI automatically!