elementary-data / elementary

The dbt-native data observability solution for data & analytics engineers. Monitor your data pipelines in minutes. Available as self-hosted or cloud service with premium features.
https://www.elementary-data.com/
Apache License 2.0
1.87k stars 158 forks source link

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

Closed annav00 closed 1 month ago

annav00 commented 1 month ago

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):

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 commented 1 month ago

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

ofek1weiss commented 1 month ago

Hey @annav00, version 0.16.0 was released, and with it the fix šŸ„³