Skip to content
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

Merged
merged 3 commits into from
Dec 23, 2024
Merged

Update Models with gfactor Speed #502

merged 3 commits into from
Dec 23, 2024

Conversation

kengodleskidot
Copy link
Contributor

This PR makes the following changes:

  • Update the detector_agg reference in the g-factor model from the int_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 I added 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.

Resolves #484

…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
Copy link
Contributor

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.

Copy link
Contributor Author

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.
Copy link
Contributor

@thehanggit thehanggit left a 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!

@kengodleskidot kengodleskidot merged commit 203c82d into main Dec 23, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update current speed in the clearinghouse using g-factor speed
3 participants