diff --git a/R/spark_read_bigquery.R b/R/spark_read_bigquery.R index 974b3a1..e5cbf60 100644 --- a/R/spark_read_bigquery.R +++ b/R/spark_read_bigquery.R @@ -97,7 +97,7 @@ spark_read_bigquery <- function(sc, ...) { parameters <- c(list(), additionalParameters) if (!is.null(serviceAccountKeyFile)) { - parameters[["credentialsFile"]] = normalizePath(serviceAccountKeyFile, winslash = "/") + parameters[["credentialsFile"]] = gsub("\\\\", "/", serviceAccountKeyFile) } if (!is.null(datasetId) && !is.null(tableId)) { diff --git a/R/spark_write_bigquery.R b/R/spark_write_bigquery.R index cc6f7c1..5c3aab7 100644 --- a/R/spark_write_bigquery.R +++ b/R/spark_write_bigquery.R @@ -80,7 +80,7 @@ spark_write_bigquery <- function(data, additionalParameters) if (!is.null(serviceAccountKeyFile)) { - parameters[["credentialsFile"]] = normalizePath(serviceAccountKeyFile, winslash = "/") + parameters[["credentialsFile"]] = gsub("\\\\", "/", serviceAccountKeyFile) } spark_write_source(data, diff --git a/tests/testthat/setup.R b/tests/testthat/setup.R index 608faf0..bf54f48 100644 --- a/tests/testthat/setup.R +++ b/tests/testthat/setup.R @@ -2,7 +2,7 @@ bigquery_defaults( billingProjectId = Sys.getenv("BILLING_PROJECT_ID"), materializationDataset = Sys.getenv("MATERIALIZATION_DATASET"), - serviceAccountKeyFile = normalizePath(Sys.getenv("GOOGLE_APPLICATION_CREDENTIALS"), winslash = "/") + serviceAccountKeyFile = Sys.getenv("GOOGLE_APPLICATION_CREDENTIALS") ) options(spark.version = Sys.getenv("SPARK_VERSION", "3.5"))