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

SQL Server: Truncation error with multiple mappings to same concept #70

Closed Ben-Goethuys closed 2 months ago

Ben-Goethuys commented 3 months ago

Mapping multiple source_values to the same omop concept_id could result in data truncation error in SQL Server.

e.g.:

Mapping multiple measurements to same concept results in error: "String or binary data would be truncated in table 'FHIN.work.measurement', column 'measurement_source_value'."

The column ('measurement_source_value') in "work-zone" table is filled with "STRING_AGG(t.measurement_source_value, ', ')". Column size of 'measurement_source_value' is limited and aggregating multiple source_values exceeds this limit.