OHDSI Home | Forums | Wiki | Github

Achilles Error with clusterApply

cdm

(Dramacloak) #1

I’m trying to setup Achilles for the first time and am running into the following errors with the install:

achilles(connectionDetails,

  •      cdmDatabaseSchema = "cdm", 
    
  •      resultsDatabaseSchema = "results",
    
  •      scratchDatabaseSchema = "scratch",
    
  •      vocabDatabaseSchema = "vocab",
    
  •      numThreads = 10,
    
  •      sourceName = "NMIBC", 
    
  •      cdmVersion = "5.3.0",
    
  •      runHeel = FALSE,
    
  •      runCostAnalysis = FALSE
    
  •      )
    

Connecting using PostgreSQL driver
Beginning multi-threaded execution
Connecting using PostgreSQL driver
|===============================================================================================================| 100%
Executing SQL took 0.076 secs
Dropping scratch Achilles tables from schema scratch
Connecting using PostgreSQL driver
|===============================================================================================================| 100%
|===============================================================================================================| 100%
Temporary Achilles tables removed from schema scratch
Executing multiple queries. This could take a while
|===============================================================================================================| 100%
Merging scratch Achilles tables
| |======================================================== | 50% | |===============================================================================================================| 100%Thread 2 returns error: “Error executing SQL:norg.postgresql.util.PSQLException: ERROR: relation “scratch.tmpach_dist_103” does not existn Position: 1661nAn error report has been created at F:/GitHub OHDSI/Achilles-master/errorReport.txt” when using argument(s): n DROP TABLE IF EXISTS results.achilles_results_dist;nn–HINT DISTRIBUTE_ON_KEY(analysis_id)nCREATE TABLE results.achilles_results_distnnnASnWITH cte_mergedn AS (n select cast(analysis_id as int) as analysis_id, cast(stratum_1 as varchar(255)) as stratum_1, cast(stratum_2 as varchar(255)) as stratum_2, cast(stratum_3 as varchar(255)) as stratum_3, cast(stratum_4 as varchar(255)) as stratum_4, cast(stratum_5 as varchar(255)) as stratum_5, cast(count_value as bigint) as count_value, cast(min_value as NUMERIC) as min_value, cast(max_value as NUMERIC) as max_value, cast(avg_value as NUMERIC) as avg_value, cast(stdev_value as NUMERIC) as stdev_value, cast(median_value as NUMERIC) as median_value, cast(p10_value as NUMERIC) as p10_value, cast(p25_value as NUMERIC) as p25_value, cast(p75_value as NUMERIC) as p75_value, cast(p90_value as NUMERIC) as p90_value from n scratch.tmpach_dist_0 nunion alln select cast(analysis_id as int) as analysis_id, cast(stratum_1 as varchar(255)) as stratum_1, cast(stratum_2 as varchar(255)) as stratum_2, cast(stratum_3 as varchar(255)) as stratum_3, cast(stratum_4 as varchar(255)) as stratum_4, cast(stratum_5 as varchar(255)) as stratum_5, cast(count_value as bigint) as count_value, cast(min_value as NUMERIC) as min_value, cast(max_value as NUMERIC) as max_value, cast(avg_value as NUMERIC) as avg_value, cast(stdev_value as NUMERIC) as stdev_value, cast(median_value as NUMERIC) as median_value, cast(p10_value as NUMERIC) as p10_value, cast(p25_value as NUMERIC) as p25_value, cast(p75_value as NUMERIC) as p75_value, cast(p90_value as NUMERIC) as p90_value from n scratch.tmpach_dist_103 nunion alln select cast(analysis_id as int) as analysis_id, cast(stratum_1 as varchar(255)) as stratum_1, cast(stratum_2 as varchar(255)) as stratum_2, cast(stratum_3 as varchar(255)) as stratum_3, cast(stratum_4 as varchar(255)) as stratum_4, cast(stratum_5 as varchar(255)) as stratum_5, cast(count_value as bigint) as count_value, cast(min_value as NUMERIC) as min_value, cast(max_value as NUMERIC) as max_value, cast(avg_value as NUMERIC) as avg_value, cast(stdev_value as NUMERIC) as stdev_value, cast(median_value as NUMERIC) as median_value, cast(p10_value as NUMERIC) as p10_value, cast(p25_value as NUMERIC) as p25_value, cast(p75_value as NUMERIC) as p75_value, cast(p90_value as NUMERIC) as p90_value from n scratch.tmpach_dist_104 nunion alln select cast(analysis_id as int) as analysis_id, cast(stratum_1 as varchar(255)) as stratum_1, cast(stratum_2 as varchar(255)) as stratum_2, cast(stratum_3 as varchar(255)) as stratum_3, cast(stratum_4 as varchar(255)) as stratum_4, cast(stratum_5 as varchar(255)) as stratum_5, cast(count_value as bigint) as count_value, cast(min_value as NUMERIC) as min_value, cast(max_value as NUMERIC) as max_value, cast(avg_value as NUMERIC) as avg_value, cast(stdev_value as NUMERIC) as stdev_value, cast(median_value as NUMERIC) as median_value, cast(p10_value as NUMERIC) as p10_value, cast(p25_value as NUMERIC) as p25_value, cast(p75_value as NUMERIC) as p75_value, cast(p90_value as NUMERIC) as p90_value from n scratch.tmpach_dist_105 nunion alln select cast(analysis_id as int) as analysis_id, cast(stratum_1 as varchar(255)) as stratum_1, cast(stratum_2 as varchar(255)) as stratum_2, cast(stratum_3 as varchar(255)) as stratum_3, cast(stratum_4 as varchar(255)) as stratum_4, cast(stratum_5 as varchar(255)) as stratum_5, cast(count_value as bigint) as count_value, cast(min_value as NUMERIC) as min_value, cast(max_value as NUMERIC) as max_value, cast(avg_value as NUMERIC) as avg_value, cast(stdev_value as NUMERIC) as stdev_value, cast(median_value as NUMERIC) as median_value, cast(p10_value as NUMERIC) as p10_value, cast(p25_value as NUMERIC) as p25_value, cast(p75_value as NUMERIC) as p75_value, cast(p90_value as NUMERIC) as p90_value from n scratch.tmpach_dist_106 nunion alln select cast(analysis_id as int) as analysis_id, cast(stratum_1 as varchar(255)) as stratum_1, cast(stratum_2 as varchar(255)) as stratum_2, cast(stratum_3 as varchar(255)) as stratum_3, cast(stratum_4 as varchar(255)) as stratum_4, cast(stratum_5 as varchar(255)) as stratum_5, cast(count_value as bigint) as count_value, cast(min_value as NUMERIC) as min_value, cast(max_value as NUMERIC) as max_value, cast(avg_value as NUMERIC) as avg_value, cast(stdev_value as NUMERIC) as stdev_value, cast(median_value as NUMERIC) as median_value, cast(p10_value as NUMERIC) as p10_value, cast(p25_value as NUMERIC) as p25_value, cast(p75_value as NUMERIC) as p75_value, cast(p90_value as NUMERIC) as p90_value from n scratch.tmpach_dist_107 nunion alln select cast(analysis_id as int) as analysis_id, cast(stratum_1 as varchar(255)) as stratum_1, cast(stratum_2 as varchar(255)) as stratum_2, cast(stratum_3 as varchar(255)) as stratum_3, cast(stratum_4 as varchar(255)) as stratum_4, cast(stratum_5 as varchar(255)) as stratum_5, cast(count_value as bigint) as count_value, cast(min_value as NUMERIC) as min_value, cast(max_value as NUMERIC) as max_value, cast(avg_value as NUMERIC) as avg_value, cast(stdev_value as NUMERIC) as stdev_value, cast(median_value as NUMERIC) as median_value, cast(p10_value as NUMERIC) as p10_value, cast(p25_value as NUMERIC) as p25_value, cast(p75_value as NUMERIC) as p75_value, cast(p90_value as NUMERIC) as p90_value from n scratch.tmpach_dist_203 nunion alln select cast(analysis_id as int) as analysis_id, cast(stratum_1 as varchar(255)) as stratum_1, cast(stratum_2 as varchar(255)) as stratum_2, cast(stratum_3 as varchar(255)) as stratum_3, cast(stratum_4 as varchar(255)) as stratum_4, cast(stratum_5 as varchar(255)) as stratum_5, cast(count_value as bigint) as count_value, cast(min_value as NUMERIC) as min_value, cast(max_value as NUMERIC) as max_value, cast(avg_value as NUMERIC) as avg_value, cast(stdev_value as NUMERIC) as stdev_value, cast(median_value as NUMERIC) as median_value, cast(p10_value as NUMERIC) as p10_value, cast(p25_value as NUMERIC) as p25_value, cast(p75_value as NUMERIC) as p75_value, cast(p90_value as NUMERIC) as p90_value from n scratch.tmpach_dist_206 nunion alln select cast(analysis_id as int) as analysis_id, cast(stratum_1 as varchar(255)) as stratum_1, cast(stratum_2 as varchar(255)) as stratum_2, cast(stratum_3 as varchar(255)) as stratum_3, cast(stratum_4 as varchar(255)) as stratum_4, cast(stratum_5 as varchar(255)) as stratum_5, cast(count_value as bigint) as count_value, cast(min_value as NUMERIC) as min_value, cast(max_value as NUMERIC) as max_value, cast(avg_value as NUMERIC) as avg_value, cast(stdev_value as NUMERIC) as stdev_value, cast(median_value as NUMERIC) as median_value, cast(p10_value as NUMERIC) as p10_value, cast(p25_value as NUMERIC) as p25_value, cast(p75_value as NUMERIC) as p75_value, cast(p90_value as NUMERIC) as p90_value from n scratch.tmpach_dist_211 nunion alln select cast(analysis_id as int) as analysis_id, cast(stratum_1 as varchar(255)) as stratum_1, cast(stratum_2 as varchar(255)) as stratum_2, cast(stratum_3 as varchar(255)) as stratum_3, cast(stratum_4 as varchar(255)) as stratum_4, cast(stratum_5 as varchar(255)) as stratum_5, cast(count_value as bigint) as count_value, cast(min_value as NUMERIC) as min_value, cast(max_value as NUMERIC) as max_value, cast(avg_value as NUMERIC) as avg_value, cast(stdev_value as NUMERIC) as stdev_value, cast(median_value as NUMERIC) as median_value, cast(p10_value as NUMERIC) as p10_value, cast(p25_value as NUMERIC) as p25_valu
Error in OhdsiRTools::clusterApply(cluster = cluster, x = mergeSqls, function(sql) { :
Error(s) when calling function ‘fun’, see earlier messages for details


(Dramacloak) #2

This issue was caused by some misspelled variables in the tables I created. Fixed this issue by verifying names matched specs.


t