Achilles: Cohort_Definition_Id Invalid Identifier

Hello All,

I have some experience with Achilles and ran into this error that I’m not quite sure how to proceed. The COHORT_DEFINITION table in my Schema (cdmVersion=5) exists with the following values:

COHORT_CONCEPT_ID NUMBER(38,0)
COHORT_END_DATE DATE
COHORT_ID NUMBER(38,0)
COHORT_START_DATE DATE
STOP_REASON VARCHAR2(20 BYTE)
SUBJECT_ID NUMBER(38,0)

Commands:
library(Achilles)

connectionDetails <- createConnectionDetails(dbms=“oracle”, server="[server]", user="[Schema]", password="[Password]", schema="[Schema]")

achillesResults <- achilles(connectionDetails, “[Schema]”, “[Schema]”, “[Schema]”, “”, cdmVersion=“5”)

Resulting Error:

DBMS:
 oracle
        Error:
    execute JDBC update query failed in dbSendUpdate (ORA-00904: "COHORT_DEFINITION_ID": invalid identifier
    )
    
SQL:
insert into [Schema].ogwzyh2lTableCheck (tablename)
SELECT     'cohort'
  FROM   (SELECT  
                cohort_definition_id,
                cohort_start_date,
                cohort_end_date,
                subject_id,
    row_number() over (order by cohort_definition_id) rn
 FROM 
                [Schema].cohort
 ) COHORT
  WHERE  rn = 1 

R version:
R version 3.2.2 (2015-08-14)

Platform:
x86_64-pc-linux-gnu

Attached base packages:
- stats
- graphics
- grDevices
- utils
- datasets
- methods
- base

Other attached packages:
- Achilles (1.0)
- rjson (0.2.15)
- DatabaseConnector (1.3.0)
- RJDBC (0.2-5)
- rJava (0.9-6)
- DBI (0.3.1)
- SqlRender (1.1.3)

Thank you for your time reviewing this,
Rich

Okay, as soon as I posted this, I found the possible error. Seems like my COHORT table is different from what the sql command is from Achilles so I will try to match tables.

In cdm v5, the identifier of a cohort is cohort_definition_id. It appears that your cohort definition table is from v4.

-Chris