RADar-AZDelta / Rabbit-in-a-Blender

An ETL pipeline to transform your EMP data to OMOP.
https://radar-azdelta.github.io/Rabbit-in-a-Blender/
GNU General Public License v3.0
11 stars 3 forks source link

Error running riab --cleanup #92

Closed JensCardon closed 6 days ago

JensCardon commented 1 month ago

Running the riab --cleanup command results in foreignkey vialation errors for Azure SQL Server Databases.

Possible fix: replace TRUNCATE by DELETE statements

Note: if not already implemented, work tables should be cleaned as well when running the cleanup command.

pjlammertyn commented 6 days ago

This is incorrect! Before the cleanup, riab disables all the constraints: https://github.com/RADar-AZDelta/Rabbit-in-a-Blender/blob/main/src/riab/etl/sql_server/cleanup.py#L32

Riab is not aware if you add additional constraints.