Skip to content

Commit

Permalink
Revert deletion of failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Maria Lorena Rodriguez Viruel authored and Maria Lorena Rodriguez Viruel committed Oct 20, 2023
1 parent 23d8ad6 commit 55616a7
Showing 1 changed file with 123 additions and 6 deletions.
129 changes: 123 additions & 6 deletions models/contact_views/contact_views.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,143 @@
version: 2

models:
- name: raw_contacts
- name: contactview_person
columns:
- name: doc
- 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('couchdb')
- name: contactview_metadata
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.equal_rowcount:
compare_model: ref('raw_contacts')
- 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')

0 comments on commit 55616a7

Please sign in to comment.