Hi Elementary team, I am running (or trying to) vo...
# community-support
j
Hi Elementary team, I am running (or trying to) volume_anomaly.training_period but getting below error.
✅ 1
Using this config:
Copy code
tests:
      - elementary.volume_anomalies:
          timestamp_column: ts
          training_period: 
            period: month
          seasonality: day_of_week
          time_bucket:
            period: day
            count: 7
          anomaly_direction: drop
Copy code
Compilation Error in test elementary_volume_anomalies_linked_partner_activity_ts__month (models/transform/accounts/models/linked_partner_activity.yml)
  macro 'dbt_macro__test_volume_anomalies' takes no keyword argument 'training_period'
Any help would be appreciated
Running elementary 0.10
a
For me this config is working fine:
Copy code
- elementary.volume_anomalies:
          training_period:
            period: day
            count: 30
          detection_period:
            period: day
            count: 1
          time_bucket:
            period: day
Try giving, count specifically. Also you can try upgrading to latest 0.14.1 version, if there is no specific requirements
🙌 2
j
Thanks @Anil, I have tried with count as well and same result. Will try bumping up the version.
What I have noticed in the Elementary macro, that it does not have parameter
training_period
.
Copy code
{% test volume_anomalies(model, timestamp_column, where_expression, anomaly_sensitivity, anomaly_direction, min_training_set_size, time_bucket, days_back, backfill_days, seasonality, sensitivity) %}
🤔
Aha, installed version 14 and training_period is part of the volume test macro. All good. Thanks heaps for help.
a
No problem, but where exactly I can check this default defined macros? Also have you crated any custom python test?
j
That macro is under dbt packages/ Elementary.
a
Thanks!