Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overall dbt-synthea layout #29

Open
RogerJCarlson opened this issue Apr 1, 2024 · 0 comments
Open

Overall dbt-synthea layout #29

RogerJCarlson opened this issue Apr 1, 2024 · 0 comments

Comments

@RogerJCarlson
Copy link
Collaborator

RogerJCarlson commented Apr 1, 2024

I'd like to suggest an overall layout that works well for our OMOP project. For the highest level for models would look like this:
image

  • At the individual OMOP table level, It would look like this:
    image

  • The _Sources_TS folder is where we store the dbt "stage" tables (although we use that for something else)
    image

  • The "pull" folder holds the models based on the source tables. This is the only folder where source tables and fields are referenced. Also, as much formatting and aggregation and such is done here. All fields will be aliased to OMOP standard field names.
    image

  • The "stage" level does all the joining to other OMOP tables like Concept, Source_To_Concept_Map Person, and so forth
    image

-- The _ephemeral subfolder holds any subordinate models.
image

  • Lastly, the "write' folder holds a single model which UNIONs all the STAGE models together into a single materialized table.
    image

So, the entire layout for drug_exposure looks like this:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant