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

Error in generating metrics distribution #92

Open tseto opened 3 years ago

tseto commented 3 years ago

Error executing SQL: java.sql.SQLException: [Simba]BigQueryJDBCDriver Error executing query job. Message: Unrecognized name: <gcp_project>.<dataset> at [17:8] An error report has been created at /home/ohdsi/workdir/notebooks/errorReportSql.txt Backtrace:

  1. PioneerWatchfulWaiting::runStudy(...)
  2. DatabaseConnector::renderTranslateExecuteSql(...)
  3. DatabaseConnector::executeSql(...)
  4. base::tryCatch(...)
  5. base:::tryCatchList(expr, classes, parentenv, handlers)
  6. base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
  7. value[3L]
  8. DatabaseConnector:::.createErrorReport(...)

DatabaseConnector::renderTranslateExecuteSql doesn't work too well with BigQuery and my BigQueryJDBCDriver. Is there a reason you are using renderTranslateExecuteSql instead of

sql <- SqlRender::loadRenderTranslateSql DatabaseConnector::executeSql(connection, sql)

which is being used throughout the rest of the R code?

keesvanbochove commented 3 years ago

Not a particular reason, but renderTranslateQuerySql calls SqlRender::render and SqlRender::translate internally as well, so they should amount to the same output (see https://github.com/OHDSI/DatabaseConnector/blob/master/R/Sql.R). If it's an error in the query translation, perhaps you need to file a bug report there (https://github.com/OHDSI/SqlRender/issues).

Which query is this? Could you attach errorReportSql.txt?