-
Notifications
You must be signed in to change notification settings - Fork 1
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
Update Models with gfactor Speed #502
Conversation
…clearinghouse__detector_agg_five_minutes_with_missing_rows to int_clearinghouse__detector_agg_five_minutes model. In the int_clearinghouse__detector_agg_five_minutes_with_missing_rows model add the g-factor speed data to detectors/timestamps where speed is not being provided by the field devices In the int_imputation__detector_agg_five_minutes and int_performance__detector_metrics_agg_five_minutes models remove the old speed calculation formula and notes. YAML file updated describing the speed value being used in the int_clearinghouse__detector_agg_five_minutes_with_missing_rows model.
left join gfactor_speed as gs | ||
on | ||
agg.detector_id = gs.detector_id | ||
and agg.sample_timestamp = gs.sample_timestamp |
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.
Note: adding another join to this already expensive model doesn't seems to hurt performance too much (see query profile from CI here), but let's keep our eyes on it.
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.
The other alternatives we could investigate are creating a new model downstream of int_clearinghouse__detector_agg_five_minutes_with_missing_rows to add the g-factor speed or possibly add it to the int_imputation__detector_agg_five_minutes model.
…g_five_minutes model since it is no longer applicable. All speed values are being added in the clearinghouse and imputation models upstream of the int_performance__detector_metrics_agg_five_minutes model. If the is_speed_calculated column is needed, it can be added to the clearinghouse models.
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.
Thank you @kengodleskidot. I think @JamesSLogan made a good point. Other than that, everything looks good. Let's have our own g-factor speed!
This PR makes the following changes:
Resolves #484