-
Notifications
You must be signed in to change notification settings - Fork 13
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
[Issue 2887] Add new columns to EtlDb and bump schema version #2931
Merged
Merged
Changes from all commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
1d16441
implemented basic versioning for schema management
DavidDudas-Intuitial 2cc4825
insert row into version table; rename methods for better readability
DavidDudas-Intuitial 5fc3297
missing from last commit
DavidDudas-Intuitial 447fc61
enable multiple sql files to execute during init db operation
DavidDudas-Intuitial 5226bc0
formatting
DavidDudas-Intuitial 219b130
formatting
DavidDudas-Intuitial 53cf9a9
add ability to check schema version number
DavidDudas-Intuitial 3a7f039
added minimum schema version logic
DavidDudas-Intuitial 629287b
added new columns; bumped schema version number
DavidDudas-Intuitial 71ac599
made the schema versioning process more resilient to developer error
DavidDudas-Intuitial 37d9b77
fixed linter issues
DavidDudas-Intuitial eb68eb5
rename sql file
DavidDudas-Intuitial 3140069
Merge branch 'main' into issue-2857-analytics-db-schema-versioning
DavidDudas-Intuitial 5112ba2
Merge branch 'main' into issue-2857-analytics-db-schema-versioning
DavidDudas-Intuitial bdbf88c
added logging of each migration; removed drop_table sql to prevent ac…
DavidDudas-Intuitial f1e276c
added comment to explain regex
DavidDudas-Intuitial ae6de3e
improved handling of non-conformant sql filenames
DavidDudas-Intuitial 28c2c2e
added verbose docstring
DavidDudas-Intuitial 2bb8360
added tests
DavidDudas-Intuitial 2f1f52f
fixed linter issue
DavidDudas-Intuitial 117e6f4
fixed linter issue
DavidDudas-Intuitial 8ff23b6
Merge branch 'main' into issue-2857-analytics-db-schema-versioning
DavidDudas-Intuitial 2620e64
added support for deliverable status
DavidDudas-Intuitial 220fc80
Merge branch 'main' into issue-2887-new-etldb-columns
DavidDudas-Intuitial 1dfdbcf
run docker compose down before make init-db; changed sequence of jobs…
DavidDudas-Intuitial 762b180
Merge branch 'main' into issue-2887-new-etldb-columns
DavidDudas-Intuitial 0630b97
update tests
DavidDudas-Intuitial cdbf4e1
added support for gh_project table
DavidDudas-Intuitial 051c7fa
Merge branch 'main' into issue-2887-new-etldb-columns
DavidDudas-Intuitial 9abb20e
combined sql files
DavidDudas-Intuitial 0a16643
update tests
DavidDudas-Intuitial bb9a743
fix type check bug
DavidDudas-Intuitial a34f106
format
DavidDudas-Intuitial 170db64
add mapping between sprint and project; moved exception handling from…
DavidDudas-Intuitial d59ac04
remove version validation, per request
DavidDudas-Intuitial 8e318f3
Merge branch 'main' into issue-2887-new-etldb-columns
DavidDudas-Intuitial 7599d0f
Merge branch 'main' into issue-2887-new-etldb-columns
DavidDudas-Intuitial File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
Oops, something went wrong.
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.
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.
File this away for future improvements, but just wanted to highlight that instead of:
A more common pattern would be to select the distinct set of values we want to insert using pandas drop_duplicates function and then iterate through the list of data, inserting each row or (preferably) doing a bulk upsert.
The difference between these patterns is trivial when we're inserting 3 project values, but it seems we're using the same pattern in most places:
Plus this current approach limits the options we have for bulk operations, which would make it easier to wrap DML into transaction blocks and rollback all changes if the statement fails, avoiding partial updates of tables during a batch process.
I think it's good the current insert pattern follows the others, but I created this ticket for us to revisit that insert pattern and added it to our improvements/tech debt epic