From 1d7a21ece25de003833ea078b75495f44099fcc1 Mon Sep 17 00:00:00 2001 From: Adam Black Date: Fri, 5 Jan 2024 10:58:13 +0100 Subject: [PATCH] autocommit --- TestCDMConnector/cdm_from_environment.R | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/TestCDMConnector/cdm_from_environment.R b/TestCDMConnector/cdm_from_environment.R index e6d2889..1de4093 100644 --- a/TestCDMConnector/cdm_from_environment.R +++ b/TestCDMConnector/cdm_from_environment.R @@ -47,18 +47,13 @@ cdm_from_environment <- function(write_prefix = "") { "postgresql" = RPostgres::Postgres(), "redshift" = RPostgres::Redshift() ) - # con <- DBI::dbConnect(RPostgres::Postgres(), - # dbname = Sys.getenv("DBMS_NAME"), - # host = Sys.getenv("DBMS_SERVER"), - # user = Sys.getenv("DBMS_USER"), - # password = Sys.getenv("DBMS_PASSWORD")); con <- DBI::dbConnect(drv = drv, dbname = Sys.getenv("DBMS_NAME"), host = Sys.getenv("DBMS_SERVER"), user = Sys.getenv("DBMS_USER"), - password = Sys.getenv("DBMS_PASSWORD"))#, - # port = Sys.getenv("DBMS_PORT")) + password = Sys.getenv("DBMS_PASSWORD"), + port = Sys.getenv("DBMS_PORT")) if (!DBI::dbIsValid(con)) { cli::cli_abort("Database connection failed!")