-
Notifications
You must be signed in to change notification settings - Fork 35
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
Implementation of unique tests on all Core models #497
Conversation
…ons with similar claims IDs and claim line numbers
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.
FYI this won't work on athena
cast(unpivot_cte.claim_id||''||unpivot_cte.claim_line_number||''||unpivot_cte.diagnosis_rank||'_'||unpivot_cte.source_code as {{ dbt.type_string() }} ) as condition_id
athena makes you cast claim line number explicitly as varchar
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.
we'll have to cast as varchar instead of date for athena
cast(patient_id as {{ dbt.type_string() }} ) || '-' || cast(enrollment_start_date as date ) || '-' || cast(enrollment_end_date as date )
|| '-' || cast(payer as {{ dbt.type_string() }} ) || '-' || cast(plan as {{ dbt.type_string() }} ) as eligibility_id
, cast(patient_id as {{ dbt.type_string() }} ) as patient_id
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.
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.
this won't work on athena, need to cast as same type
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.
fixed
changed cast to string
changed casting to string
Describe your changes
Please include a summary of any changes.
How has this been tested?
Please describe the tests you ran to verify your changes. Provide instructions or code to reproduce output.
ran dbt build locally
Reviewer focus
Please summarize the specific items you’d like the reviewer(s) to look into.
Checklist before requesting a review
tuva_last_run
to the final outputPackage release checklist
dbt_project.yml
(Optional) Gif of how this PR makes you feel
Loom link