dbt-project-evaluator icon indicating copy to clipboard operation
dbt-project-evaluator copied to clipboard

Add has_source_freshness test in stg_sources

Open Victoriapm opened this issue 9 months ago • 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

Victoriapm avatar Jun 03 '24 15:06 Victoriapm