ccda_to_omop.load_duck_db module

This 1/2 abandonded wreck after spliting the Jupyter workspace into a package and Jupyter and Spark drivers. No time to fix now. Kept in hope of ressurrecting use of DuckDB in the Jupyter environment for testing FK constraints.

Initiates an in-memory instance of DuckDB, reads in the OMOP DDL, and reads in any data provided.

For now, it’s useful to see issues regarding PK presence and uniqueness, datatypes..

TODO: This includes abuse of the OMOP DDL. Better solutions include - better metadata so the resulting dataset and CSV look like OMOP - a second stage here that modifies the resulting datasets to look more

like OMOP

  • some compromise means getting a handle on how narrow the CSV can be compared to OMOP. Can you leave out unused nullable fields?

ccda_to_omop.load_duck_db.check_PK(domain)[source]

Check primary key uniqueness for a domain table in DuckDB. DuckDB connection is currently commented out.

ccda_to_omop.load_duck_db.main()[source]