From cc0881573e523e26e8b8700f443bb102a463fefd Mon Sep 17 00:00:00 2001 From: schuemie Date: Tue, 28 Nov 2023 10:52:37 +0100 Subject: [PATCH] Fixing conversion of Andromeda table to data frame --- R/InsertTable.R | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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) }