Skip to content

Support treating dbt_utils.recency tests as first-class Freshness in Elementary OSS (including models) #2139

@guillermojast

Description

@guillermojast

Is your feature request related to a problem? Please describe.

Currently, Elementary OSS surfaces freshness primarily through:

  • dbt source freshness (freshness: in sources.yml)
  • Elementary’s own freshness_anomalies / event_freshness_anomalies tests

However, many teams use dbt_utils.recency as their standard freshness/SLA test — especially for models, since dbt source freshness only applies to sources.

Although dbt_utils.recency is conceptually a freshness test (and is classified as such in dbt Hub), in Elementary OSS it is treated as a generic test. As a result:

  • Recency tests do not appear in the “Freshness” sections of reports/dashboards.
  • Freshness coverage metrics may be incomplete when teams rely on recency.
  • There is inconsistency between how dbt users think about freshness and how it is visualized in Elementary.

This creates confusion and fragmented observability when monitoring model freshness.


Describe the solution you'd like

Add native support in Elementary OSS to treat dbt_utils.recency tests as first-class freshness tests.

Possible implementation options:

  1. Automatically classify tests using the dbt_utils.recency macro as freshness tests in Elementary metadata.
  2. Alternatively (or additionally), allow classification via:
    • A specific test tag (e.g. tags: ['freshness'])
    • A configurable mapping in elementary.yml
  3. Include these tests in:
    • Freshness-related report sections
    • Freshness coverage metrics
    • Any freshness dashboards or visualizations

Ideally, this would work for both sources and models, enabling a unified freshness monitoring approach across the project.


Describe alternatives you've considered

  • Using elementary.freshness_anomalies instead of dbt_utils.recency.
    This works for anomaly-based freshness detection but does not replace explicit SLA-based freshness checks.

  • Relying solely on dbt source freshness.
    This is insufficient because it does not support models.

  • Forking/modifying Elementary OSS to reclassify recency tests manually.
    While technically possible, this creates maintenance overhead and diverges from upstream.


Additional context

Many teams standardize on dbt_utils.recency for freshness SLAs (e.g., “data must be updated within 2 hours”). Treating it as a first-class freshness test in Elementary would:

  • Align Elementary with common dbt practices
  • Improve consistency between test intent and observability presentation
  • Enable model-level freshness visibility without relying exclusively on anomaly detection

This would make Elementary more flexible while maintaining backward compatibility.


Would you be willing to contribute this feature?

Yes — I would be open to contributing this feature with guidance on the appropriate place in the codebase to implement the test classification and reporting changes.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions