Skip to content

Use lowercase value_as_source_concept_id in the v5.5 DDL - #829

Open
chenyangsu wants to merge 1 commit into
OHDSI:mainfrom
chenyangsu:fix/v5.5-ddl-value-as-source-concept-id
Open

chenyangsu wants to merge 1 commit into
OHDSI:mainfrom
chenyangsu:fix/v5.5-ddl-value-as-source-concept-id

Conversation

@chenyangsu

Copy link
Copy Markdown

b1cc2a0 made value_as_source_concept_id consistently lowercase in the v5.5 field spec on 19 Aug. The v5.5 DDL was last generated on 14 Aug, before that change. So the v5.5.0 scripts still create value_as_source_concept_Id in measurement and observation, and name the constraints fpk_measurement_value_as_source_concept_Id and fpk_observation_value_as_source_concept_Id. This affects all 16 dialects.

Most databases fold unquoted identifiers, so queries still work. But the column comes back as value_as_source_concept_Id in metadata on engines that preserve case (e.g. DuckDB, BigQuery), so tools that compare column names exactly against the spec CSV will see a mismatch.

Change: lowercase the 58 occurrences in the 29 v5.5 ddl and constraints files. No other lines change.

Check

  • A fresh buildRelease(cdmVersions = "5.5") (SqlRender 1.19.7) now matches these files, apart from the float type emitted for duckdb and postgresql (NUMERIC vs DOUBLE/DOUBLE PRECISION). That difference comes from the SqlRender version, also shows up for v5.3 and v5.4, and I left it alone.
  • The v5.5 PostgreSQL ddl, primary keys and constraints scripts all run cleanly in PGlite.

This is probably 5.5.1 material, like #814.

b1cc2a0 made the column name consistently lowercase in the v5.5 field spec,
but the v5.5 DDL was last generated before that commit, so v5.5.0 shipped
value_as_source_concept_Id in the measurement and observation tables and in
the fpk_*_value_as_source_concept_Id constraint names, in all dialects.

Lowercase the 58 occurrences across the 29 ddl and constraints files. A fresh
buildRelease() of v5.5 now matches these files apart from the float type
SqlRender emits for duckdb and postgresql (NUMERIC vs DOUBLE), which is
unrelated and also differs for v5.3 and v5.4.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant