-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…2430) ## Summary Fixes #2429 ### Time to review: __5 mins__ ## Changes proposed Actually set the default chunk size to 800 Handle cases where lookup values in the legacy system are ` ` (whitespace) and treat them the same as null/empty strings Handle deleting the `current_opportunity_summary` record when an `opportunity_summary` is deleted ## Context for reviewers All issues found during testing in the prod ELT runs I was doing today Chunk size affects how "big" the batches are when we do queries to the Oracle foreign data wrapper as Oracle has a hard limit on the size of queries that we were hitting. For the lookup values, found a dozen or so opportunities where the opportunity category was literally a ` ` (space) and we couldn't process them. This fixes that and pre-emptively does it for other similar rows (although I think most of them haven't had the issue). The delete just takes advantage of SQLAlchemy's approach to deletes which will automatically delete through relationships when you do `db_session.delete(some_record)`. Now it'll know it needs to first delete the current opportunity summary record as part of that. ## Additional information Tests updated accordingly
- Loading branch information
Showing
6 changed files
with
37 additions
and
12 deletions.
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
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