ohdsi-studies / Covid19SubjectsAesiIncidenceRate

Extending on our previous work by Li et al. in understanding the incidence rates of adverse events of special interest (AESI) for COVID-19, this work will look at the rates of these AESIs in patients who had COVDI-19 disease.
https://ohdsi-studies.github.io/Covid19SubjectsAesiIncidenceRate/Protocol.html
2 stars 4 forks source link

Error in exportConceptInformation - Vocabulary tables not found #17

Closed eminty closed 2 years ago

eminty commented 2 years ago

exportConceptInformation() is defined in CohortDiagnostics/ConceptIds.R

It uses DatabaseConnector::getTableNames(connection, schema) to retrieve the table names. These are then compared to a defined set of candidate vocabulary table names to find and subsequently query those vocabulary tables.

In exploring this, getTableNames(connection, cdmDatabaseSchema) returns character(0), (it doesn't matter if I add or remove backtics in the schema name, which I've noted has been an issue in the past). The cdmDatabaseSchema definition has been sufficient to execute the study thus far.

I can return the list of tables in the cohortDatabaseSchema using getTableNames() and the same connection however.

Thread: Main
Message:  Error in exportConceptInformation(connection = connection, cdmDatabaseSchema = cdmDatabaseSchema,  :    Vocabulary tables not found in som-rit-phi-starr-prod.starr_omop_cdm5_deid_latest 
Level:  FATAL
Time:  2022-01-07 20:12:58

Stack trace:
6: logFatal(gsub("\n", " ", geterrmessage()))
5: (function () 
{
    logFatal(gsub("\n", " ", geterrmessage()))
    if (!is.null(previous
4: stop("Vocabulary tables not found in ", cdmDatabaseSchema)
3: exportConceptInformation(connection = connection, cdmDatabaseSchema = cdmDatabaseSchema,
2: CohortDiagnostics::runCohortDiagnostics(packageName = "Covid19SubjectsAesiIncidenceRate"
1: Covid19SubjectsAesiIncidenceRate::execute(connectionDetails = connectionDetails, verifyD

R version:
R version 4.0.5 (2021-03-31)

Platform:
x86_64-pc-linux-gnu

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

Other attached packages:
- CirceR (1.1.1)
- BQJdbcConnectionStringR (0.1)
ericaVoss commented 2 years ago

@eminty - does your Vocab sit in the same schema as your CDM?

eminty commented 2 years ago

To circle back on this before closure - the vocab does sit in the same schema.

It appears that the issue stems from the getTableNames() method when applied to the cdm schema. Updating to the most recent version (1.2.21.1025 as of time of writing) of the simba JDBC driver did not fix it.

From conversation with @schuemie , this was not seen on the test BQ instance they have access to. It seems likely that it relates to a security / permission setting of the Stanford BQ repository in its interaction with the driver.

As a temporary work around, a branch of CohortDiagnostics was established that comments out the exportConceptInformation() call by @msuchard .

Will explore some internal solutions to this. Thanks for your help.