-
Notifications
You must be signed in to change notification settings - Fork 67
Partitioning Direction Update #161
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
Partitioning Direction Update #161
Conversation
The new direction updater takes an argument |
Changed column names back to timestamp1, timestamp2 for testing purposes.
* Implemented the Quick Fix: Direction should be updated to NA wherever there are no historical data to compute the stdev from. * Modified the integration test to test for this behavior
* Updated column names back to value_updated_timestamp and direction_updated_timestamp.
To add the
We can drop the |
@AlSaeed The new column is added. Once merged we can do the second step. |
change signal type from VARCHAR(32) to VARCHAR(64) in temporary tables.
|
||
# partition configuration | ||
PARTITION_VARIABLE = 'geo_value' | ||
PARTITION_SPLITS = ["'05101'", "'101'", "'13071'", "'15007'", "'17161'", "'19039'", "'20123'", "'21213'", "'24035'", |
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.
how did you come up with these split values?
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.
They were chosen so that they split a recent full issue into roughly equally-sized partitions.
finally: | ||
# no catch block so that an exception above will cause the program to | ||
# fail after the following cleanup | ||
database.disconnect(commit) |
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.
possibly consider moving this out of the loop so the db is consistent? i guess having partially updated directions isnt such a bad thing
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.
I guess there is an argument for both sides. The other side being this allows to investigate the failure and only update the remaining partitions instead of running the entire job again.
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.
¯\(ツ)/¯ its probably fine to leave 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.
Either way someone has to go in and fix it manually, so as long as we document what the behavior is and what should be done in a failure, it's fine.
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.
nice sql magic!
No description provided.