OHDSI / Achilles

Automated Characterization of Health Information at Large-scale Longitudinal Evidence Systems (ACHILLES) - descriptive statistics about a OMOP CDM database
https://ohdsi.github.io/Achilles/
130 stars 121 forks source link

Achilles. setting CreateTable=F causing error #436

Closed ambuj369 closed 4 years ago

ambuj369 commented 5 years ago

Expected behavior

The data in results schema should not get truncated/deleted.

Actual behavior

Error should not be there and script execution should be completed without any errors.

Steps to reproduce behavior

  1. Establish connection
  2. Run Achilles function using achilles library in R
  3. Set the parameter createTable=FALSE
  4. Execute the script
  5. Error Received. @alondhe achilles(connectionDetails, cdmDatabaseSchema = "omop_cdm", resultsDatabaseSchema ="results", vocabDatabaseSchema = "omop_cdm", numThreads = 1, sourceName = "CDM", analysisIds = 1, cdmVersion = "5.3.0", runHeel = T, runCostAnalysis = T, dropScratchTables = T, createTable = FALSE, sqlOnly = F, outputFolder = "output", verboseMode = TRUE, createIndices = T) ERROR: Error in SqlRender::render(sql = "delete from @resultsDatabaseSchema.achilles_results where analysis_id in (@analysisIds);", : object 'resultsDatabaseSchema' not found

However, it works well when I use createTable =T I am using Postgres as omop_cdm database.

alondhe commented 5 years ago

@ambuj369 -- added the missing resultsDatabaseSchema parameter, can you re-install and try again?

ambuj369 commented 4 years ago

@alondhe Thank you so much. It's working now :)