diff --git a/R/InsertTable.R b/R/InsertTable.R index 21fb0c7a..20b704b1 100644 --- a/R/InsertTable.R +++ b/R/InsertTable.R @@ -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)) } @@ -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) }