Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disambiguate FreshnessConfigProblem error message #9891

Merged
merged 3 commits into from
Apr 12, 2024

Conversation

MichelleArk
Copy link
Contributor

@MichelleArk MichelleArk commented Apr 10, 2024

resolves: #9913

given yaml:

sources:
  - name: ecom
    schema: jaffle_shop_raw
    description: E-commerce data for the Jaffle Shop
    freshness:
      warn_after:
        count: 24
        period: hour
    tables:
      - name: raw_customers
        description: One record per person who has purchased one or more items
      - name: raw_orders
        description: One record per order (consisting of one or more order items)
        loaded_at_field: ordered_at
      - name: raw_items
        description: Items included in an order
      - name: raw_stores
        loaded_at_field: opened_at
      - name: raw_products
        description: One record per SKU for items sold in stores
      - name: raw_supplies
        description: One record per supply per SKU of items sold in stores

before:

❯ dbt --no-partial-parse  parse
23:26:14  Running with dbt=1.8.0-b2
23:26:14  target not specified in profile 'postgres', using 'default'
23:26:15  Registered adapter: postgres=1.8.0-b2
23:26:16  [WARNING]: Deprecated functionality
The `tests` config has been renamed to `data_tests`. Please see
https://docs.getdbt.com/docs/build/data-tests#new-data_tests-syntax for more
information.
23:26:16  The configured adapter does not support metadata-based freshness. A loaded_at_field must be specified for source 'ecom'.
23:26:16  The configured adapter does not support metadata-based freshness. A loaded_at_field must be specified for source 'ecom'.
23:26:16  The configured adapter does not support metadata-based freshness. A loaded_at_field must be specified for source 'ecom'.
23:26:16  The configured adapter does not support metadata-based freshness. A loaded_at_field must be specified for source 'ecom'.

after:

❯ dbt parse
23:23:46  Running with dbt=1.8.0-b2
23:23:46  target not specified in profile 'postgres', using 'default'
23:23:47  Registered adapter: postgres=1.8.0-b2
23:23:48  [WARNING]: Deprecated functionality
The `tests` config has been renamed to `data_tests`. Please see
https://docs.getdbt.com/docs/build/data-tests#new-data_tests-syntax for more
information.
23:23:48  The configured adapter does not support metadata-based freshness. A loaded_at_field must be specified for source 'ecom.raw_customers'.
23:23:48  The configured adapter does not support metadata-based freshness. A loaded_at_field must be specified for source 'ecom.raw_items'.
23:23:48  The configured adapter does not support metadata-based freshness. A loaded_at_field must be specified for source 'ecom.raw_products'.
23:23:48  The configured adapter does not support metadata-based freshness. A loaded_at_field must be specified for source 'ecom.raw_supplies'.
23:23:48  Performance info: /Users/michelleark/src/jaffle-shop/target/perf_info.json

resolves #

Problem

Solution

Checklist

  • I have read the contributing guide and understand what's expected of me
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc) or this PR has already received feedback and approval from Product or DX
  • This PR includes type annotations for new and modified functions

@cla-bot cla-bot bot added the cla:yes label Apr 10, 2024
Copy link
Contributor

Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide.

Copy link

codecov bot commented Apr 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.14%. Comparing base (6fee361) to head (3a90b11).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9891      +/-   ##
==========================================
+ Coverage   88.09%   88.14%   +0.04%     
==========================================
  Files         178      178              
  Lines       22459    22459              
==========================================
+ Hits        19786    19797      +11     
+ Misses       2673     2662      -11     
Flag Coverage Δ
integration 85.59% <ø> (+0.12%) ⬆️
unit 61.82% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MichelleArk MichelleArk changed the title improve FreshnessConfigProblem error message Disambiguiate FreshnessConfigProblem error message Apr 12, 2024
@MichelleArk MichelleArk marked this pull request as ready for review April 12, 2024 16:57
@MichelleArk MichelleArk requested a review from a team as a code owner April 12, 2024 16:57
@MichelleArk MichelleArk changed the title Disambiguiate FreshnessConfigProblem error message Disambiguate FreshnessConfigProblem error message Apr 12, 2024
@MichelleArk MichelleArk merged commit 99d033f into main Apr 12, 2024
62 checks passed
@MichelleArk MichelleArk deleted the improve-freshness-config-error-message branch April 12, 2024 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[source freshness] FreshnessConfigProblem log does not disambiguate by table name
2 participants