-
Notifications
You must be signed in to change notification settings - Fork 4
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
* Add tests to contact views working models * Add tests to use views working models * feat: make model chnages and temporarily remove dashboard models * feat: fix failing models * Merge conflicts * feat: fix failing models * Add users.yml to gitignore * Add tests for contact_views models * Add tests to useviews models * Fix some test * Add tests for main models * Add relationships and accepted_values tests * Add relationships tests on contact views models * Add relationships tests to main models * Fix Did not find matching node for patch error * Fix accepted values errors * Fix tests * Fixing failing tests * Delete some failing tests * First views model test * Add useviews model tests * Change the way columns are referenced in couchdb * Trying to see if the problem are the seeds * Add test to pncview_actual_enrrollments model * Add test for form_metadata model * Add test for impactview_month * Add test to formview_inmunization_follow_up model * Add test for formview_assessment_follow_up model * Add test for formview_muac_follow_up * Add test on couples of views models * Fix views.yml duplicate * Add more test on views models * Add more test to views models * Delete failed tests * Add first test for impact anc models * Delete exclude command from run dbt * Revert deletion of failing tests * Reverse change * reverse deletions * Fix brac name * Finish test for views models * Move and rename impact test file. Implement impact tests * Delete commented lines --------- Co-authored-by: Maria Lorena Rodriguez Viruel <[email protected]> Co-authored-by: Njuguna Ndung'u <[email protected]>
- Loading branch information
1 parent
2b7957b
commit 194b3d5
Showing
26 changed files
with
793 additions
and
321 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,7 @@ dbt_packages/ | |
logs/ | ||
*/.env | ||
*/dbt_packages/ | ||
tests/.user.yml | ||
dbt-env/* | ||
.user.yml | ||
dbt-env/* |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
version: 2 | ||
|
||
models: | ||
- name: brac_hmis | ||
columns: | ||
- name: uuid | ||
tests: | ||
- not_null | ||
- unique | ||
- relationships: | ||
to: ref('contactview_chp') | ||
field: uuid | ||
- name: households_registered | ||
tests: | ||
- not_null | ||
- name: num_of_hh_visited | ||
tests: | ||
- not_null | ||
- name: num_of_hh_bed_nets | ||
tests: | ||
- not_null | ||
- name: num_of_hh_latrines | ||
tests: | ||
- not_null | ||
- name: num_of_hh_safe_water | ||
tests: | ||
- not_null | ||
- name: num_of_comm_members | ||
tests: | ||
- not_null | ||
- name: num_of_health_forum | ||
tests: | ||
- not_null | ||
- name: num_pregnant_care | ||
tests: | ||
- not_null | ||
- name: num_pregnant_identified | ||
tests: | ||
- not_null | ||
- name: num_facility_deliveries | ||
tests: | ||
- not_null | ||
- name: num_home_deliveries | ||
tests: | ||
- not_null | ||
- name: brac-kpis | ||
columns: | ||
- name: chp_uuid | ||
tests: | ||
- not_null | ||
- relationships: | ||
to: ref('contactview_chp') | ||
field: uuid | ||
- name: count_all_assessments | ||
tests: | ||
- not_null | ||
- name: u5_malaria_treatment | ||
tests: | ||
- not_null | ||
- name: u5_diarrhea_treatment | ||
tests: | ||
- not_null | ||
- name: u5_pneumonia_treatment | ||
tests: | ||
- not_null | ||
- name: u1_malaria_treatment | ||
tests: | ||
- not_null | ||
- name: u1_diarrhea_treatment | ||
tests: | ||
- not_null | ||
- name: u1_pneumonia_treatment | ||
tests: | ||
- not_null |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
version: 2 | ||
|
||
models: | ||
- name: contactview_person | ||
columns: | ||
- name: uuid | ||
tests: | ||
- not_null | ||
- unique | ||
- relationships: | ||
to: ref('couchdb') | ||
field: doc ->> '_id' | ||
- name: name | ||
tests: | ||
- not_null | ||
- name: patient_id | ||
tests: | ||
- not_null | ||
- name: contactview_person_fields | ||
columns: | ||
- name: uuid | ||
tests: | ||
- not_null | ||
- unique | ||
- relationships: | ||
to: ref('contactview_metadata') | ||
field: uuid | ||
tests: | ||
- dbt_utils.fewer_rows_than: | ||
compare_model: ref('contactview_metadata') | ||
- name: contactview_chw | ||
columns: | ||
- name: uuid | ||
tests: | ||
- not_null | ||
- unique | ||
- relationships: | ||
to: ref('contactview_person_fields') | ||
field: uuid | ||
tests: | ||
- dbt_utils.fewer_rows_than: | ||
compare_model: ref('contactview_metadata') | ||
- dbt_utils.fewer_rows_than: | ||
compare_model: ref('contactview_person_fields') | ||
- name: contactview_chp | ||
columns: | ||
- name: uuid | ||
tests: | ||
- not_null | ||
- unique | ||
- relationships: | ||
to: ref('contactview_chw') | ||
field: uuid | ||
- name: branch_uuid | ||
tests: | ||
- not_null | ||
- name: supervisor_uuid | ||
tests: | ||
- not_null | ||
tests: | ||
- dbt_utils.fewer_rows_than: | ||
compare_model: ref('contactview_metadata') | ||
- dbt_utils.fewer_rows_than: | ||
compare_model: ref('contactview_person_fields') | ||
- name: contactview_muted | ||
columns: | ||
- name: contact_uuid | ||
tests: | ||
- not_null | ||
- unique | ||
- relationships: | ||
to: ref('contactview_metadata') | ||
field: uuid | ||
- name: type | ||
tests: | ||
- not_null | ||
- accepted_values: | ||
values: | ||
[contact, clinic, district_hospital, health_center, person] | ||
- name: mute_status | ||
tests: | ||
- not_null | ||
- name: date | ||
tests: | ||
- not_null | ||
tests: | ||
- dbt_utils.fewer_rows_than: | ||
compare_model: ref('contactview_metadata') | ||
- name: contactview_hospital | ||
columns: | ||
- name: uuid | ||
tests: | ||
- not_null | ||
- unique | ||
- relationships: | ||
to: ref('contactview_metadata') | ||
field: uuid | ||
tests: | ||
- dbt_utils.fewer_rows_than: | ||
compare_model: ref('contactview_metadata') | ||
- name: contactview_hierarchy | ||
columns: | ||
- name: branch_uuid | ||
tests: | ||
- not_null | ||
- relationships: | ||
to: ref('contactview_branch') | ||
field: uuid | ||
- name: chw_uuid | ||
tests: | ||
- not_null | ||
- relationships: | ||
to: ref('contactview_chp') | ||
field: uuid | ||
- name: chw_area_uuid | ||
tests: | ||
- not_null | ||
- name: contactview_branch | ||
columns: | ||
- name: uuid | ||
tests: | ||
- not_null | ||
- unique | ||
- relationships: | ||
to: ref('contactview_hospital') | ||
field: uuid | ||
- name: contactview_clinic | ||
columns: | ||
- name: uuid | ||
tests: | ||
- not_null | ||
- relationships: | ||
to: ref('contactview_metadata') | ||
field: uuid | ||
- name: chw_uuid | ||
tests: | ||
- not_null | ||
- relationships: | ||
to: ref('contactview_chw') | ||
field: uuid | ||
tests: | ||
- dbt_utils.fewer_rows_than: | ||
compare_model: ref('contactview_metadata') |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,4 +43,4 @@ SELECT | |
reported_by_parent, | ||
reported | ||
FROM | ||
danger_sign_CTE; | ||
danger_sign_CTE |
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 was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,4 +15,4 @@ SELECT | |
FROM | ||
{{ ref('useview_visit') }} | ||
WHERE | ||
visit_type = 'anc'; | ||
visit_type = 'anc' |
Oops, something went wrong.