Skip to content

Prevent overcounting PropertyMovedToConfigDeprecation for source freshness #11660

@graciegoheen

Description

@graciegoheen

Current Behavior

if i have freshness defined for 1 source (4 tables)

version: 2

sources:
  - name: raw
    database: raw
    schema: magic_shop
    freshness:
      warn_after:
        count: 24
        period: hour
    loaded_at_query: "select current_timestamp()"
    tables:
      - name: wizards
      - name: orders
      - name: wands
      - name: worlds

when i run dbt parse --no-partial-parse --show-all-deprecations i see 4 deprecations listed (all to the same file):

22:05:29 [WARNING]: Deprecated functionality
Found `freshness` as a top-level property of `raw` in file
`models/staging/sources.yml`. The `freshness` top-level property should be moved
into the `config` of `raw`.
22:05:29 [WARNING]: Deprecated functionality
Found `freshness` as a top-level property of `raw` in file
`models/staging/sources.yml`. The `freshness` top-level property should be moved
into the `config` of `raw`.
22:05:29 [WARNING]: Deprecated functionality
Found `freshness` as a top-level property of `raw` in file
`models/staging/sources.yml`. The `freshness` top-level property should be moved
into the `config` of `raw`.  

and the summary:

22:05:29 [WARNING]: Deprecated functionality
Summary of encountered deprecations:
- PropertyMovedToConfigDeprecation: 4 occurrences

Expected Behavior

i feel like this should only be 1 instance of the deprecated functionality not 4 - this is inflating length of logs and # of occurrences of deprecation

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions