smart-on-fhir / cumulus-library

https://docs.smarthealthit.org/cumulus/library/
Apache License 2.0
2 stars 0 forks source link

feat: add new DuckDB backend for reading ndjson directly #144

Closed mikix closed 7 months ago

mikix commented 7 months ago

This adds some new arguments: --db-type [athena,duckdb] (defaulting to athena) --load-ndjson-dir DIR (tells DuckDB where to find source ndjsons)

A light abstraction layer has been added in databases.py to choose the correct backend based on the args.

Mostly the SQL is the same. Some light tweaks for standardization, plus some compatibility user-defined functions injected into duckdb allow both backends to work on the same SQL.

Checklist