How to use days back in report and anomaly detection tests?
We had two questions about this in #support on Slack recently. We need to add it to FAQ and see if there are other parts of the flow where we can better address this.
@Maayan-s Can you assign this issue to me . I would like to work on it .
Hi @YashPimple! Thank you for wanting to contribute and improve our docs! I think the best way to approach this would be to read the thread from our Slack where I explained it to a user:
Are you a Slack user? Could you join? If not let me know and I'll upload here
Yes i have join Slack but i am unable to find the thread can u plz resend it or upload it over here?
Just tagged you in the relevant thread :)
@Maayan-s i am unable to find the thread can you please send it over here?
Sure! @YashPimple
User: Hi, i am trying to test my models with days_back 45 days, but it is not picking up this value, and defaults to 14 days even though i have declared it on the dbt_project.yml level. I am sure I am missing a step here.
Answer: I think there are actually 3 steps to solve that.
- full refresh of the model 'data_monitoring_metrics' by running
dbt run --select data_monitoring_metrics --full-refresh - running the elementary tests again
- run the CLI with days back param:
edr monitor report --days-back 45
user: Ah ok will try that. So the variable defined in dbt project yml will recalculate the anomalies from 45 days till date, but in order to show up on the CLI, i also need to add that --days_back 45 ?
Answer: exactly :) I totally understand that we didn't document that well enough. Will think of how to be more informative there!
Hi @YashPimple, just wanted to see if you noticed my comment on your PR?
Yes! working on it
Done!