OHDSI / DataQualityDashboard

A tool to help improve data quality standards in observational data science.
https://ohdsi.github.io/DataQualityDashboard
Apache License 2.0
136 stars 92 forks source link

Syntax error due to a clash between OFFSET CDM attribute and Postgresql keyword #219

Closed vpapez closed 2 years ago

vpapez commented 3 years ago

Field_cdm_field.sql script returns a syntax error (log). A name of the attribute 'offset' (OMOP CDM table 'note_nlp') is also a postgresql keyword. Issue probably occurs due to the latest commit.

Environment: Postgresql v 11:11, OMOP CDM v5.3.1, DQD v1.3.1

ericaVoss commented 3 years ago

I have seen this too . . . I think a double quote removes the issue?

Tagging @mgadetta

vpapez commented 3 years ago

I have seen this too . . . I think a double quote removes the issue?

Tagging @mgadetta

Yup, probably. I put a table name variable in front of it which worked fine as well (ln 21: 'case when count_big(cdmTable.@cdmFieldName) = 0 then 0')

clairblacketer commented 2 years ago

duplicate issue around offset. PR #273 fixes this by removing offset from being evaluated altogether as it is a reserved word in many DBMS's and has been causing problems.