medic / cht-pipeline

CHT Pipeline is a tool used to define data models for transforming the raw data we get from Couch DB into models that can then be queried to build dashboards
GNU General Public License v3.0
1 stars 4 forks source link

Add root model back to dbt #139

Closed witash closed 4 weeks ago

witash commented 1 month ago

As part of #90 , the 'root model' was removed from base models, to avoid duplicate storage and data copying. But the 'type' field still needs to be stored as its own column and indexed. We could add this to couch2pg, but ideally couchdb should only know about the document, not anything about its contents.

To avoid copying the large jsonb column, we could have this root table only contain the type, uuid (and any other metadata that's useful) and still have downstream models join to the couch2pg table to access the document itself.

njuguna-n commented 4 weeks ago

@witash can we close this issue since the document_metadata model was added?