OHDSI Home | Forums | Wiki | Github

Error generating Achilles tables

I was able to generate the tables for the CDM correctly, however when I attempt to generate the Achilles tables, I get the message: Error: object ‘“INFO”’ not found

Achilles::achilles(
cdmVersion = “5.4”,
connectionDetails = cd,
cdmDatabaseSchema = “dbo”,
resultsDatabaseSchema = “dbo” )

I tried using a different database dialects, but it didn’t change anything. I searched Github and the forums but didn’t see anything that resembled this error.

Are there any suggestions?

We’ll need more of a stack trace to understand what object INFO is referring to, but I will say that your cdmDatabaseSchema should not be the same as the resultsDatabaseSchema. Make a different schema to store results, separate from your patient-level data in your CDM.

1 Like

Okay - I changed the results schema to be a different value. But got same error.

Achilles::achilles(
cdmVersion = “5.4”,
connectionDetails = cd,
cdmDatabaseSchema = “dbo”,
resultsDatabaseSchema = “results”,
sqlOnly = TRUE
)

[1] “Running Achilles in SQL ONLY mode. Using connectionDetails, sqlDialect is ignored. Please wait for script generation.”
Error: object ‘“INFO”’ not found

I wasn’t sure how to generate a stack trace, but google suggested running the command “trackback”. I ran the traceback command immediately after the error and it didn’t seem to generate anything useful, but here it is in case it helps anyone.

function (x = NULL, max.lines = getOption(“traceback.max.lines”,
getOption(“deparse.max.lines”, -1L)))
{
n ← length(x ← .traceback(x, max.lines = max.lines))
if (n == 0L)
cat(gettext(“No traceback available”), “\n”)
else {
for (i in 1L:n) {
xi ← x[[i]]
label ← paste0(n - i + 1L, “: “)
m ← length(xi)
srcloc ← if (!is.null(srcref ← attr(xi, “srcref”))) {
srcfile ← attr(srcref, “srcfile”)
paste0(” at “, basename(srcfile$filename), “#”,
srcref[1L])
}
if (isTRUE(attr(xi, “truncated”))) {
xi ← c(xi, " …”)
m ← length(xi)
}
if (!is.null(srcloc)) {
xi[m] ← paste0(xi[m], srcloc)
}
if (m > 1)
label ← c(label, rep(substr(” ", 1L,
nchar(label, type = “w”)), m - 1L))
cat(paste0(label, xi), sep = “\n”)
}
}
invisible(x)
}
<bytecode: 0x0000026296bd19b0>
<environment: namespace:base>

Hi Bruce

Your script is incomplete. It should ideally consist of two sections. The first establishes the db connection details like server location, schemas and sql dialect.

The second takes those variables and performs the actual Achilles “run”

What flavor of sql is your db running on? MsSQL, Postgres, other?

Let me know and I can provide a properly formatted script.

#load Libraries

library(SqlRender)
library(DatabaseConnector)
library(Achilles)

#Db Connection

path_to_driver ← “/home/GitHub/drivers”

connectionDetails ← createConnectionDetails(
dbms = “postgresql”,
server = “localhost/omop”,
port = “5432”
user = “postgres”,
password = “xxxx”,
pathToDriver = path_to_driver
)

#Generate OHDSI Achilles analysis
results ← achilles(
connectionDetails,
cdmDatabaseSchema = “synpuf”,
resultsDatabaseSchema = “synpuf_results”,
vocabDatabaseSchema = “synpuf”,
sourceName = “omop”,
createTable = TRUE,
smallCellCount = 5,
cdmVersion = “5.4”,
createIndices = TRUE,
numThreads = 1,
tempAchillesPrefix = “tmpach”,
dropScratchTables = TRUE,
sqlOnly = FALSE,
outputFolder = “output”,
verboseMode = TRUE,
optimizeAtlasCache = TRUE,
defaultAnalysesOnly = TRUE,
updateGivenAnalysesOnly = FALSE,
excludeAnalysisIds = FALSE,
sqlDialect = “postgresql”
)

Yes - understood. I did provide the connection details when I ran the script - I just didn’t include that in the example. I’ll take a look at the complete script that you sent and will replicate for my environment.

I forgot to mention - my database dialect is “sql server”

#load Libraries

library(SqlRender)
library(DatabaseConnector)
library(Achilles)

#Db Connection

path_to_driver ← “/GitHub/Achilles/drivers/”

connectionDetails ← createConnectionDetails(
dbms = “sql server”,
server = “ipaddress”,
user = “username”,
password = “password”,
extraSettings = “Database=name-of-db”;encrypt=false",
pathToDriver = path_to_driver
)

#Generate OHDSI Achilles analysis
results ← achilles(
connectionDetails,
cdmDatabaseSchema = “OMOP”,
resultsDatabaseSchema = “RESULTS”,
vocabDatabaseSchema = “OMOP”,
sourceName = “OMOP”,
createTable = TRUE,
smallCellCount = 5,
cdmVersion = “5.4”,
createIndices = TRUE,
numThreads = 1,
tempAchillesPrefix = “tmpach”,
dropScratchTables = TRUE,
sqlOnly = FALSE,
outputFolder = “output”,
verboseMode = TRUE,
optimizeAtlasCache = TRUE,
defaultAnalysesOnly = TRUE,
updateGivenAnalysesOnly = FALSE,
excludeAnalysisIds = FALSE,
sqlDialect = “sql server”
)

That worked perfectly. Thank you for the assistance. By the way - it looks like we are both in Wisconsin

Great to hear. I’m actually located in Pa, but the company I consult for is indeed in Madison WI.

t