ohdsi-studies / PioneerWatchfulWaiting

This study is part of the joint PIONEER - EHDEN - OHDSI studyathon in March 2021, and aims to advance understanding of clinical management and outcomes of watchful waiting in prostate cancer.
Apache License 2.0
7 stars 18 forks source link

ORA-00923: FROM keyword not found where expected #7

Closed scossin closed 3 years ago

scossin commented 3 years ago

Our dbms is Oracle. This SQL query returns the error:

SELECT cohort_definition_id, COUNT(*) AS size FROM OMOP_TEMP.PIONEER_CDWBordeaux_stg
WHERE cohort_definition_id IN (201,202,203) GROUP BY cohort_definition_id;

The problem is "size" is a keyword. It works by quoting the word size ( As "size") or with another word (AS total_number)

The issue is already known and was fixed in the development branch: OHDSI/FeatureExtraction@c10eac8

The problem is the fix hasn't been released yet and if I use it, it may cause other issues because the column "size" was renamed "population_size" and probably this package expects a "size" column in output of the SQL query.

The solution I chose is to re-fix the issue, not by changing the name to population_size but by adding quotes in the SQL query. Other datapartners with Oracle DMBS could install the package here: https://github.com/scossin/FeatureExtraction/tree/issue_size_pioneercharacterization

keesvanbochove commented 3 years ago

@scossin can you confirm this is fixed in 0.3.2?

scossin commented 3 years ago

Yes for Oracle users it's still an issue, we had this error in version 0.3.2

keesvanbochove commented 3 years ago

Bumped FeatureExtraction requirements to fix this.