Hi I’m using the code in OHDSI/circe-be to load JSON and get the SQL statements.
Since the default dialect for the output is sqlserver
, I added on more step that uses SqlTranslate.translateSql() function to translate into postresql
.
When we try to run the SQL against our OMOP dataset, we noticed some parts has this type of annotation that looks like a conditional statement
{2 != 0}? { ... some statement ... }
For example see https://github.com/OHDSI/circe-be/blob/master/src/main/resources/resources/cohortdefinition/sql/generateCohort.sql#L32
(there are 2 more instances in this file with this annotation)
We had to remove this manually before running it against our OMOP dataset since it doesn’t look to be valid postgresql
syntax.
It could be that I’m missing some option or config that perhaps will replace this stmt with something valid. If we use the cohort definition builder in ATLAS the SQL output doesn’t have this annotation.
I’m wondering if other people has come across this issue before.