-
Notifications
You must be signed in to change notification settings - Fork 3
Added the linelist FactART on the Archive #678
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
base: dev
Are you sure you want to change the base?
Conversation
Reviewer's GuideAdd a new ETL script that archives the Linelist_FACTART table from the reporting schema into the historical schema by performing a full insert-select with column mappings and load metadata. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey @DennisGibz - I've reviewed your changes and they look great!
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location> `Scripts/REPORTING/SCHEMA/2_Archive_Linelist_FACTART.sql:108` </location>
<code_context>
+
+ SELECT [PatientIDHash]
+ ,[PatientPKHash]
+ ,[Sex]
+ ,[DOB]
+ ,[MaritalStatus]
</code_context>
<issue_to_address>
Column mapping mismatch: 'Gender' vs 'Sex'.
Ensure the column names in the insert and select statements match to prevent data insertion errors.
</issue_to_address>
### Comment 2
<location> `Scripts/REPORTING/SCHEMA/2_Archive_Linelist_FACTART.sql:207` </location>
<code_context>
+ ,[OnTBTreatment]
+ ,[TPTInitiationDate]
+ ,[CareGiverLastVL]
+ ,[EndofMonthDate]
+ ,GetDate()
+ FROM [REPORTING].[dbo].[Linelist_FACTART]
</code_context>
<issue_to_address>
Column mapping mismatch: 'AsOfDate' vs 'EndofMonthDate'.
Please confirm that mapping 'EndofMonthDate' to 'AsOfDate' is correct and maintains the intended data meaning.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
|
||
| SELECT [PatientIDHash] | ||
| ,[PatientPKHash] | ||
| ,[Sex] |
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.
issue (bug_risk): Column mapping mismatch: 'Gender' vs 'Sex'.
Ensure the column names in the insert and select statements match to prevent data insertion errors.
| ,[OnTBTreatment] | ||
| ,[TPTInitiationDate] | ||
| ,[CareGiverLastVL] | ||
| ,[EndofMonthDate] |
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.
issue (bug_risk): Column mapping mismatch: 'AsOfDate' vs 'EndofMonthDate'.
Please confirm that mapping 'EndofMonthDate' to 'AsOfDate' is correct and maintains the intended data meaning.
| @@ -0,0 +1,209 @@ | |||
| insert into [Historical].[dbo].[Linelist_FACTART]([PatientIDHash] | |||
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.
@DennisGibz
I thought we would implement similar to this https://github.com/palladiumkenya/dwh-etl/blob/dev/Scripts/NDWH/C%26T%20FACT%20TABLES/2_FactART_Historical_Snapshot.sql ?
To take care of when we run the pipelines multiple times a month to avoid duplicating the table.
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.
@nobert-mumo this is for the linelist not the fact. The process exists but manual.
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.
@DennisGibz not sure I get it. I meant we should consider implementing the historical of the linelist in a similar way we did for the fact
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.
@DennisGibz not sure I get it. I meant we should consider implementing the historical of the linelist in a similar way we did for the fact
…LineList_FactART_Archive
…by month. Similar to historical factART
|
@nobert-mumo ,yes I agree with you. Above is now well factored in. |
Summary by Sourcery
Enhancements: