When generating SQL for sql server, near the end of the resulting SQL file there are several lines that just read drop index OMOP.dbo.;. This is invalid SQL - it's missing the table at the end, after the final ..
The error seems to be coming from this line:
|
indexName = indices[i,]$INDEX_NAME |
Judging from a few lines below, INDEX_NAME should actually be index_name here.
Reproducible example:
library("Achilles")
library("DatabaseConnector")
dbms <- "sql server"
cdm_schema <- "OMOP.dbo"
results_schema <- "OMOP.dbo"
downloadJdbcDrivers("sql server", pathToDriver = tempdir())
connDetails <- DatabaseConnector::createConnectionDetails(
dbms = "sql server",
pathToDriver = tempdir()
)
Achilles::achilles(
cdmVersion = "5.4",
connectionDetails = connDetails,
cdmDatabaseSchema = cdm_schema,
resultsDatabaseSchema = results_schema,
outputFolder = "achilles_output",
sqlOnly = TRUE
)
When generating SQL for sql server, near the end of the resulting SQL file there are several lines that just read
drop index OMOP.dbo.;. This is invalid SQL - it's missing the table at the end, after the final..The error seems to be coming from this line:
Achilles/R/Achilles.R
Line 837 in 113433d
Judging from a few lines below,
INDEX_NAMEshould actually beindex_namehere.Reproducible example: