Skip to content

Commit

Permalink
autocommit
Browse files Browse the repository at this point in the history
  • Loading branch information
ablack3 committed Jan 5, 2024
1 parent 0b5cba1 commit 1d7a21e
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions TestCDMConnector/cdm_from_environment.R
Original file line number Diff line number Diff line change
Expand Up @@ -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!")
Expand Down

0 comments on commit 1d7a21e

Please sign in to comment.