coderxio / sagerx

Open drug data pipelines curated by pharmacists.
https://coderx.io/sagerx
Other
41 stars 11 forks source link

Update DB Schemas [Attempt 2] #268

Closed lprzychodzien closed 3 months ago

lprzychodzien commented 3 months ago

Resolves #229

Explanation

Updated schema to align with issue discussion. With sagerx being the production user-facing schema

Tests

  1. What testing did you do?
testing logs ``` ```
jrlegrand commented 3 months ago

I had to resolve a merge conflict in staging/rxnorm_historical/rxnorm_historical__ndcs.sql weirdly - I just made it like how it is in the main branch. Other than that, it's still putting all the stg/int/marts in sagerx_dev aside from the pg_stat_statments tables which end up in sagerx. I'm still not clear how / when / why we switch over to the sagerx schema for "production" stuff. But simply having everything (aside from datasources) in one schema is a step forward in my opinion.

I ran the marts through to completion to make sure they worked - looks like they do.

sagerx schema image

sagerx_dev schema image

sagerx_lake schema image