OHDSI / dbt-synthea

[Under development] A dbt ETL project to convert a Synthea synthetic data set into the OMOP CDM
https://ohdsi.github.io/dbt-synthea/
Apache License 2.0
16 stars 6 forks source link

fix: use explicit seed types or null type casts where necessary for postgres #70

Closed lawrenceadams closed 1 month ago

lawrenceadams commented 1 month ago

This PR fixes a handful of issues that cause postgres to fail running the project.

These issues were all around type casting, given the empty seed files would result to everything being cast as integrers, and nulls without types being treated as text types. Duckdb is much more forgiving!

For now I have:

lawrenceadams commented 1 month ago

Good catch! I hadn't run dbt test on postgres recently so I missed these 😅

Neither had I haha 🙃

lawrenceadams commented 1 month ago

@katy-sadowski I have applied the dbt.cast here - I think it's best to clean up all other casts in another PR or this will get messy!

edit: passes on pg.