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

Macro 'dbt_macro__test_event_freshness_anomalies' takes no keyword argument 'training_period' #1641

Closed
annav00 opened this issue Jul 18, 2024 · 2 comments
Labels
Bug Something isn't working Triage 👀

Comments

@annav00
Copy link

annav00 commented Jul 18, 2024

Describe the bug
If you specify training_period in the event_freshness_anomalies test parameters, then the test crashes at the compilation stage with error

Compilation Error in test elementary_event_freshness_anomalies_accounts_VALID_TO_DTTM__hour__1__day__7__PROCESSED_DTTM (models/stg_history/schema.yaml)
  macro 'dbt_macro__test_event_freshness_anomalies' takes no keyword argument 'training_period'

To Reproduce

  1. Test parameters:
  - elementary.event_freshness_anomalies:
      training_period:
        period: day
        count: 2
      update_timestamp_column: PROCESSED_DTTM
      event_timestamp_column: VALID_FROM_DTTM
  1. run dbt test

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
image

Environment (please complete the following information):

  • Elementary dbt package version: 0.15.2
  • Data warehouse: snowflake

Additional context
The event_freshness_anomalies macro, that it does not have parameter training_period.

{% test event_freshness_anomalies(model, event_timestamp_column, update_timestamp_column, where_expression, anomaly_sensitivity, anomaly_direction, min_training_set_size, time_bucket, days_back, backfill_days, sensitivity, ignore_small_changes, detection_delay, anomaly_exclude_metrics) %}

Would you be willing to contribute a fix for this issue?
Yes, I can fix this problem by adding a training_period parameter to the macro event_freshness_anomalies

@dapollak
Copy link
Contributor

Hey @annav00,
Thanks for noticing. This will be fixed with this fix, and will be released in our next dbt package version.

@ofek1weiss
Copy link
Contributor

Hey @annav00, version 0.16.0 was released, and with it the fix 🥳

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Triage 👀
Projects
None yet
Development

No branches or pull requests

3 participants