-
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
I0669 aggregate volumes 15min mvt tries to insert duplicate values #674
Merged
chmnata
merged 19 commits into
master
from
i0669-aggregate-volumes_15min_mvt-tries-to-insert-duplicate-values
Nov 13, 2023
Merged
I0669 aggregate volumes 15min mvt tries to insert duplicate values #674
chmnata
merged 19 commits into
master
from
i0669-aggregate-volumes_15min_mvt-tries-to-insert-duplicate-values
Nov 13, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…cate-values' of github.com:CityofToronto/bdit_data-sources into i0669-aggregate-volumes_15min_mvt-tries-to-insert-duplicate-values
…-insert-duplicate-values
…cate-values' of github.com:CityofToronto/bdit_data-sources into i0669-aggregate-volumes_15min_mvt-tries-to-insert-duplicate-values
radumas
requested changes
Nov 7, 2023
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.
Great work! All the SQL looks good, just a minor issue in cur.execute
volumes/miovision/sql/function-aggregate-volumes_15min_mvt_single_intersection.sql
Outdated
Show resolved
Hide resolved
Ready for re-review! |
radumas
approved these changes
Nov 11, 2023
…-insert-duplicate-values
chmnata
deleted the
i0669-aggregate-volumes_15min_mvt-tries-to-insert-duplicate-values
branch
November 13, 2023 14:03
Changes applied on postgres + airflow |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this pull request accomplishes:
miovision_api.aggregate_15_min_mvt_single_intersection
to aggregate just a single intersection intovolumes_15min_mvt
.miovision_api.aggregate_15_min_mvt
functionIssue(s) this solves:
What, in particular, needs to reviewed:
Fluffed and unnested the CTE in base function https://github.com/CityofToronto/bdit_data-sources/blob/09130027d9b2ab637dd4876663d804467757909d/volumes/miovision/sql/function-aggregate-volumes_15min_mvt.sql
Duplicated new base function but added an intersection function argument and added an anti join to new function to prevent adding duplicate 0 padded values. function-aggregate-volumes_15min_mvt_single_intersection.sql
bdit_data-sources/volumes/miovision/sql/function-aggregate-volumes_15min_mvt_single_intersection.sql
Lines 38 to 41 in 0913002
WHERE...
bdit_data-sources/volumes/miovision/sql/function-aggregate-volumes_15min_mvt_single_intersection.sql
Lines 72 to 73 in 0913002
Updated master...i0669-aggregate-volumes_15min_mvt-tries-to-insert-duplicate-values to use the new single intersection function if intersections are specified in function call.
What needs to be done by a sysadmin after this PR is merged
miovision_api.aggregate_15_min_mvt
miovision_api.aggregate_15_min_mvt_single_intersection