Skip to content

Commit

Permalink
Fixing conversion of Andromeda table to data frame
Browse files Browse the repository at this point in the history
  • Loading branch information
schuemie committed Nov 28, 2023
1 parent 9919fbc commit cc08815
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions R/InsertTable.R
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,13 @@ insertTable.default <- function(connection,
)
tempEmulationSchema <- oracleTempSchema
}
if (Andromeda::isAndromedaTable(data)) {
warn("Batch-wise uploading of Andromeda tables currently not supported. Loading entire table in memory.",
.frequency = "regularly",
.frequency_id = "useMppBulkLoad"
)
data <- as.data.frame(data)
}
if (camelCaseToSnakeCase) {
colnames(data) <- SqlRender::camelCaseToSnakeCase(colnames(data))
}
Expand All @@ -234,13 +241,6 @@ insertTable.default <- function(connection,
if (!is.null(databaseSchema)) {
tableName <- paste(databaseSchema, tableName, sep = ".")
}
if (Andromeda::isAndromedaTable(data)) {
warn("Batch-wise uploading of Andromeda tables currently not supported. Loading entire table in memory.",
.frequency = "regularly",
.frequency_id = "useMppBulkLoad"
)
data <- collect(data)
}
if (is.vector(data) && !is.list(data)) {
data <- data.frame(x = data)
}
Expand Down

0 comments on commit cc08815

Please sign in to comment.