Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update skeleton for upcoming PLP v5.4.0 #30

Open
lhjohn opened this issue Jul 20, 2022 · 2 comments
Open

Update skeleton for upcoming PLP v5.4.0 #30

lhjohn opened this issue Jul 20, 2022 · 2 comments

Comments

@lhjohn
Copy link
Collaborator

lhjohn commented Jul 20, 2022

No description provided.

@lhjohn
Copy link
Collaborator Author

lhjohn commented Jul 21, 2022

EDIT: Below seems to be resolved with the latest SqlRender and DatabaseConnector.

I am still seeing the following error, where executing the SQL fails.

Extracting data for cohort 5920 to ./ResultsIqviaGERv1944/targetId_5920_L1
Connecting using Redshift driver
|====================================================================================| 100%
Executing SQL took 4.08 secs
Constructing features on server
|====================================================================================| 100%
Executing SQL took 10.9 secs
Fetching data from server
Error in `.createErrorReport()`:
! Error executing SQL:

The error report is empty.

DBMS:
redshift

Error:

This is the traceback.

15: cat(paste(c("\r  |", rep.int(char, nb), rep.int(" ", nw * (width - 
        nb)), sprintf("| %3d%%", pc)), collapse = ""), file = file)
14: pb$up(value)
13: setTxtProgressBar(pb, i/length(sqlStatements))
12: DatabaseConnector::executeSql(connection, sql) at CohortConstruction.R#233
11: runCohortSql(sql = sql, startTime = startTime, incremental = incremental, 
        cohortId = cohortDefinitionSet$cohortId[i], checksum = cohortDefinitionSet$checksum[i], 
        recordKeepingFile = recordKeepingFile) at CohortConstruction.R#259
10: doTryCatch(return(expr), name, parentenv, handler)
9: tryCatchOne(expr, names, parentenv, handlers[[1L]])
8: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch(expr = {
       startTime <- lubridate::now()
       generationInfo <- runCohortSql(sql = sql, startTime = startTime, 
           incremental = incremental, cohortId = cohortDefinitionSet$cohortId[i], 
           checksum = cohortDefinitionSet$checksum[i], recordKeepingFile = recordKeepingFile)
   }, error = function(e) {
       endTime <- lubridate::now()
       ParallelLogger::logError("An error occurred while generating cohortName = ", 
           cohortName, ". Error: ", e)
       if (stopIfError) {
           stop()
       }
       return(list(generationStatus = "FAILED", startTime = startTime, 
           endTime = endTime))
   }) at CohortConstruction.R#257
6: FUN(X[[i]], ...)
5: lapply(x, fun, ...)
4: ParallelLogger::clusterApply(cluster, cohortDefinitionSet$cohortId, 
       generateCohort, cohortDefinitionSet = cohortDefinitionSet, 
       connection = connection, connectionDetails = connectionDetails, 
       cdmDatabaseSchema = cdmDatabaseSchema, tempEmulationSchema = tempEmulationSchema, 
       cohortDatabaseSchema = cohortDatabaseSchema, cohortTableNames = cohortTableNames, 
       stopIfError = stopOnError, incremental = incremental, recordKeepingFile = recordKeepingFile, 
       stopOnError = stopOnError, progressBar = TRUE) at CohortConstruction.R#131
3: CohortGenerator::generateCohortSet(connection = connection, cohortDatabaseSchema = databaseDetails$cohortDatabaseSchema, 
       cohortTableNames = CohortGenerator::getCohortTableNames(cohortTable = databaseDetails$cohortTable), 
       cdmDatabaseSchema = databaseDetails$cdmDatabaseSchema, tempEmulationSchema = databaseDetails$tempEmulationSchema, 
       cohortDefinitionSet = cohortDefinitionSet) at CreateAllCohorts.R#36
2: createCohorts(databaseDetails = databaseDetails, outputFolder = outputFolder) at Main.R#116
1: EmcDementiaPredictionBase::execute(databaseDetails = databaseDetails, 
       outputFolder = paste0(outputFolder, cdmDatabaseName[i]), 
       createProtocol = createProtocol, createCohorts = createCohorts, 
       runAnalyses = runAnalyses, createValidationPackage = createValidationPackage, 
       analysesToValidate = analysesToValidate, packageResults = packageResults, 
       minCellCount = minCellCount, logSettings = logSettings, sampleSize = sampleSize)

@lhjohn
Copy link
Collaborator Author

lhjohn commented Jul 21, 2022

This actually worked now with the latest SqlRender and DatabaseConnector, and the exception above is not thrown anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant