if (!isTRUE(dplyr::all_equal(df1, df2))) {
msg <- paste("Write access to schema",
write_schema,
"could not be verified.")
if (is.null(add)) {
rlang::abort(msg)
} else {
add$push(msg)
}
}
names(df2) <- tolower(names(df2))
would fix this issue, passing the check.
I verified that it would work as follows:
con <- DBI::dbConnect(
DatabaseConnector::DatabaseConnectorDriver(),
dbms = "sqlite",
server = "..\\Temp\\Rtmpm8Kzj7\\file584c5526306b.sqlite")
cdm <- CDMConnector::cdmFromCon(
con = con,
writeSchema = "main",
# cohortTableNames are generated by CohortGenerator.
cohortTables = unlist(cohortTableNames))
cdm$cohort_table %>%
group_by(cohort_definition_id) %>%
tally()
failing the following check:
would fix this issue, passing the check.
I verified that it would work as follows:
Which yields:
Which is expected.