OHDSI Home | Forums | Wiki | Github

Achilles in R stuck at "Connecting using SQL Server driver"

Hi,

Has anyone encountered the issue whereby the Achilles call in RStudio stops at “Connecting using SQL Server driver”? Recently ran the commands below , and the process has been stuck at the connection part. It seems to have connected and inserted one table, because I can see the ACHILLES_analysis tables in the results schema, but the rest of the tables are not there yet.

> library(Achilles)
Loading required package: SqlRender
Loading required package: DatabaseConnector
Loading required package: rjson
Loading required package: OhdsiRTools
Loading required package: openxlsx
Loading required package: httr
> 
> connectionDetails <- createConnectionDetails(
+   dbms="sql server",
+   server="localhost",
+   user= "****",
+   password="****",
+   port="1433"
+ )
> 
> achilles(connectionDetails,
+          cdmDatabaseSchema = "cdm.dbo",
+          resultsDatabaseSchema = "cdm.results",
+          vocabDatabaseSchema = "cdm.dbo",
+          numThreads="10",
+          sourceName = "My Source Name",
+          cdmVersion = "5",
+          runHeel = TRUE,
+          runCostAnalysis = FALSE)

Results:

Connecting using SQL Server driver
Connecting using SQL Server driver
|================================================================================================| 100%
Executing SQL took 0.0963 secs
Dropping scratch Achilles tables from schema cdm.results
Connecting using SQL Server driver (stuck here)

Appreciate any advice on how to troubleshoot, thank you :slight_smile:

To add on, is there a way to run the Achilles analysis in SQL server management studio or other Database Manager instead of in RStudio? Thanks!

To trouble shoot - try running just one or few analysis_id.

see here

Thank you @Vojtech_Huser . I ran the codes for Achilles heel only, but encountered the following error because the achilles_results table had not yet been created

Error:
com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name 'cdm.results.achilles_results'.

Subsequently what I did was to
-> change the number of threads to 1 and added in conceptHierarchy = FALSE to the achilles statement
-> separately create concept hierarchy in using the ddl from WebAPI

And the analysis can complete now

t