Hi all,
i have the following question/bug that i found while i am working with OHDSI tools.
When i run my script from the Rstudio of R CMD of achilles in which i compute the reporting tables
i observe that if the parameters in the functions of the program are hardcoded it is working as a charm(without errors).
However when they are in a form of variables
imaging the following:
#connectionDetails <- createConnectionDetails(dbms = “postgresql”,
server = “localhost@@@@/@@@@@”,
user = “@@@@@”,
password = “@@@@@@@”,
port=“5432”,pathToDriver = “/home/yannis/code/composition/”) ###this ###version works
###the following doesnt work with the exactly same parameters
connectionDetails <- createConnectionDetails(dbms = args[1],
server =args[2],
user = args[3],
password = args[4],
port=args[5],pathToDriver =args[6])
the error i get is when i run
achilles(connectionDetails = connectionDetails,
cdmDatabaseSchema = args[7],
resultsDatabaseSchema = args[8],
vocabDatabaseSchema = args[7],
sourceName = “default”,
scratchDatabaseSchema = args[9],
cdmVersion = “5.3.1”,
numThreads = 5,
runHeel = TRUE)
2021-05-13 16:27:08 Thread 1 returns error: “object of type ‘closure’ is not subsettable” when using argument(s): DROP TABLE IF EXISTS scratch.tmpach_dist_1803;
Thread 1 returns error: “object of type ‘closure’ is not subsettable” when using argument(s): DROP TABLE IF EXISTS scratch.tmpach_dist_1803;
|=========================================================================== | 97%2021-05-13 16:27:08 Thread 2 returns error: “object of type ‘closure’ is not subsettable” when using argument(s): DROP TABLE IF EXISTS scratch.tmpach_dist_1510;
Thread 2 returns error: “object of type ‘closure’ is not subsettable” when using argument(s): DROP TABLE IF EXISTS scratch.tmpach_dist_1510;
|============================================================================ | 97%2021-05-13 16:27:08 Thread 3 returns error: “object of type ‘closure’ is not subsettable” when using argument(s): DROP TABLE IF EXISTS scratch.tmpach_dist_1511;
Thread 3 returns error: “object of type ‘closure’ is not subsettable” when using argument(s): DROP TABLE IF EXISTS scratch.tmpach_dist_1511;
2021-05-13 16:27:08 Thread 1 returns error: “object of type ‘closure’ is not subsettable” when using argument(s): DROP TABLE IF EXISTS scratch.tmpach_dist_1815;
Thread 1 returns error: “object of type ‘closure’ is not subsettable” when using argument(s): DROP TABLE IF EXISTS scratch.tmpach_dist_1815;
|============================================================================ | 98%2021-05-13 16:27:08 Thread 3 returns error: “object of type ‘closure’ is not subsettable” when using argument(s): DROP TABLE IF EXISTS scratch.tmpach_dist_1817;
Thread 3 returns error: “object of type ‘closure’ is not subsettable” when using argument(s): DROP TABLE IF EXISTS scratch.tmpach_dist_1817;
2021-05-13 16:27:08 Thread 5 returns error: “object of type ‘closure’ is not subsettable” when using argument(s): DROP TABLE IF EXISTS scratch.tmpach_dist_1806;
Thread 5 returns error: “object of type ‘closure’ is not subsettable” when using argument(s): DROP TABLE IF EXISTS scratch.tmpach_dist_1806;
|============================================================================= | 98%2021-05-13 16:27:08 Thread 1 returns error: “object of type ‘closure’ is not subsettable” when using argument(s): DROP TABLE IF EXISTS scratch.tmpach_dist_2106;
Thread 1 returns error: “object of type ‘closure’ is not subsettable” when using argument(s): DROP TABLE IF EXISTS scratch.tmpach_dist_2106;
|============================================================================= | 99%2021-05-13 16:27:08 Thread 3 returns error: “object of type ‘closure’ is not subsettable” when using argument(s): DROP TABLE IF EXISTS scratch.tmpach_Drug_cost_raw;
Thread 3 returns error: “object of type ‘closure’ is not subsettable” when using argument(s): DROP TABLE IF EXISTS scratch.tmpach_Drug_cost_raw;
2021-05-13 16:27:08 Thread 5 returns error: “object of type ‘closure’ is not subsettable” when using argument(s): DROP TABLE IF EXISTS scratch.tmpach_Procedure_cost_raw;
Thread 5 returns error: “object of type ‘closure’ is not subsettable” when using argument(s): DROP TABLE IF EXISTS scratch.tmpach_Procedure_cost_raw;
2021-05-13 16:27:08 Thread 4 returns error: “object of type ‘closure’ is not subsettable” when using argument(s): DROP TABLE IF EXISTS scratch.tmpach_dist_1608;
Thread 4 returns error: “object of type ‘closure’ is not subsettable” when using argument(s): DROP TABLE IF EXISTS scratch.tmpach_dist_1608;
|==============================================================================| 100%2021-05-13 16:27:08 Thread 2 returns error: “object of type ‘closure’ is not subsettable” when using argument(s): DROP TABLE IF EXISTS scratch.tmpach_dist_1816;
Thread 2 returns error: “object of type ‘closure’ is not subsettable” when using argument(s): DROP TABLE IF EXISTS scratch.tmpach_dist_1816;
Error in ParallelLogger::clusterApply(cluster = cluster, x = dropSqls, :
Error(s) when calling function ‘fun’, see earlier messages for details
Am i doing something wrong? i am using it with postgres(13.2)
Is this a bug?
Congratulations for the great community and great sharing of information and knowledge!!!