Hi team,
when I ran CodeToRun.R for estimation R package using Databricks database, an error occurred:
ad 1 returns error: “object ‘connectionString’ not found” when using argument(s): list(args = list(connectionDetails = list(dbms = “spark”, extraSettings = NULL, oracleDriver = “thin”, pathToDriver = “c:/temp/jdbcDrivers”, user = function () nrlang::eval_tidy(userExpression). But the ‘connectionString’ has been defined at the beginning. Can someone help me out? Thanks
Best,
Gongliang
Which version of DatabaseConnector are you running?
5.02
I’m pretty sure this problem is solved in the latest version of DatabaseConnector (6.1.0). Could you give that a try?
Hi Dr. Schuemie,
Thank you for your infromation. I updated Databaseconnector, remotes::install_github(“OHDSI/DatabaseConnector”, version = ‘6.1.0’), but another problem raised (see blow). Can you help me fix it? I do appreciate your time and support.
execute(connectionDetails = connectionDetails,
-
cdmDatabaseSchema = cdmDatabaseSchema,
-
cohortDatabaseSchema = cohortDatabaseSchema,
-
cohortTable = cohortTable,
-
outputFolder = outputFolder,
-
databaseId = databaseId,
-
databaseName = databaseName,
-
databaseDescription = databaseDescription,
-
verifyDependencies = TRUE,
-
createCohorts = TRUE,
-
synthesizePositiveControls = TRUE,
-
runAnalyses = TRUE,
-
packageResults = TRUE,
-
maxCores = maxCores)
Checking whether correct package versions are installed
Error in x$Priority : $ operator is invalid for atomic vectors
In addition: Warning message:
In FUN(X[[i]], …) :
DESCRIPTION file of package ‘DatabaseConnector’ is missing or broken
Error in verifyDependencies() :
Mismatch between required and installed package versions. Did you forget to run renv::restore()?
- Package rlang version 1.1.0 should be 1.0.1
- Package glue version 1.6.2 should be 1.6.1
- Package cli version 3.6.1 should be 3.1.1
- Package crayon version 1.5.2 should be 1.4.2
- Package fansi version 1.0.4 should be 1.0.2
- Package lifecycle version 1.0.3 should be 1.0.1
- Package magrittr version 2.0.3 should be 2.0.2
- Package utf8 version 1.2.3 should be 1.2.2
- Package vctrs version 0.6.1 should be 0.3.8
- Package bit version 4.0.5 should be 4.0.4
- Package cpp11 version 0.4.3 should be 0.4.2
- Package fastmap version 1.1.1 should be 1.1.0
- Package hms version 1.1.3 should be 1.1.1
- Package pillar version 1.9.0 should be 1.6.5
- Package purrr version 1.0.1 should be 0.3.4
- Package cachem version 1.0.7 should be 1.0.6
- Package colorspace version 2.1.0 should be 2.0.2
- Package generics version 0.1.3 should be 0.1.2
- Package Rcpp version 1.0.10 should be 1.0.8
- Packag
when I run renv::restore()
get:
Error: target file ‘C:/Users/gxz108/AppData/Local/R/cache/R/renv/library/estimation_study_1_export-2ca07953/R-4.2/x86_64-w64-mingw32/DatabaseConnector’ already exists
Could you try
remove.packages("DatabaseConnector")
renv::purge("DatabaseConnector")
Before running renv::restore()
?
Thanks.