[APP-522] fix: convert qa 05 library to python#3214
Open
mcmcgrath13 wants to merge 12 commits into
Open
Conversation
…into mcm/pylib-qa-05
mcmcgrath13
commented
May 11, 2026
|
|
||
| DECLARE @sr11Id BIGINT = (SELECT library_uid FROM [dbo].[Report_Library] WHERE library_name = @pyLib) | ||
| DECLARE @sr12Id BIGINT = (SELECT library_uid FROM [dbo].[Report_Library] WHERE library_name = @sasLib) | ||
| IF EXISTS ((SELECT library_uid FROM [dbo].[Report_Library] WHERE library_name = @sasLib)) |
Contributor
Author
There was a problem hiding this comment.
to prevent failure if run twice
mcmcgrath13
commented
May 11, 2026
mcmcgrath13
commented
May 11, 2026
mcmcgrath13
commented
May 11, 2026
|
JordanGuinn
approved these changes
May 12, 2026
| content = trx.query( | ||
| f""" | ||
| WITH v_event_metric as ({subset_query}), | ||
| PROG_AREA as ( |
Contributor
There was a problem hiding this comment.
(q, nb): I'm not sure if it would even be doable within Python's multi-line strings, but there could be some readability value in extracting the sub-queries for the various columns into variables? Not a particularly huge deal either way, just figured I'd bring it up as this took me a good while to grok as-is
emyl3
reviewed
May 12, 2026
Contributor
emyl3
left a comment
There was a problem hiding this comment.
Looks good to me code-wise! Will wait to approve after I can run the QA05.sas report locally to check the functional testing portion!! 😅
emyl3
approved these changes
May 12, 2026
This file contains hidden or 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
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.



Description
Convert QA 5 library to python
Confluence card:
https://cdc-nbs.atlassian.net/wiki/spaces/NE/database/2145779742?contentId=2145779742&entryId=255da10a-35dd-47a7-8a97-107e0d1f6934&savedViewId=0030073a-ae3e-4225-af11-74f57f91494d
jira ticket:
https://cdc-nbs.atlassian.net/browse/APP-522
Checklist for adding a library:
apps/modernization-api/src/main/resources/db/changelog/report/execution/03_ODSE_Data_Report_Library_Init.sqlapps/modernization-api/src/main/resources/db/report/execution/librariesnamed<your library name>.sqlapps/modernization-api/src/main/resources/db/report-execution-changelog.yml. It should be added to the latestchangeSetsince the last release - this could require a newchangeSetif there isn't one since last releaseapps/report-execution/src/librariesnamed in lowercase, but generally following the naming convention of SAS (needs to be human recognizable as the same library)executefunction is the required method and its signature will (someday) be checked for validityapps/report-execution/tests/libraries/<your_library_here>pyfile following the conventions established for other librariessubset_sqlcan be assumed to be well tested by the modernization-api, so focus on any logic and additional joins/queries/analysis that is added in the libraryTickets