-
Notifications
You must be signed in to change notification settings - Fork 8
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
949 missing leg in miovision_api.open_issues
join
#950
Conversation
miovision_api.open_issues
join
@@ -26,18 +44,19 @@ JOIN miovision_api.intersections AS i USING (intersection_uid) | |||
--find last week volume | |||
LEFT JOIN miovision_api.volumes AS v | |||
ON ar.intersection_uid = v.intersection_uid | |||
--volume within the last 7 days and after AR started | |||
AND v.datetime_bin >= ar.range_start |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so for example if we run this today, and the range was add yesterday,
the sum volume for last_week_volume
would be summing up only 1 day of data
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, because we wouldn't want to know the volume from before range_start
, which would either be zero, or non-zero from a time before the issue started. I could rename it/change it to average daily volume if you think that's better?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yess, to reduce confusion if that ever happens
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Decided to explain it with a column comment and also in the check_open_anomalous_ranges
airflow alert.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:gabe-approved:
Updated |
What this pull request accomplishes:
last_week_volume
to only look at dates within the AR + formatting that number with commasIssue(s) this solves:
What, in particular, needs to reviewed:
What needs to be done by a sysadmin after this PR is merged