Skip to content

Commit

Permalink
Reverse change
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 55616a7 commit 9531756
Showing 1 changed file with 6 additions and 123 deletions.
129 changes: 6 additions & 123 deletions models/contact_views/contact_views.yml
Original file line number Diff line number Diff line change
@@ -1,143 +1,26 @@
version: 2

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

0 comments on commit 9531756

Please sign in to comment.