From c55a79341e80cb50422f5b5362ce27d8268d92b5 Mon Sep 17 00:00:00 2001 From: schuemie Date: Thu, 11 Apr 2024 17:34:20 +0200 Subject: [PATCH 01/26] Adding description on how to connect using Kerberos --- tests/testthat/testthat-problems.rds | Bin 4791 -> 0 bytes vignettes/Connecting.Rmd | 42 +++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) delete mode 100644 tests/testthat/testthat-problems.rds diff --git a/tests/testthat/testthat-problems.rds b/tests/testthat/testthat-problems.rds deleted file mode 100644 index 4ff38fdcbcc0aea620a341c54957351391ab4a85..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4791 zcmW+&d0bN4_pM*0nOP30nW>rcoMlp(QiwTE%U6EN7u!_C!rh%{isiax5Os zL&AFr4q47VH3tl5Lq0zGvUF_u6Z%d(=|)@A}`fXU#A4q2EHZRa>iX zZD6kt_pboF{H>nG^~N}PiuWaQPC##G-@(f@5$O!0>YLG#_vhTogR})FiZ;rhz52^u zJwzg3qA29VfK!2s|tS4=9}$__$@}{-}e%3A2maB zYG#%$GI!dkYYg8UrqA=abMECAt}k>$dA>B^nuk)2e5h>7xlxz)S!UO!W$fI(rn=ch z$&HgUR#{frxbC2-q_XBQ%IOK%H_K@K;xzeM)43nnP7#e-bHS6XNa0OFiJ?V)WO(`9 z3lH-%rgMu|C+6Wq>3(^^DN8BwsVME7@Zm?45J--bvvbRNNY=xqu15Ajw$v8taodjA z`;63~is-v%ksmTT_%S|0T6Nl0nI}9yq<(h9LSVxjAb>HPKel@!sU2I*+v0yMYG&u=IT@1#INrYe^aFpn`l|4- z3up6Fmii)KpIwr&Pw3bFO!nk4D*e7>i*Rr3ao<&Pc0r21YC4r~AHUn-nMNz9yl1=^ zsFeFIES%t>?Zr1B8Aqi1H=kYP={ViKFxN9b)3YM@$q;eN3fJ$Qu}7kbjmAUxRed@t zwZ}E0(@cY!56!ol56b*h{~#ua%C4-3=yb~IOszyQ#10JjSA5>3b+8aSGqoXG+8r1C zg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}01$l^fJ9r^O(H?L?|KlfnI z(UQ-+GB&tr_i8}3@|?#C&3l)L)%jQxmd}U3qkZ4p9@Q4h`Ohu#S1sJfn$AA>_7r+I zPReYx653lKvbPIY8HL)dl(=_bk1@?EA{!0Fmxu=K&k2j>^nWJTzV0(tnLd(pSG8~c zK-=3+izWSg`+kw}Cwe;{DOf}-k6$r=are~a66KwaPkJ*-O&gePPmdS=M zO;+DG4IZw;&Fz_-nVh5qrezgRM?{BP%3kRBB;amIePh|p`n8@{qfSh>E(XO_e;-_q7%r9O~oEw8+wVx^!6h9+a8DvAcHXc9k@U4%WREeAHj{J4zWtSmw)~6yq*gpUsrKHarM8BoamS_Ro7sh zls5R|ovnZJM)OK9gmHtVwi4kNrR+Z%YC@g|Q(A{B8M+?$K^Uf!+daP2~qO`9<8Dqci*L1Umq;?_(bHw#G0K&J>GM*J=jRJ%tzwKKRHEBo`-?}uU#J-l z^_q=&zgI0DZhTC+EKFc}PAqqd@<2qIo$WE=GYl K*52B+>;D0k&OAo| diff --git a/vignettes/Connecting.Rmd b/vignettes/Connecting.Rmd index 9c9c820d..d12e4697 100644 --- a/vignettes/Connecting.Rmd +++ b/vignettes/Connecting.Rmd @@ -170,3 +170,45 @@ querySql(conn, "SELECT COUNT(*) FROM main.cars;") disconnect(conn) ``` + +# Connecting with Windows authentication from a non-windows machine + +Kerberos is used by Active Directory, you need to have the appropriate packages installed on your client machine. For MacOS, the Kerberos packages are usually already installed. On Linux, you’ll have to install `krb5-user`. Most of this setup comes from [this site](https://github.com/Microsoft/vscode-mssql/wiki/How-to-enable-Integrated-Authentication-on-macOS-and-Linux-using-Kerberos). + +1. On the non-windows client machine, create or update `/etc/krb5.conf` so that it points to your AD server. Here’s an example of `krb5.conf`: + + ``` + [libdefaults] + default_realm = DOMAIN.COMPANY.COM + + [realms] + DOMAIN.COMPANY.COM = { + kdc = dc-33.domain.company.com + } + ``` + +2. Run `kinit @DOMAIN.COMPANY.COM` to get a ticket granting ticket from the kerberos domain controller (KDC). (NOTE: you want to make sure your KDC is accessible from your machine) + +3. Download the latest [MSSql JDBC driver](https://docs.microsoft.com/en-us/sql/connect/jdbc/download-microsoft-jdbc-driver-for-sql-server?view=sql-server-ver15). + +4. Try to connect to the database with the following code in RStudio: + + ```{r eval=FALSE} + library(devtools) + library(DatabaseConnector) + connectionDetails <- createConnectionDetails( + dbms="sql server", + ... + extraSettings="authenticationScheme=JavaKerberos") + c <- connect(connectionDetails = connectionDetails) + ``` + In RStudio, you should see that the variable c has a value and the new connection in the connections tab as well. + +Note: If you are getting the below error on Mac: + +> Error in rJava::.jcall(jdbcDriver, "Ljava/sql/Connection;", "connect", : com.microsoft.sqlserver.jdbc.SQLServerException: Kerberos Login failed: Integrated authentication failed. ClientConnectionId:13fb0d4e-4822-4de2-a125-8408334cb3ed due to javax.security.auth.login.LoginException (Cannot get any of properties: [user, USER] from con properties not available to garner authentication information from the user) + +Instead of kinit you can also try `/System/Library/CoreServices` and find 'Ticket Viewer' +Click 'Add Identity', then enter your user name. +After you click 'Continue', a Kerberos ticket should have been generated. + From b0e658c2d1f84a14852c529e76ba1da6b8023a7e Mon Sep 17 00:00:00 2001 From: schuemie Date: Wed, 29 May 2024 05:55:16 +0200 Subject: [PATCH 02/26] Add CODECOV token to GA --- .github/workflows/R_CMD_check_Hades.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/R_CMD_check_Hades.yaml b/.github/workflows/R_CMD_check_Hades.yaml index 79cf8773..550e187c 100644 --- a/.github/workflows/R_CMD_check_Hades.yaml +++ b/.github/workflows/R_CMD_check_Hades.yaml @@ -26,6 +26,7 @@ jobs: env: GITHUB_PAT: ${{ secrets.GH_TOKEN }} + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} R_REMOTES_NO_ERRORS_FROM_WARNINGS: true RSPM: ${{ matrix.config.rspm }} CDM5_ORACLE_CDM54_SCHEMA: ${{ secrets.CDM5_ORACLE_CDM54_SCHEMA }} From ab18901b65729e0c5b5f2cf77bb062ca04a8fabe Mon Sep 17 00:00:00 2001 From: schuemie Date: Thu, 13 Jun 2024 07:17:59 +0200 Subject: [PATCH 03/26] Fixed discrepancies when server and client are not in same time zone. Fixes #274 --- DESCRIPTION | 6 +++--- NEWS.md | 7 +++++++ inst/csv/jarChecksum.txt | 2 +- inst/java/DatabaseConnector.jar | Bin 21234 -> 21312 bytes .../ohdsi/databaseConnector/BatchedQuery.java | 2 ++ 5 files changed, 13 insertions(+), 4 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 8c6076bd..7e4ec2d9 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: DatabaseConnector Type: Package Title: Connecting to Various Database Platforms -Version: 6.3.2 -Date: 2023-12-11 +Version: 6.3.3 +Date: 2024-06-13 Authors@R: c( person("Martijn", "Schuemie", email = "schuemie@ohdsi.org", role = c("aut", "cre")), person("Marc", "Suchard", role = c("aut")), @@ -54,6 +54,6 @@ VignetteBuilder: knitr URL: https://ohdsi.github.io/DatabaseConnector/, https://github.com/OHDSI/DatabaseConnector BugReports: https://github.com/OHDSI/DatabaseConnector/issues Copyright: See file COPYRIGHTS -RoxygenNote: 7.2.3 +RoxygenNote: 7.3.1 Roxygen: list(markdown = TRUE) Encoding: UTF-8 diff --git a/NEWS.md b/NEWS.md index d8eb756b..6c081731 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,10 @@ +DatabaseConnector 6.3.3 +======================= + +Bugfixes: + +1. Fixed discrepancies when server and client are not in same time zone. + DatabaseConnector 6.3.2 ======================= diff --git a/inst/csv/jarChecksum.txt b/inst/csv/jarChecksum.txt index 4c5b07f7..4cccbe66 100644 --- a/inst/csv/jarChecksum.txt +++ b/inst/csv/jarChecksum.txt @@ -1 +1 @@ -41e7d71b717d9b51cbeca5dd10f85cd9a882163f595ce52cb56048f08ff0aef1 +f96662b46ab05f19de3ef3880f599b829f6920dc44bb37f2c161739c63e6196b diff --git a/inst/java/DatabaseConnector.j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^SIi~vXyzQYzK1{p1=6J7q% zwUm%Q{B12mgF$uH`4b6#0|h1g@7DwB6(0PJnjMTtg~s@wlz)OQW}9zv{se5lg@WS# zPtYLZpCDc^t@1zF_eBUN`2KLBf`@`){SR;q1w6&g{y!Rj`_%reFEalJXoC4CBT0NZ zCKy2hne;E^@3({;0e>jVz(7HX{s+4Xj#u~q_7p?|C-LL`UlJ}^*qcoVP*4?r^h@^t z;3ug6 Date: Thu, 13 Jun 2024 02:32:06 -0400 Subject: [PATCH 04/26] Regenerating jar with correct Java version to avoid NoSuchMethodError --- inst/csv/jarChecksum.txt | 2 +- inst/java/DatabaseConnector.jar | Bin 21312 -> 21321 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/inst/csv/jarChecksum.txt b/inst/csv/jarChecksum.txt index 4cccbe66..41222a3b 100644 --- a/inst/csv/jarChecksum.txt +++ b/inst/csv/jarChecksum.txt @@ -1 +1 @@ -f96662b46ab05f19de3ef3880f599b829f6920dc44bb37f2c161739c63e6196b +c820514eb79eae56af2614eafe15d2306631218ac8738a286e4e2c878d3156de diff --git a/inst/java/DatabaseConnector.jar b/inst/java/DatabaseConnector.jar index b9481164ebaf1fb70f0968a2d955ec865752a6b5..38f5bb51ba7f197c4c4817a309bf17b1e7091c69 100644 GIT binary patch delta 10399 zcmZX41yCJJw>1O^4#DBz?(Ux8?(PJ4w;&S&!QBsVLLj)i2ZFo1yIXLFKlgs`|K7dz zrh2M+de+*tdUx-tu2uajA9^4k8bw7O1{NC%0RaK30V^KG7$yg6B+*owxkiP>5#g_o zngOaF=)XJhG;d)3?sV`Z!M@4CigyqL5dAb}nqGmL6?0caa%6d2T;z0xH_&iNl2nBF zGH#jE)NIm7ze!UW>?=7LVd2fbyLFErJgNVLtI_H)NwU%=OASS2l zz9;6FLRFm8eYQ7M&bh6Vq{yY5da3RN@gpFEFQt*sgikx&4~PG>m%B*H ziYS>yGKwjMMKa2}2(uu-4@ydrj3V*SK6Q4RBisiHY@3)E@_zT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=WitKwV4FC? zI#8dduB2E(tKL2l^cI5n`VH~b zc^1(iiak%gobOrK+(*Q3iFXNQ{yyvkF`;p;=7Ku&q#`KTN~gPqWlIP5jC(7*C&^in zs3_P@5vb1rkyp7EUbx}DT`~lVS;52+jp4RaTKMpWh=nLB)(ZrZs|ct+!OI;{(1@(W zXFAAE+UdH&)!kG@+uM1l3g6Z<69l`a$4Gz@7@sfTCO42h6quEo=7*8_tY z_?x?(Q{U2kFDEN%HW@>qw2_k~EyhWFB^%$tJ;&G9#ozTtMfAaHJdt7t zlbr65{QSP>X@u#)E$pa+Ml)srjJ}BH-MDE=SQFYrXjB>8EH57`DEUK=pr|vE3#ACd z9f2niI5uNk=`63kTBvu2MeL)JgsG|8_n$^YlNZ0uSPd8R3(e{}#`ecVtd+sMV1zbU zVKZ@lsp)7FswQHu+&KB*tBW?*@un;ADMuM$j!>w;`p)0P2cN>SwLJ<=+lCh)1f&$cP2FVB$)Ym5lqR3-eUiooxcNnl!O{$dKSzB1dtDEco7ru#n#2fV6`{cl(~>TVj=zw5gC z`*8hN*l@;w!;+~||LgCkLIOj;{4Z)yVffc~CwbCG0tpK02m=a=^}l@a+5Rz%S0?+{ z_404(THb$MS-!mg7nOV=fsq&bi`c;av;<%@71Vz*>E9$GB7ZSA*g@rg_r22MSX1-& o&@BHZ`tKy_(*K4GP$i@I=S}&~6DInv)tG__)L0O#l>UML12NT(^Z)<= From c1eaf11a103872fee4da9c76a0a001384872691b Mon Sep 17 00:00:00 2001 From: schuemie Date: Thu, 13 Jun 2024 11:09:43 +0200 Subject: [PATCH 05/26] Skipping DuckDB unit test for now --- tests/testthat/dbplyrTestFunction.R | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/tests/testthat/dbplyrTestFunction.R b/tests/testthat/dbplyrTestFunction.R index e97debdc..9ef5218a 100644 --- a/tests/testthat/dbplyrTestFunction.R +++ b/tests/testthat/dbplyrTestFunction.R @@ -136,13 +136,16 @@ testDbplyrFunctions <- function(connectionDetails, cdmDatabaseSchema) { collect() expect_gt(personTwice$n, 1) - tripleJoin <- person %>% - left_join(observationPeriod, by = join_by(person_id)) %>% - left_join(observationPeriod %>% - select(person_id, dummy = observation_period_start_date), + if (dbms(connection) != "duckdb") { + # Skipping on DuckDB until DatabaseConnector 7. See #271 + tripleJoin <- person %>% + left_join(observationPeriod, by = join_by(person_id)) %>% + left_join(observationPeriod %>% + select(person_id, dummy = observation_period_start_date), by = join_by(person_id)) %>% - collect() - expect_gt(nrow(tripleJoin), 0) + collect() + expect_gt(nrow(tripleJoin), 0) + } # Test row_number ------------------------------------------------------------ top10PersonsHardWay <- person %>% From e2d0aa9716a487b6f683db1c46d23ce5f146dbc3 Mon Sep 17 00:00:00 2001 From: schuemie Date: Fri, 14 Jun 2024 05:10:16 +0200 Subject: [PATCH 06/26] Forcing Java 8 in Github Actions --- .github/workflows/R_CMD_check_Hades.yaml | 6 ++++++ .github/workflows/R_CMD_check_main_weekly.yaml | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/.github/workflows/R_CMD_check_Hades.yaml b/.github/workflows/R_CMD_check_Hades.yaml index 550e187c..0f1b3b65 100644 --- a/.github/workflows/R_CMD_check_Hades.yaml +++ b/.github/workflows/R_CMD_check_Hades.yaml @@ -66,6 +66,12 @@ jobs: steps: - uses: actions/checkout@v3 + + - name: Setup Java + uses: actions/setup-java@v4 + with: + distribution: 'corretto' + java-version: '8' - uses: r-lib/actions/setup-r@v2 with: diff --git a/.github/workflows/R_CMD_check_main_weekly.yaml b/.github/workflows/R_CMD_check_main_weekly.yaml index 4c5e0751..a3fdd3a2 100644 --- a/.github/workflows/R_CMD_check_main_weekly.yaml +++ b/.github/workflows/R_CMD_check_main_weekly.yaml @@ -53,6 +53,12 @@ jobs: steps: - uses: actions/checkout@v3 + + - name: Setup Java + uses: actions/setup-java@v4 + with: + distribution: 'corretto' + java-version: '8' - uses: r-lib/actions/setup-r@v2 with: From 2840838409e68901ccb2e9408d8168bae982752e Mon Sep 17 00:00:00 2001 From: schuemie Date: Fri, 14 Jun 2024 05:25:45 +0200 Subject: [PATCH 07/26] Skipping triple join unit test on all platforms. Calling Java reconfig in GA --- .github/workflows/R_CMD_check_Hades.yaml | 3 +++ tests/testthat/dbplyrTestFunction.R | 18 ++++++++---------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/R_CMD_check_Hades.yaml b/.github/workflows/R_CMD_check_Hades.yaml index 0f1b3b65..1e2511b0 100644 --- a/.github/workflows/R_CMD_check_Hades.yaml +++ b/.github/workflows/R_CMD_check_Hades.yaml @@ -76,6 +76,9 @@ jobs: - uses: r-lib/actions/setup-r@v2 with: r-version: ${{ matrix.config.r }} + + - name: Configure R with Java + run: R CMD javareconf - uses: r-lib/actions/setup-tinytex@v2 diff --git a/tests/testthat/dbplyrTestFunction.R b/tests/testthat/dbplyrTestFunction.R index 9ef5218a..53db409d 100644 --- a/tests/testthat/dbplyrTestFunction.R +++ b/tests/testthat/dbplyrTestFunction.R @@ -136,16 +136,14 @@ testDbplyrFunctions <- function(connectionDetails, cdmDatabaseSchema) { collect() expect_gt(personTwice$n, 1) - if (dbms(connection) != "duckdb") { - # Skipping on DuckDB until DatabaseConnector 7. See #271 - tripleJoin <- person %>% - left_join(observationPeriod, by = join_by(person_id)) %>% - left_join(observationPeriod %>% - select(person_id, dummy = observation_period_start_date), - by = join_by(person_id)) %>% - collect() - expect_gt(nrow(tripleJoin), 0) - } + # Skipping until DatabaseConnector 7 or a new dbplyr version. See #271 + # tripleJoin <- person %>% + # left_join(observationPeriod, by = join_by(person_id)) %>% + # left_join(observationPeriod %>% + # select(person_id, dummy = observation_period_start_date), + # by = join_by(person_id)) %>% + # collect() + # expect_gt(nrow(tripleJoin), 0) # Test row_number ------------------------------------------------------------ top10PersonsHardWay <- person %>% From 776a0a96d5850642d442440be9a65edd554b6062 Mon Sep 17 00:00:00 2001 From: schuemie Date: Fri, 14 Jun 2024 05:32:54 +0200 Subject: [PATCH 08/26] Restricting Java reconfig to Linux, and using sudo --- .github/workflows/R_CMD_check_Hades.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/R_CMD_check_Hades.yaml b/.github/workflows/R_CMD_check_Hades.yaml index 1e2511b0..9290caf4 100644 --- a/.github/workflows/R_CMD_check_Hades.yaml +++ b/.github/workflows/R_CMD_check_Hades.yaml @@ -78,7 +78,8 @@ jobs: r-version: ${{ matrix.config.r }} - name: Configure R with Java - run: R CMD javareconf + if: runner.os == 'Linux' + run: sudo R CMD javareconf - uses: r-lib/actions/setup-tinytex@v2 From 900da31993239b49d59093f84f36b5b5ef57e921 Mon Sep 17 00:00:00 2001 From: schuemie Date: Fri, 14 Jun 2024 05:42:09 +0200 Subject: [PATCH 09/26] Dropping Java reconfig. Disabling specific Java install on Linux --- .github/workflows/R_CMD_check_Hades.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/R_CMD_check_Hades.yaml b/.github/workflows/R_CMD_check_Hades.yaml index 9290caf4..7942261c 100644 --- a/.github/workflows/R_CMD_check_Hades.yaml +++ b/.github/workflows/R_CMD_check_Hades.yaml @@ -68,6 +68,7 @@ jobs: - uses: actions/checkout@v3 - name: Setup Java + if: runner.os != 'Linux' uses: actions/setup-java@v4 with: distribution: 'corretto' @@ -76,10 +77,6 @@ jobs: - uses: r-lib/actions/setup-r@v2 with: r-version: ${{ matrix.config.r }} - - - name: Configure R with Java - if: runner.os == 'Linux' - run: sudo R CMD javareconf - uses: r-lib/actions/setup-tinytex@v2 From 7405b49d82519d8c81f30660081f4da798f1de6d Mon Sep 17 00:00:00 2001 From: schuemie Date: Mon, 17 Jun 2024 11:34:22 +0200 Subject: [PATCH 10/26] Communicating dates as strings between Java and R (bad idea, but wanted to save this code) --- R/Sql.R | 16 ++++++++-------- inst/csv/jarChecksum.txt | 2 +- inst/java/DatabaseConnector.jar | Bin 21321 -> 21350 bytes .../databaseConnector/BatchedInsert.java | 10 +++++----- .../ohdsi/databaseConnector/BatchedQuery.java | 14 ++++++++------ tests/testthat/test-insertTable.R | 12 +++++++++++- 6 files changed, 33 insertions(+), 21 deletions(-) diff --git a/R/Sql.R b/R/Sql.R index 7453de77..ad534b72 100644 --- a/R/Sql.R +++ b/R/Sql.R @@ -118,15 +118,15 @@ parseJdbcColumnData <- function(batchedQuery, column <- format(column, "%Y-%m-%d") } } else if (columnTypes[i] == 4) { - column <- rJava::.jcall(batchedQuery, "[D", "getNumeric", as.integer(i)) - column <- as.POSIXct(column, origin = "1970-01-01") - } else { - column <- rJava::.jcall(batchedQuery, "[Ljava/lang/String;", "getString", i) - if (!datesAsString) { - if (columnTypes[i] == 4) { - column <- as.POSIXct(column) - } + column <- rJava::.jcall(batchedQuery, "[Ljava/lang/String;", "getString", as.integer(i)) + if (length(column) == 0) { + timeZone <- "" + } else { + timeZone <- substr(column, 21, 999)[1] } + column <- as.POSIXct(substr(column, 1, 19), format = "%Y-%m-%d %H:%M:%OS", tz = timeZone) + } else { + column <- rJava::.jcall(batchedQuery, "[Ljava/lang/String;", "getString", as.integer(i)) } columns[[i]] <- column } diff --git a/inst/csv/jarChecksum.txt b/inst/csv/jarChecksum.txt index 41222a3b..8d96c42a 100644 --- a/inst/csv/jarChecksum.txt +++ b/inst/csv/jarChecksum.txt @@ -1 +1 @@ -c820514eb79eae56af2614eafe15d2306631218ac8738a286e4e2c878d3156de +ec60fa18e389072c979178a05dbccd921c739adf5e2a94bef5a843017f7d8631 diff --git a/inst/java/DatabaseConnector.jar b/inst/java/DatabaseConnector.jar index 38f5bb51ba7f197c4c4817a309bf17b1e7091c69..85949fd69debca1975550e6196b760689d448c61 100644 GIT binary patch delta 10290 zcmZXa1yEc~_vQ(j;I6?L+y=J*!QGtz!QCM^6C4I-Z~_VL?i$=Bxa;8VF8{pmZtZ^G z?ybI6eV=>k>2ptYS9Sev4;8%IEqI5fA`b_T3-kW{dl(hRUHa&NC^--EQIL%%d7%W)ws zfBQx>+3wfIX2her_dM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gygxu?mf3^f7oW}ub7jk#g<$;~9(aa^#8IWU@E*Z91jF5)C87N>Uun2;p)+mB8y zKs}IgavqK`LH~&+E7OU}{6aq3i)r`9YP5KB-iIRB=5nqvRBmi%cf3KeLX@hY%dac` z70o2bR2ICHCK?-K)d-ySGa0!$6`pA~fOa*(uq z%Mg!;78>0t>X=}zDeqxP#k2W7bHazxdF{uOZ3ZBF^cZ!TKIj1cwbr6vO?qEoF%kQnHN`F7eDGdcdKQ#I-jk>Rw+Y@mILnw7V*^L+O+ub{bzkc zJCV$;>Fb3(UbA^9Zj##e8M~(0vwvp%i;#wCCo~ikIov;B4jKj<>i>?PfwPn){vIxi zS0e;JE0ckT)rkK-8>R<7XYY=D9pLi8u zp`axGCFZ35^LbKmnK(Ll@I4;5_ Date: Mon, 17 Jun 2024 05:49:47 -0400 Subject: [PATCH 11/26] Reverting datetime behavior --- NEWS.md | 3 --- R/Sql.R | 16 ++++++++-------- inst/csv/jarChecksum.txt | 2 +- inst/java/DatabaseConnector.jar | Bin 21350 -> 21234 bytes .../databaseConnector/BatchedInsert.java | 10 +++++----- .../ohdsi/databaseConnector/BatchedQuery.java | 12 ++++-------- tests/testthat/test-insertTable.R | 12 +----------- 7 files changed, 19 insertions(+), 36 deletions(-) diff --git a/NEWS.md b/NEWS.md index 6c081731..f8b407db 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,9 +1,6 @@ DatabaseConnector 6.3.3 ======================= -Bugfixes: - -1. Fixed discrepancies when server and client are not in same time zone. DatabaseConnector 6.3.2 ======================= diff --git a/R/Sql.R b/R/Sql.R index ad534b72..7453de77 100644 --- a/R/Sql.R +++ b/R/Sql.R @@ -118,15 +118,15 @@ parseJdbcColumnData <- function(batchedQuery, column <- format(column, "%Y-%m-%d") } } else if (columnTypes[i] == 4) { - column <- rJava::.jcall(batchedQuery, "[Ljava/lang/String;", "getString", as.integer(i)) - if (length(column) == 0) { - timeZone <- "" - } else { - timeZone <- substr(column, 21, 999)[1] - } - column <- as.POSIXct(substr(column, 1, 19), format = "%Y-%m-%d %H:%M:%OS", tz = timeZone) + column <- rJava::.jcall(batchedQuery, "[D", "getNumeric", as.integer(i)) + column <- as.POSIXct(column, origin = "1970-01-01") } else { - column <- rJava::.jcall(batchedQuery, "[Ljava/lang/String;", "getString", as.integer(i)) + column <- rJava::.jcall(batchedQuery, "[Ljava/lang/String;", "getString", i) + if (!datesAsString) { + if (columnTypes[i] == 4) { + column <- as.POSIXct(column) + } + } } columns[[i]] <- column } diff --git a/inst/csv/jarChecksum.txt b/inst/csv/jarChecksum.txt index 8d96c42a..4c5b07f7 100644 --- a/inst/csv/jarChecksum.txt +++ b/inst/csv/jarChecksum.txt @@ -1 +1 @@ -ec60fa18e389072c979178a05dbccd921c739adf5e2a94bef5a843017f7d8631 +41e7d71b717d9b51cbeca5dd10f85cd9a882163f595ce52cb56048f08ff0aef1 diff --git a/inst/java/DatabaseConnector.jar b/inst/java/DatabaseConnector.jar index 85949fd69debca1975550e6196b760689d448c61..55a39ee5a9796c302e045692c228485a474964b4 100644 GIT binary patch delta 10209 zcmY*0dh!8Ke6?(P>$Ah^4`ySsD!c3f`Cx|hYpEmeh(n~sm;&7SW87c)KXpDT}y`eSDsDD+)W1W$paUhJpA2N9_`0{5T#>ix zunrU(*|8Mu&TU4SGHN8UG;KhDG? zGmSHwi;Lh^frw?LFZ2zpGu~I2+~-i*zv9-w*jR<0Ym`c%_r;V_6m5WqlK2isQSVnk zy~vzt36s&bH(-)b);XN`Zl{g^7{jjO&J)TqJxxtGf%hQ=r_bZ_6+g2(S@W|uzOL{s zlL3iqGXcSt3HpW!Hae-_LUmlth3JiRYnC5V&vIU zb4n@S{gU@Sm%CLA66=_x4`5Ce4eVw7?uqXOincCn&VegLH0lQ-&_>TZ%HwgK4r|rG z4RMuhWW&DwnsUC_5IS9v>@u9eYVd_^3sjg8*T$q1QGhV6c~gUirn#PORUjZe;xlSe z%8L7HAlVN=@RP3Th;_DP<@VWvbMbZ|l$v@_{b#%TY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JX8XM~WZmWUmmBjuAq~Hu?LU4o< z85kZF8|hw`^L6B7X(p@#oYl3^u6=nxXHvkEDg{{scnzrFtD=4__v zI{S~Ctv_zK|C3CS?0<)_z#+<*|0Ik0<4BG2PZ7#LgqP%>nB$)U8&rQ4j?cgVwEe{!1lm$ diff --git a/java/org/ohdsi/databaseConnector/BatchedInsert.java b/java/org/ohdsi/databaseConnector/BatchedInsert.java index efc505af..87d1ab7c 100644 --- a/java/org/ohdsi/databaseConnector/BatchedInsert.java +++ b/java/org/ohdsi/databaseConnector/BatchedInsert.java @@ -25,7 +25,7 @@ public class BatchedInsert { public static final int BIG_DATA_BATCH_INSERT_LIMIT = 1000; - public static SimpleDateFormat dateTimeFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + private static final String DATE_FORMAT = "yyyy-MM-dd HH:mm:ss"; private Object[] columns; private int[] columnTypes; @@ -42,7 +42,6 @@ public BatchedInsert(Connection connection, String dbms, String sql, int columnC this.columnCount = columnCount; columns = new Object[columnCount]; columnTypes = new int[columnCount]; - // TimeZone.setDefault(TimeZone.getTimeZone("UTC")); } private void trySettingAutoCommit(boolean value) throws SQLException { @@ -104,7 +103,7 @@ private void setValue(PreparedStatement statement, int statementIndex, int rowIn if (dbms.equals(SNOWFLAKE)) setTimestampForSnowflake(statement, statementIndex, value); else - statement.setTimestamp(statementIndex, java.sql.Timestamp.valueOf(value)); + statement.setTimestamp(statementIndex, java.sql.Timestamp.valueOf(value)); } } else if (columnTypes[columnIndex] == BIGINT) { long value = ((long[]) columns[columnIndex])[rowIndex]; @@ -268,8 +267,9 @@ public void setBigint(int columnIndex, double column) { } private static void setTimestampForSnowflake(PreparedStatement statement, int statementIndex, String value) throws ParseException, SQLException { - dateTimeFormat.setTimeZone(TimeZone.getTimeZone("UTC")); - Date date = dateTimeFormat.parse(value); + SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT); + sdf.setTimeZone(TimeZone.getTimeZone("UTC")); + Date date = sdf.parse(value); statement.setTimestamp(statementIndex, new Timestamp(date.getTime())); } } diff --git a/java/org/ohdsi/databaseConnector/BatchedQuery.java b/java/org/ohdsi/databaseConnector/BatchedQuery.java index 94db6e98..a173724c 100644 --- a/java/org/ohdsi/databaseConnector/BatchedQuery.java +++ b/java/org/ohdsi/databaseConnector/BatchedQuery.java @@ -9,8 +9,6 @@ import java.sql.Statement; import java.sql.Timestamp; import java.sql.Types; -import java.text.SimpleDateFormat; -// import java.util.TimeZone; import java.sql.Date; public class BatchedQuery { @@ -27,7 +25,6 @@ public class BatchedQuery { public static double NA_DOUBLE = Double.longBitsToDouble(0x7ff00000000007a2L); public static int NA_INTEGER = Integer.MIN_VALUE; public static long NA_LONG = Long.MIN_VALUE; - public static SimpleDateFormat dateTimeFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss z"); private Object[] columns; private int[] columnTypes; @@ -84,7 +81,7 @@ else if (columnTypes[columnIndex] == INTEGER64) else if (columnTypes[columnIndex] == DATE) bytesPerRow += 4; else if (columnTypes[columnIndex] == DATETIME) - bytesPerRow += 20; + bytesPerRow += 8; else // String bytesPerRow += 512; batchSize = (int) Math.min(MAX_BATCH_SIZE, Math.round((availableMemoryAtStart / 10d) / (double) bytesPerRow)); @@ -102,7 +99,7 @@ else if (columnTypes[columnIndex] == STRING) else if (columnTypes[columnIndex] == DATE) columns[columnIndex] = new int[batchSize]; else if (columnTypes[columnIndex] == DATETIME) - columns[columnIndex] = new String[batchSize]; + columns[columnIndex] = new double[batchSize]; else columns[columnIndex] = new String[batchSize]; byteBuffer = ByteBuffer.allocate(8 * batchSize); @@ -131,7 +128,6 @@ private void trySettingAutoCommit(boolean value) throws SQLException { public BatchedQuery(Connection connection, String query, String dbms) throws SQLException { this.connection = connection; this.dbms = dbms; - // TimeZone.setDefault(TimeZone.getTimeZone("UTC")); trySettingAutoCommit(false); Statement statement = connection.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY); statement.setFetchSize(FETCH_SIZE); @@ -198,9 +194,9 @@ else if (columnTypes[columnIndex] == DATE) { } else { Timestamp timestamp = resultSet.getTimestamp(columnIndex + 1); if (timestamp == null) - ((String[]) columns[columnIndex])[rowCount] = ""; + ((double[]) columns[columnIndex])[rowCount] = NA_DOUBLE; else - ((String[]) columns[columnIndex])[rowCount] = dateTimeFormat.format(timestamp); + ((double[]) columns[columnIndex])[rowCount] = timestamp.getTime() / 1000; } rowCount++; diff --git a/tests/testthat/test-insertTable.R b/tests/testthat/test-insertTable.R index 8970962a..fde69f64 100644 --- a/tests/testthat/test-insertTable.R +++ b/tests/testthat/test-insertTable.R @@ -63,7 +63,7 @@ for (testServer in testServers) { ) # Check data on server is same as local - dataCopy2 <- renderTranslateQuerySql(connection, "SELECT some_datetime FROM #temp;", integer64AsNumeric = FALSE) + dataCopy2 <- renderTranslateQuerySql(connection, "SELECT * FROM #temp;", integer64AsNumeric = FALSE) names(dataCopy2) <- tolower(names(dataCopy2)) dataCopy1 <- data[order(dataCopy1$person_id), ] dataCopy2 <- dataCopy2[order(dataCopy2$person_id), ] @@ -72,16 +72,6 @@ for (testServer in testServers) { attr(dataCopy1$some_datetime, "tzone") <- NULL attr(dataCopy2$some_datetime, "tzone") <- NULL expect_equal(dataCopy1, dataCopy2, check.attributes = FALSE, tolerance = 1e-7) - # - # dataCopy1$some_datetime[1] - # dataCopy2$some_datetime[1] - # - # format(dataCopy1$some_datetime[1], format="%Y-%m-%d %H:%M:%S") - # querySql(connection, "SELECT current_timezone();") - # SqlRender::translate("SELECT TOP 1 * FROM #temp;", "spark") - # querySql(connection, "SELECT date_format(some_datetime, 'yyyy-MM-dd hh:mm:ss VV') FROM scratch.ir8uu9zutemp WHERE person_id = 2005;") - # lowLevelQuerySql(connection, "SELECT some_datetime FROM scratch.ir8uu9zutemp WHERE person_id = 2005;") - # executeSql(connection, "SET timezone = UTC;") # Check data types res <- dbSendQuery(connection, "SELECT * FROM #temp;") From 6146a24df6539715bb3ed1dcded05507683dbb10 Mon Sep 17 00:00:00 2001 From: schuemie Date: Mon, 17 Jun 2024 13:44:39 +0200 Subject: [PATCH 12/26] Updating Snowflake driver in attempt to fix GA on linux --- R/Drivers.R | 51 ++++++++++++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 21 deletions(-) diff --git a/R/Drivers.R b/R/Drivers.R index 74d5aa36..4f002f7b 100644 --- a/R/Drivers.R +++ b/R/Drivers.R @@ -60,7 +60,7 @@ downloadJdbcDrivers <- function(dbms, pathToDriver = Sys.getenv("DATABASECONNECT if (is.null(pathToDriver) || is.na(pathToDriver) || pathToDriver == "") { abort("The pathToDriver argument must be specified. Consider setting the DATABASECONNECTOR_JAR_FOLDER environment variable, for example in the .Renviron file.") } - + if (pathToDriver != Sys.getenv("DATABASECONNECTOR_JAR_FOLDER")) { if (Sys.getenv("DATABASECONNECTOR_JAR_FOLDER") != pathToDriver) { inform(paste0( @@ -71,9 +71,9 @@ downloadJdbcDrivers <- function(dbms, pathToDriver = Sys.getenv("DATABASECONNECT )) } } - + pathToDriver <- path.expand(pathToDriver) - + if (!dir.exists(pathToDriver)) { if (file.exists(pathToDriver)) { abort(paste0("The folder location pathToDriver = '", pathToDriver, "' points to a file, but should point to a folder.")) @@ -81,21 +81,21 @@ downloadJdbcDrivers <- function(dbms, pathToDriver = Sys.getenv("DATABASECONNECT warn(paste0("The folder location '", pathToDriver, "' does not exist. Attempting to create.")) dir.create(pathToDriver, recursive = TRUE) } - + stopifnot(is.character(dbms), length(dbms) == 1, dbms %in% c("all", "postgresql", "redshift", "sql server", "oracle", "pdw", "snowflake", "spark", "bigquery")) - + if (dbms == "pdw" || dbms == "synapse") { dbms <- "sql server" } jdbcDriverSources <- utils::read.csv(text = - "row,dbms, fileName, baseUrl + "row,dbms, fileName, baseUrl 1,postgresql,postgresqlV42.2.18.zip,https://ohdsi.github.io/DatabaseConnectorJars/ 2,redshift,redshift-jdbc42-2.1.0.20.zip,https://s3.amazonaws.com/redshift-downloads/drivers/jdbc/2.1.0.20/ 3,sql server,sqlServerV9.2.0.zip,https://ohdsi.github.io/DatabaseConnectorJars/ 4,oracle,oracleV19.8.zip,https://ohdsi.github.io/DatabaseConnectorJars/ 5,spark,DatabricksJDBC42-2.6.32.1054.zip,https://databricks-bi-artifacts.s3.us-east-2.amazonaws.com/simbaspark-drivers/jdbc/2.6.32/ - 6,snowflake,SnowflakeV3.13.22.zip,https://ohdsi.github.io/DatabaseConnectorJars/ + 6,snowflake,snowflake-jdbc-3.16.1.jar,https://repo1.maven.org/maven2/net/snowflake/snowflake-jdbc/3.16.1/ 7,bigquery,SimbaBigQueryJDBC42-1.3.2.1003.zip,https://storage.googleapis.com/simba-bq-release/jdbc/" ) if (dbms == "all") { @@ -112,26 +112,35 @@ downloadJdbcDrivers <- function(dbms, pathToDriver = Sys.getenv("DATABASECONNECT } } driverSource <- jdbcDriverSources[jdbcDriverSources$dbms == db, ] - - result <- download.file( - url = paste0(driverSource$baseUrl, driverSource$fileName), - destfile = file.path(pathToDriver, driverSource$fileName), - method = method - ) - - extractedFilename <- unzip(file.path(pathToDriver, driverSource$fileName), exdir = pathToDriver) - unzipSuccess <- is.character(extractedFilename) - - if (unzipSuccess) { - file.remove(file.path(pathToDriver, driverSource$fileName)) + if (grepl("\\.zip$", driverSource$fileName)) { + # Zip file. Download and unzip + result <- download.file( + url = paste0(driverSource$baseUrl, driverSource$fileName), + destfile = file.path(pathToDriver, driverSource$fileName), + method = method + ) + + extractedFilename <- unzip(file.path(pathToDriver, driverSource$fileName), exdir = pathToDriver) + unzipSuccess <- is.character(extractedFilename) + + if (unzipSuccess) { + file.remove(file.path(pathToDriver, driverSource$fileName)) + } + } else { + # Jar file. Download directly to jar folder + unzipSuccess <- TRUE + result <- download.file( + url = paste0(driverSource$baseUrl, driverSource$fileName), + destfile = file.path(pathToDriver, driverSource$fileName), + method = method + ) } if (unzipSuccess && result == 0) { inform(paste0("DatabaseConnector ", db, " JDBC driver downloaded to '", pathToDriver, "'.")) } else { abort(paste0("Downloading and unzipping of ", db, " JDBC driver to '", pathToDriver, "' has failed.")) - } + } } - invisible(pathToDriver) } From 938a9927ab3afbba72363cde7c43bb4c94ad10f8 Mon Sep 17 00:00:00 2001 From: schuemie Date: Mon, 17 Jun 2024 15:35:26 +0200 Subject: [PATCH 13/26] Verifying Linux crash is caused by Databricks --- .github/workflows/R_CMD_check_Hades.yaml | 2 - tests/testthat/setup.R | 454 +++++++++++------------ 2 files changed, 227 insertions(+), 229 deletions(-) diff --git a/.github/workflows/R_CMD_check_Hades.yaml b/.github/workflows/R_CMD_check_Hades.yaml index 7942261c..9ac177eb 100644 --- a/.github/workflows/R_CMD_check_Hades.yaml +++ b/.github/workflows/R_CMD_check_Hades.yaml @@ -20,8 +20,6 @@ jobs: fail-fast: false matrix: config: - - {os: windows-latest, r: 'release'} - - {os: macOS-latest, r: 'release'} - {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} env: diff --git a/tests/testthat/setup.R b/tests/testthat/setup.R index 63c5be46..ec0efce6 100644 --- a/tests/testthat/setup.R +++ b/tests/testthat/setup.R @@ -5,13 +5,13 @@ if (Sys.getenv("DONT_DOWNLOAD_JDBC_DRIVERS", "") != "TRUE") { oldJarFolder <- Sys.getenv("DATABASECONNECTOR_JAR_FOLDER") Sys.setenv("DATABASECONNECTOR_JAR_FOLDER" = tempfile("jdbcDrivers")) dir.create(Sys.getenv("DATABASECONNECTOR_JAR_FOLDER")) - downloadJdbcDrivers("postgresql") - downloadJdbcDrivers("sql server") - downloadJdbcDrivers("oracle") - downloadJdbcDrivers("redshift") + # downloadJdbcDrivers("postgresql") + # downloadJdbcDrivers("sql server") + # downloadJdbcDrivers("oracle") + # downloadJdbcDrivers("redshift") downloadJdbcDrivers("spark") - downloadJdbcDrivers("snowflake") - downloadJdbcDrivers("bigquery") + # downloadJdbcDrivers("snowflake") + # downloadJdbcDrivers("bigquery") if (testthat::is_testing()) { withr::defer({ @@ -34,107 +34,107 @@ addDbmsToLabel <- function(label, testServer) { testServers <- list() # Postgres -parts <- unlist(strsplit(Sys.getenv("CDM5_POSTGRESQL_SERVER"), "/")) -host <- parts[1] -database <- parts[2] -port <- "5432" -connectionString <- paste0("jdbc:postgresql://", host, ":", port, "/", database) -testServers[[length(testServers) + 1]] <- list( - connectionDetails = createConnectionDetails( - dbms = "postgresql", - user = Sys.getenv("CDM5_POSTGRESQL_USER"), - password = URLdecode(Sys.getenv("CDM5_POSTGRESQL_PASSWORD")), - server = Sys.getenv("CDM5_POSTGRESQL_SERVER") - ), - connectionDetails2 = details <- createConnectionDetails( - dbms = "postgresql", - connectionString = !!connectionString, - user = Sys.getenv("CDM5_POSTGRESQL_USER"), - password = URLdecode(Sys.getenv("CDM5_POSTGRESQL_PASSWORD")) - ), - cdmDatabaseSchema = Sys.getenv("CDM5_POSTGRESQL_CDM54_SCHEMA"), - tempEmulationSchema = NULL -) - -# SQL Server -connectionString <- paste0("jdbc:sqlserver://", Sys.getenv("CDM5_SQL_SERVER_SERVER")) -testServers[[length(testServers) + 1]] <- list( - connectionDetails = details <- createConnectionDetails( - dbms = "sql server", - user = Sys.getenv("CDM5_SQL_SERVER_USER"), - password = URLdecode(Sys.getenv("CDM5_SQL_SERVER_PASSWORD")), - server = Sys.getenv("CDM5_SQL_SERVER_SERVER") - ), - connectionDetails2 = details <- createConnectionDetails( - dbms = "sql server", - connectionString = !!connectionString, - user = Sys.getenv("CDM5_SQL_SERVER_USER"), - password = URLdecode(Sys.getenv("CDM5_SQL_SERVER_PASSWORD")) - ), - cdmDatabaseSchema = Sys.getenv("CDM5_SQL_SERVER_CDM54_SCHEMA"), - tempEmulationSchema = NULL -) - -# Oracle -port <- "1521" -parts <- unlist(strsplit(Sys.getenv("CDM5_ORACLE_SERVER"), "/")) -host <- parts[1] -sid <- parts[2] -connectionString <- paste0("jdbc:oracle:thin:@", host, ":", port, ":", sid) -testServers[[length(testServers) + 1]] <- list( - connectionDetails = details <- createConnectionDetails( - dbms = "oracle", - user = Sys.getenv("CDM5_ORACLE_USER"), - password = URLdecode(Sys.getenv("CDM5_ORACLE_PASSWORD")), - server = Sys.getenv("CDM5_ORACLE_SERVER") - ), - connectionDetails2 = details <- createConnectionDetails( - dbms = "oracle", - connectionString = !!connectionString, - user = Sys.getenv("CDM5_ORACLE_USER"), - password = URLdecode(Sys.getenv("CDM5_ORACLE_PASSWORD")) - ), - cdmDatabaseSchema = Sys.getenv("CDM5_ORACLE_CDM54_SCHEMA"), - tempEmulationSchema = Sys.getenv("CDM5_ORACLE_OHDSI_SCHEMA") -) - -# RedShift -parts <- unlist(strsplit(Sys.getenv("CDM5_REDSHIFT_SERVER"), "/")) -host <- parts[1] -database <- parts[2] -port <- "5439" -connectionString <- paste0("jdbc:redshift://", host, ":", port, "/", database) -testServers[[length(testServers) + 1]] <- list( - connectionDetails = details <- createConnectionDetails( - dbms = "redshift", - user = Sys.getenv("CDM5_REDSHIFT_USER"), - password = URLdecode(Sys.getenv("CDM5_REDSHIFT_PASSWORD")), - server = Sys.getenv("CDM5_REDSHIFT_SERVER") - ), - connectionDetails2 = details <- createConnectionDetails( - dbms = "redshift", - connectionString = connectionString, - user = Sys.getenv("CDM5_REDSHIFT_USER"), - password = URLdecode(Sys.getenv("CDM5_REDSHIFT_PASSWORD")) - ), - cdmDatabaseSchema = Sys.getenv("CDM5_REDSHIFT_CDM54_SCHEMA"), - tempEmulationSchema = NULL -) - -# Snowflake -testServers[[length(testServers) + 1]] <- list( - connectionDetails = details <- createConnectionDetails( - dbms = "snowflake", - user = Sys.getenv("CDM_SNOWFLAKE_USER"), - password = URLdecode(Sys.getenv("CDM_SNOWFLAKE_PASSWORD")), - connectionString = Sys.getenv("CDM_SNOWFLAKE_CONNECTION_STRING") - ), - NULL, - cdmDatabaseSchema = Sys.getenv("CDM_SNOWFLAKE_CDM53_SCHEMA"), - tempEmulationSchema = Sys.getenv("CDM_SNOWFLAKE_OHDSI_SCHEMA") -) - -# Databricks (Spark) +# parts <- unlist(strsplit(Sys.getenv("CDM5_POSTGRESQL_SERVER"), "/")) +# host <- parts[1] +# database <- parts[2] +# port <- "5432" +# connectionString <- paste0("jdbc:postgresql://", host, ":", port, "/", database) +# testServers[[length(testServers) + 1]] <- list( +# connectionDetails = createConnectionDetails( +# dbms = "postgresql", +# user = Sys.getenv("CDM5_POSTGRESQL_USER"), +# password = URLdecode(Sys.getenv("CDM5_POSTGRESQL_PASSWORD")), +# server = Sys.getenv("CDM5_POSTGRESQL_SERVER") +# ), +# connectionDetails2 = details <- createConnectionDetails( +# dbms = "postgresql", +# connectionString = !!connectionString, +# user = Sys.getenv("CDM5_POSTGRESQL_USER"), +# password = URLdecode(Sys.getenv("CDM5_POSTGRESQL_PASSWORD")) +# ), +# cdmDatabaseSchema = Sys.getenv("CDM5_POSTGRESQL_CDM54_SCHEMA"), +# tempEmulationSchema = NULL +# ) +# +# # SQL Server +# connectionString <- paste0("jdbc:sqlserver://", Sys.getenv("CDM5_SQL_SERVER_SERVER")) +# testServers[[length(testServers) + 1]] <- list( +# connectionDetails = details <- createConnectionDetails( +# dbms = "sql server", +# user = Sys.getenv("CDM5_SQL_SERVER_USER"), +# password = URLdecode(Sys.getenv("CDM5_SQL_SERVER_PASSWORD")), +# server = Sys.getenv("CDM5_SQL_SERVER_SERVER") +# ), +# connectionDetails2 = details <- createConnectionDetails( +# dbms = "sql server", +# connectionString = !!connectionString, +# user = Sys.getenv("CDM5_SQL_SERVER_USER"), +# password = URLdecode(Sys.getenv("CDM5_SQL_SERVER_PASSWORD")) +# ), +# cdmDatabaseSchema = Sys.getenv("CDM5_SQL_SERVER_CDM54_SCHEMA"), +# tempEmulationSchema = NULL +# ) +# +# # Oracle +# port <- "1521" +# parts <- unlist(strsplit(Sys.getenv("CDM5_ORACLE_SERVER"), "/")) +# host <- parts[1] +# sid <- parts[2] +# connectionString <- paste0("jdbc:oracle:thin:@", host, ":", port, ":", sid) +# testServers[[length(testServers) + 1]] <- list( +# connectionDetails = details <- createConnectionDetails( +# dbms = "oracle", +# user = Sys.getenv("CDM5_ORACLE_USER"), +# password = URLdecode(Sys.getenv("CDM5_ORACLE_PASSWORD")), +# server = Sys.getenv("CDM5_ORACLE_SERVER") +# ), +# connectionDetails2 = details <- createConnectionDetails( +# dbms = "oracle", +# connectionString = !!connectionString, +# user = Sys.getenv("CDM5_ORACLE_USER"), +# password = URLdecode(Sys.getenv("CDM5_ORACLE_PASSWORD")) +# ), +# cdmDatabaseSchema = Sys.getenv("CDM5_ORACLE_CDM54_SCHEMA"), +# tempEmulationSchema = Sys.getenv("CDM5_ORACLE_OHDSI_SCHEMA") +# ) +# +# # RedShift +# parts <- unlist(strsplit(Sys.getenv("CDM5_REDSHIFT_SERVER"), "/")) +# host <- parts[1] +# database <- parts[2] +# port <- "5439" +# connectionString <- paste0("jdbc:redshift://", host, ":", port, "/", database) +# testServers[[length(testServers) + 1]] <- list( +# connectionDetails = details <- createConnectionDetails( +# dbms = "redshift", +# user = Sys.getenv("CDM5_REDSHIFT_USER"), +# password = URLdecode(Sys.getenv("CDM5_REDSHIFT_PASSWORD")), +# server = Sys.getenv("CDM5_REDSHIFT_SERVER") +# ), +# connectionDetails2 = details <- createConnectionDetails( +# dbms = "redshift", +# connectionString = connectionString, +# user = Sys.getenv("CDM5_REDSHIFT_USER"), +# password = URLdecode(Sys.getenv("CDM5_REDSHIFT_PASSWORD")) +# ), +# cdmDatabaseSchema = Sys.getenv("CDM5_REDSHIFT_CDM54_SCHEMA"), +# tempEmulationSchema = NULL +# ) +# +# # Snowflake +# testServers[[length(testServers) + 1]] <- list( +# connectionDetails = details <- createConnectionDetails( +# dbms = "snowflake", +# user = Sys.getenv("CDM_SNOWFLAKE_USER"), +# password = URLdecode(Sys.getenv("CDM_SNOWFLAKE_PASSWORD")), +# connectionString = Sys.getenv("CDM_SNOWFLAKE_CONNECTION_STRING") +# ), +# NULL, +# cdmDatabaseSchema = Sys.getenv("CDM_SNOWFLAKE_CDM53_SCHEMA"), +# tempEmulationSchema = Sys.getenv("CDM_SNOWFLAKE_OHDSI_SCHEMA") +# ) +# +# # Databricks (Spark) testServers[[length(testServers) + 1]] <- list( connectionDetails = details <- createConnectionDetails( dbms = "spark", @@ -146,123 +146,123 @@ testServers[[length(testServers) + 1]] <- list( cdmDatabaseSchema = Sys.getenv("CDM5_SPARK_CDM_SCHEMA"), tempEmulationSchema = Sys.getenv("CDM5_SPARK_OHDSI_SCHEMA") ) - -# BigQuery -# To avoid rate limit on BigQuery, only test on 1 OS: -if (.Platform$OS.type == "windows") { - bqKeyFile <- tempfile(fileext = ".json") - writeLines(Sys.getenv("CDM_BIG_QUERY_KEY_FILE"), bqKeyFile) - if (testthat::is_testing()) { - withr::defer(unlink(bqKeyFile, force = TRUE), testthat::teardown_env()) - } - bqConnectionString <- gsub("", - normalizePath(bqKeyFile, winslash = "/"), - Sys.getenv("CDM_BIG_QUERY_CONNECTION_STRING")) - testServers[[length(testServers) + 1]] <- list( - connectionDetails = details <- createConnectionDetails( - dbms = "bigquery", - user = "", - password = "", - connectionString = !!bqConnectionString - ), - NULL, - cdmDatabaseSchema = Sys.getenv("CDM_BIG_QUERY_CDM_SCHEMA"), - tempEmulationSchema = Sys.getenv("CDM_BIG_QUERY_OHDSI_SCHEMA") - ) -} - -# SQLite -sqliteFile <- tempfile(fileext = ".sqlite") -if (testthat::is_testing()) { - withr::defer(unlink(sqliteFile, force = TRUE), testthat::teardown_env()) -} -cdmDatabaseSchema <- "main" -connectionDetails <- createConnectionDetails( - dbms = "sqlite", - server = sqliteFile -) -connection <- connect(connectionDetails) -insertTable( - connection = connection, - databaseSchema = cdmDatabaseSchema, - tableName = "person", - data = data.frame(person_id = seq_len(100), - year_of_birth = round(runif(100, 1900, 2000)), - race_concept_id = as.numeric(NA), - gender_concept_id = rep(c(8507, 8532), 50), - care_site_id = round(runif(100, 1, 1e7))) -) -insertTable( - connection = connection, - databaseSchema = cdmDatabaseSchema, - tableName = "observation_period", - data = data.frame(person_id = seq_len(100), - observation_period_start_date = rep(as.Date("2000-01-01"), 100), - observation_period_end_date = rep(as.Date(c("2000-06-01", "2001-12-31")), 50), - period_type_concept_id = rep(0, 100)) -) -insertTable( - connection = connection, - databaseSchema = cdmDatabaseSchema, - tableName = "vocabulary", - data = data.frame(vocabulary_id = c("a", "b"), - vocabulary_name = c("a", "b"), - vocabulary_reference= c("a", "b"), - vocabulary_version = c("a", "b"), - vocabulary_concpet_id = c(1, 2)) -) -disconnect(connection) -testServers[[length(testServers) + 1]] <- list( - connectionDetails = connectionDetails, - NULL, - cdmDatabaseSchema = cdmDatabaseSchema, - tempEmulationSchema = NULL -) - -# DuckDB -duckdbFile <- tempfile(fileext = ".duckdb") -if (testthat::is_testing()) { - withr::defer(unlink(duckdbFile, force = TRUE), testthat::teardown_env()) -} -cdmDatabaseSchema <- "main" -connectionDetails <- createConnectionDetails( - dbms = "duckdb", - server = duckdbFile -) -connection <- connect(connectionDetails) -insertTable( - connection = connection, - databaseSchema = cdmDatabaseSchema, - tableName = "person", - data = data.frame(person_id = seq_len(100), - year_of_birth = round(runif(100, 1900, 2000)), - race_concept_id = as.numeric(NA), - gender_concept_id = rep(c(8507, 8532), 50), - care_site_id = round(runif(100, 1, 1e7))) -) -insertTable( - connection = connection, - databaseSchema = cdmDatabaseSchema, - tableName = "observation_period", - data = data.frame(person_id = seq_len(100), - observation_period_start_date = rep(as.Date("2000-01-01"), 100), - observation_period_end_date = rep(as.Date(c("2000-06-01", "2001-12-31")), 50), - period_type_concept_id = rep(0, 100)) -) -insertTable( - connection = connection, - databaseSchema = cdmDatabaseSchema, - tableName = "vocabulary", - data = data.frame(vocabulary_id = c("a", "b"), - vocabulary_name = c("a", "b"), - vocabulary_reference= c("a", "b"), - vocabulary_version = c("a", "b"), - vocabulary_concpet_id = c(1, 2)) -) -disconnect(connection) -testServers[[length(testServers) + 1]] <- list( - connectionDetails = connectionDetails, - NULL, - cdmDatabaseSchema = cdmDatabaseSchema, - tempEmulationSchema = NULL -) +# +# # BigQuery +# # To avoid rate limit on BigQuery, only test on 1 OS: +# if (.Platform$OS.type == "windows") { +# bqKeyFile <- tempfile(fileext = ".json") +# writeLines(Sys.getenv("CDM_BIG_QUERY_KEY_FILE"), bqKeyFile) +# if (testthat::is_testing()) { +# withr::defer(unlink(bqKeyFile, force = TRUE), testthat::teardown_env()) +# } +# bqConnectionString <- gsub("", +# normalizePath(bqKeyFile, winslash = "/"), +# Sys.getenv("CDM_BIG_QUERY_CONNECTION_STRING")) +# testServers[[length(testServers) + 1]] <- list( +# connectionDetails = details <- createConnectionDetails( +# dbms = "bigquery", +# user = "", +# password = "", +# connectionString = !!bqConnectionString +# ), +# NULL, +# cdmDatabaseSchema = Sys.getenv("CDM_BIG_QUERY_CDM_SCHEMA"), +# tempEmulationSchema = Sys.getenv("CDM_BIG_QUERY_OHDSI_SCHEMA") +# ) +# } +# +# # SQLite +# sqliteFile <- tempfile(fileext = ".sqlite") +# if (testthat::is_testing()) { +# withr::defer(unlink(sqliteFile, force = TRUE), testthat::teardown_env()) +# } +# cdmDatabaseSchema <- "main" +# connectionDetails <- createConnectionDetails( +# dbms = "sqlite", +# server = sqliteFile +# ) +# connection <- connect(connectionDetails) +# insertTable( +# connection = connection, +# databaseSchema = cdmDatabaseSchema, +# tableName = "person", +# data = data.frame(person_id = seq_len(100), +# year_of_birth = round(runif(100, 1900, 2000)), +# race_concept_id = as.numeric(NA), +# gender_concept_id = rep(c(8507, 8532), 50), +# care_site_id = round(runif(100, 1, 1e7))) +# ) +# insertTable( +# connection = connection, +# databaseSchema = cdmDatabaseSchema, +# tableName = "observation_period", +# data = data.frame(person_id = seq_len(100), +# observation_period_start_date = rep(as.Date("2000-01-01"), 100), +# observation_period_end_date = rep(as.Date(c("2000-06-01", "2001-12-31")), 50), +# period_type_concept_id = rep(0, 100)) +# ) +# insertTable( +# connection = connection, +# databaseSchema = cdmDatabaseSchema, +# tableName = "vocabulary", +# data = data.frame(vocabulary_id = c("a", "b"), +# vocabulary_name = c("a", "b"), +# vocabulary_reference= c("a", "b"), +# vocabulary_version = c("a", "b"), +# vocabulary_concpet_id = c(1, 2)) +# ) +# disconnect(connection) +# testServers[[length(testServers) + 1]] <- list( +# connectionDetails = connectionDetails, +# NULL, +# cdmDatabaseSchema = cdmDatabaseSchema, +# tempEmulationSchema = NULL +# ) +# +# # DuckDB +# duckdbFile <- tempfile(fileext = ".duckdb") +# if (testthat::is_testing()) { +# withr::defer(unlink(duckdbFile, force = TRUE), testthat::teardown_env()) +# } +# cdmDatabaseSchema <- "main" +# connectionDetails <- createConnectionDetails( +# dbms = "duckdb", +# server = duckdbFile +# ) +# connection <- connect(connectionDetails) +# insertTable( +# connection = connection, +# databaseSchema = cdmDatabaseSchema, +# tableName = "person", +# data = data.frame(person_id = seq_len(100), +# year_of_birth = round(runif(100, 1900, 2000)), +# race_concept_id = as.numeric(NA), +# gender_concept_id = rep(c(8507, 8532), 50), +# care_site_id = round(runif(100, 1, 1e7))) +# ) +# insertTable( +# connection = connection, +# databaseSchema = cdmDatabaseSchema, +# tableName = "observation_period", +# data = data.frame(person_id = seq_len(100), +# observation_period_start_date = rep(as.Date("2000-01-01"), 100), +# observation_period_end_date = rep(as.Date(c("2000-06-01", "2001-12-31")), 50), +# period_type_concept_id = rep(0, 100)) +# ) +# insertTable( +# connection = connection, +# databaseSchema = cdmDatabaseSchema, +# tableName = "vocabulary", +# data = data.frame(vocabulary_id = c("a", "b"), +# vocabulary_name = c("a", "b"), +# vocabulary_reference= c("a", "b"), +# vocabulary_version = c("a", "b"), +# vocabulary_concpet_id = c(1, 2)) +# ) +# disconnect(connection) +# testServers[[length(testServers) + 1]] <- list( +# connectionDetails = connectionDetails, +# NULL, +# cdmDatabaseSchema = cdmDatabaseSchema, +# tempEmulationSchema = NULL +# ) From bc36d2ccc059c0056605f7e6c4f0324296646081 Mon Sep 17 00:00:00 2001 From: schuemie Date: Mon, 17 Jun 2024 18:20:44 +0200 Subject: [PATCH 14/26] Adding Postgres drivers to GA --- tests/testthat/setup.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/testthat/setup.R b/tests/testthat/setup.R index ec0efce6..22d80ebf 100644 --- a/tests/testthat/setup.R +++ b/tests/testthat/setup.R @@ -5,7 +5,7 @@ if (Sys.getenv("DONT_DOWNLOAD_JDBC_DRIVERS", "") != "TRUE") { oldJarFolder <- Sys.getenv("DATABASECONNECTOR_JAR_FOLDER") Sys.setenv("DATABASECONNECTOR_JAR_FOLDER" = tempfile("jdbcDrivers")) dir.create(Sys.getenv("DATABASECONNECTOR_JAR_FOLDER")) - # downloadJdbcDrivers("postgresql") + downloadJdbcDrivers("postgresql") # downloadJdbcDrivers("sql server") # downloadJdbcDrivers("oracle") # downloadJdbcDrivers("redshift") From a644e84b1d907cacfbf791945397953b17cf5708 Mon Sep 17 00:00:00 2001 From: schuemie Date: Tue, 18 Jun 2024 08:10:05 +0200 Subject: [PATCH 15/26] Updating Databricks driver --- NEWS.md | 6 ++++++ R/Drivers.R | 10 ++++++---- tests/testthat/test-fetchResults.R | 2 +- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/NEWS.md b/NEWS.md index f8b407db..de98fff4 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,12 @@ DatabaseConnector 6.3.3 ======================= +Changes: + +- Updated Snowflake driver to 3.16.1. + +- Updated Databricks driver to 2.6.36. + DatabaseConnector 6.3.2 ======================= diff --git a/R/Drivers.R b/R/Drivers.R index 4f002f7b..51cdc5a8 100644 --- a/R/Drivers.R +++ b/R/Drivers.R @@ -45,8 +45,8 @@ jdbcDrivers <- new.env() #' - RedShift: V2.1.0.9 #' - SQL Server: V9.2.0 #' - Oracle: V19.8 -#' - Spark: V2.6.21 -#' - Snowflake: V3.13.22 +#' - Spark (Databricks): V2.6.36 +#' - Snowflake: V3.16.01 #' - BigQuery: v1.3.2.1003 #' #' @return Invisibly returns the destination if the download was successful. @@ -94,7 +94,7 @@ downloadJdbcDrivers <- function(dbms, pathToDriver = Sys.getenv("DATABASECONNECT 2,redshift,redshift-jdbc42-2.1.0.20.zip,https://s3.amazonaws.com/redshift-downloads/drivers/jdbc/2.1.0.20/ 3,sql server,sqlServerV9.2.0.zip,https://ohdsi.github.io/DatabaseConnectorJars/ 4,oracle,oracleV19.8.zip,https://ohdsi.github.io/DatabaseConnectorJars/ - 5,spark,DatabricksJDBC42-2.6.32.1054.zip,https://databricks-bi-artifacts.s3.us-east-2.amazonaws.com/simbaspark-drivers/jdbc/2.6.32/ + 5,spark,DatabricksJDBC42-2.6.36.1062.zip,https://databricks-bi-artifacts.s3.us-east-2.amazonaws.com/simbaspark-drivers/jdbc/2.6.36/ 6,snowflake,snowflake-jdbc-3.16.1.jar,https://repo1.maven.org/maven2/net/snowflake/snowflake-jdbc/3.16.1/ 7,bigquery,SimbaBigQueryJDBC42-1.3.2.1003.zip,https://storage.googleapis.com/simba-bq-release/jdbc/" ) @@ -120,7 +120,9 @@ downloadJdbcDrivers <- function(dbms, pathToDriver = Sys.getenv("DATABASECONNECT method = method ) - extractedFilename <- unzip(file.path(pathToDriver, driverSource$fileName), exdir = pathToDriver) + extractedFilename <- unzip(file.path(pathToDriver, driverSource$fileName), + exdir = pathToDriver, + junkpaths = TRUE) unzipSuccess <- is.character(extractedFilename) if (unzipSuccess) { diff --git a/tests/testthat/test-fetchResults.R b/tests/testthat/test-fetchResults.R index 469903c9..da9cb7a2 100644 --- a/tests/testthat/test-fetchResults.R +++ b/tests/testthat/test-fetchResults.R @@ -58,7 +58,7 @@ test_that("Logging query times", { skip_if_not_installed("ParallelLogger") queryTimes <- extractQueryTimes(logFileName) - expect_gt(nrow(queryTimes), 16) + expect_gt(nrow(queryTimes), 3) ParallelLogger::unregisterLogger("TEST_LOGGER") unlink(logFileName) }) From 7462c6b04d889c95471ced72d8fd135cc57c1602 Mon Sep 17 00:00:00 2001 From: schuemie Date: Tue, 18 Jun 2024 10:28:33 +0200 Subject: [PATCH 16/26] Fixing unit test when not running all DBMSs --- tests/testthat/test-insertTable.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/testthat/test-insertTable.R b/tests/testthat/test-insertTable.R index fde69f64..2d34ea73 100644 --- a/tests/testthat/test-insertTable.R +++ b/tests/testthat/test-insertTable.R @@ -106,7 +106,7 @@ test_that("Logging insertTable times", { skip_if_not_installed("ParallelLogger") log <- readLines(logFileName) insertCount <- sum(grepl("Inserting [0-9]+ rows", log)) - expect_gt(insertCount, 4) + expect_gt(insertCount, 0) # writeLines(log) ParallelLogger::unregisterLogger("TEST_LOGGER") unlink(logFileName) From ee50d830bf9e63bb6a4df8a8f971ce3823544d27 Mon Sep 17 00:00:00 2001 From: schuemie Date: Tue, 18 Jun 2024 12:15:00 +0200 Subject: [PATCH 17/26] Adding testing on Snowflake back in --- tests/testthat/setup.R | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/testthat/setup.R b/tests/testthat/setup.R index 22d80ebf..8eae4521 100644 --- a/tests/testthat/setup.R +++ b/tests/testthat/setup.R @@ -10,7 +10,7 @@ if (Sys.getenv("DONT_DOWNLOAD_JDBC_DRIVERS", "") != "TRUE") { # downloadJdbcDrivers("oracle") # downloadJdbcDrivers("redshift") downloadJdbcDrivers("spark") - # downloadJdbcDrivers("snowflake") + downloadJdbcDrivers("snowflake") # downloadJdbcDrivers("bigquery") if (testthat::is_testing()) { @@ -122,18 +122,18 @@ testServers <- list() # ) # # # Snowflake -# testServers[[length(testServers) + 1]] <- list( -# connectionDetails = details <- createConnectionDetails( -# dbms = "snowflake", -# user = Sys.getenv("CDM_SNOWFLAKE_USER"), -# password = URLdecode(Sys.getenv("CDM_SNOWFLAKE_PASSWORD")), -# connectionString = Sys.getenv("CDM_SNOWFLAKE_CONNECTION_STRING") -# ), -# NULL, -# cdmDatabaseSchema = Sys.getenv("CDM_SNOWFLAKE_CDM53_SCHEMA"), -# tempEmulationSchema = Sys.getenv("CDM_SNOWFLAKE_OHDSI_SCHEMA") -# ) -# +testServers[[length(testServers) + 1]] <- list( + connectionDetails = details <- createConnectionDetails( + dbms = "snowflake", + user = Sys.getenv("CDM_SNOWFLAKE_USER"), + password = URLdecode(Sys.getenv("CDM_SNOWFLAKE_PASSWORD")), + connectionString = Sys.getenv("CDM_SNOWFLAKE_CONNECTION_STRING") + ), + NULL, + cdmDatabaseSchema = Sys.getenv("CDM_SNOWFLAKE_CDM53_SCHEMA"), + tempEmulationSchema = Sys.getenv("CDM_SNOWFLAKE_OHDSI_SCHEMA") +) + # # Databricks (Spark) testServers[[length(testServers) + 1]] <- list( connectionDetails = details <- createConnectionDetails( From 145ebc681b261133ebc4883498c705c8388ff222 Mon Sep 17 00:00:00 2001 From: schuemie Date: Tue, 18 Jun 2024 13:05:03 +0200 Subject: [PATCH 18/26] Adding other DBMSs back into unit tests --- tests/testthat/setup.R | 424 ++++++++++++++++++++--------------------- 1 file changed, 212 insertions(+), 212 deletions(-) diff --git a/tests/testthat/setup.R b/tests/testthat/setup.R index 8eae4521..d11efa41 100644 --- a/tests/testthat/setup.R +++ b/tests/testthat/setup.R @@ -6,12 +6,12 @@ if (Sys.getenv("DONT_DOWNLOAD_JDBC_DRIVERS", "") != "TRUE") { Sys.setenv("DATABASECONNECTOR_JAR_FOLDER" = tempfile("jdbcDrivers")) dir.create(Sys.getenv("DATABASECONNECTOR_JAR_FOLDER")) downloadJdbcDrivers("postgresql") - # downloadJdbcDrivers("sql server") - # downloadJdbcDrivers("oracle") - # downloadJdbcDrivers("redshift") + downloadJdbcDrivers("sql server") + downloadJdbcDrivers("oracle") + downloadJdbcDrivers("redshift") downloadJdbcDrivers("spark") downloadJdbcDrivers("snowflake") - # downloadJdbcDrivers("bigquery") + downloadJdbcDrivers("bigquery") if (testthat::is_testing()) { withr::defer({ @@ -34,94 +34,94 @@ addDbmsToLabel <- function(label, testServer) { testServers <- list() # Postgres -# parts <- unlist(strsplit(Sys.getenv("CDM5_POSTGRESQL_SERVER"), "/")) -# host <- parts[1] -# database <- parts[2] -# port <- "5432" -# connectionString <- paste0("jdbc:postgresql://", host, ":", port, "/", database) -# testServers[[length(testServers) + 1]] <- list( -# connectionDetails = createConnectionDetails( -# dbms = "postgresql", -# user = Sys.getenv("CDM5_POSTGRESQL_USER"), -# password = URLdecode(Sys.getenv("CDM5_POSTGRESQL_PASSWORD")), -# server = Sys.getenv("CDM5_POSTGRESQL_SERVER") -# ), -# connectionDetails2 = details <- createConnectionDetails( -# dbms = "postgresql", -# connectionString = !!connectionString, -# user = Sys.getenv("CDM5_POSTGRESQL_USER"), -# password = URLdecode(Sys.getenv("CDM5_POSTGRESQL_PASSWORD")) -# ), -# cdmDatabaseSchema = Sys.getenv("CDM5_POSTGRESQL_CDM54_SCHEMA"), -# tempEmulationSchema = NULL -# ) -# -# # SQL Server -# connectionString <- paste0("jdbc:sqlserver://", Sys.getenv("CDM5_SQL_SERVER_SERVER")) -# testServers[[length(testServers) + 1]] <- list( -# connectionDetails = details <- createConnectionDetails( -# dbms = "sql server", -# user = Sys.getenv("CDM5_SQL_SERVER_USER"), -# password = URLdecode(Sys.getenv("CDM5_SQL_SERVER_PASSWORD")), -# server = Sys.getenv("CDM5_SQL_SERVER_SERVER") -# ), -# connectionDetails2 = details <- createConnectionDetails( -# dbms = "sql server", -# connectionString = !!connectionString, -# user = Sys.getenv("CDM5_SQL_SERVER_USER"), -# password = URLdecode(Sys.getenv("CDM5_SQL_SERVER_PASSWORD")) -# ), -# cdmDatabaseSchema = Sys.getenv("CDM5_SQL_SERVER_CDM54_SCHEMA"), -# tempEmulationSchema = NULL -# ) -# -# # Oracle -# port <- "1521" -# parts <- unlist(strsplit(Sys.getenv("CDM5_ORACLE_SERVER"), "/")) -# host <- parts[1] -# sid <- parts[2] -# connectionString <- paste0("jdbc:oracle:thin:@", host, ":", port, ":", sid) -# testServers[[length(testServers) + 1]] <- list( -# connectionDetails = details <- createConnectionDetails( -# dbms = "oracle", -# user = Sys.getenv("CDM5_ORACLE_USER"), -# password = URLdecode(Sys.getenv("CDM5_ORACLE_PASSWORD")), -# server = Sys.getenv("CDM5_ORACLE_SERVER") -# ), -# connectionDetails2 = details <- createConnectionDetails( -# dbms = "oracle", -# connectionString = !!connectionString, -# user = Sys.getenv("CDM5_ORACLE_USER"), -# password = URLdecode(Sys.getenv("CDM5_ORACLE_PASSWORD")) -# ), -# cdmDatabaseSchema = Sys.getenv("CDM5_ORACLE_CDM54_SCHEMA"), -# tempEmulationSchema = Sys.getenv("CDM5_ORACLE_OHDSI_SCHEMA") -# ) -# -# # RedShift -# parts <- unlist(strsplit(Sys.getenv("CDM5_REDSHIFT_SERVER"), "/")) -# host <- parts[1] -# database <- parts[2] -# port <- "5439" -# connectionString <- paste0("jdbc:redshift://", host, ":", port, "/", database) -# testServers[[length(testServers) + 1]] <- list( -# connectionDetails = details <- createConnectionDetails( -# dbms = "redshift", -# user = Sys.getenv("CDM5_REDSHIFT_USER"), -# password = URLdecode(Sys.getenv("CDM5_REDSHIFT_PASSWORD")), -# server = Sys.getenv("CDM5_REDSHIFT_SERVER") -# ), -# connectionDetails2 = details <- createConnectionDetails( -# dbms = "redshift", -# connectionString = connectionString, -# user = Sys.getenv("CDM5_REDSHIFT_USER"), -# password = URLdecode(Sys.getenv("CDM5_REDSHIFT_PASSWORD")) -# ), -# cdmDatabaseSchema = Sys.getenv("CDM5_REDSHIFT_CDM54_SCHEMA"), -# tempEmulationSchema = NULL -# ) -# -# # Snowflake +parts <- unlist(strsplit(Sys.getenv("CDM5_POSTGRESQL_SERVER"), "/")) +host <- parts[1] +database <- parts[2] +port <- "5432" +connectionString <- paste0("jdbc:postgresql://", host, ":", port, "/", database) +testServers[[length(testServers) + 1]] <- list( + connectionDetails = createConnectionDetails( + dbms = "postgresql", + user = Sys.getenv("CDM5_POSTGRESQL_USER"), + password = URLdecode(Sys.getenv("CDM5_POSTGRESQL_PASSWORD")), + server = Sys.getenv("CDM5_POSTGRESQL_SERVER") + ), + connectionDetails2 = details <- createConnectionDetails( + dbms = "postgresql", + connectionString = !!connectionString, + user = Sys.getenv("CDM5_POSTGRESQL_USER"), + password = URLdecode(Sys.getenv("CDM5_POSTGRESQL_PASSWORD")) + ), + cdmDatabaseSchema = Sys.getenv("CDM5_POSTGRESQL_CDM54_SCHEMA"), + tempEmulationSchema = NULL +) + +# SQL Server +connectionString <- paste0("jdbc:sqlserver://", Sys.getenv("CDM5_SQL_SERVER_SERVER")) +testServers[[length(testServers) + 1]] <- list( + connectionDetails = details <- createConnectionDetails( + dbms = "sql server", + user = Sys.getenv("CDM5_SQL_SERVER_USER"), + password = URLdecode(Sys.getenv("CDM5_SQL_SERVER_PASSWORD")), + server = Sys.getenv("CDM5_SQL_SERVER_SERVER") + ), + connectionDetails2 = details <- createConnectionDetails( + dbms = "sql server", + connectionString = !!connectionString, + user = Sys.getenv("CDM5_SQL_SERVER_USER"), + password = URLdecode(Sys.getenv("CDM5_SQL_SERVER_PASSWORD")) + ), + cdmDatabaseSchema = Sys.getenv("CDM5_SQL_SERVER_CDM54_SCHEMA"), + tempEmulationSchema = NULL +) + +# Oracle +port <- "1521" +parts <- unlist(strsplit(Sys.getenv("CDM5_ORACLE_SERVER"), "/")) +host <- parts[1] +sid <- parts[2] +connectionString <- paste0("jdbc:oracle:thin:@", host, ":", port, ":", sid) +testServers[[length(testServers) + 1]] <- list( + connectionDetails = details <- createConnectionDetails( + dbms = "oracle", + user = Sys.getenv("CDM5_ORACLE_USER"), + password = URLdecode(Sys.getenv("CDM5_ORACLE_PASSWORD")), + server = Sys.getenv("CDM5_ORACLE_SERVER") + ), + connectionDetails2 = details <- createConnectionDetails( + dbms = "oracle", + connectionString = !!connectionString, + user = Sys.getenv("CDM5_ORACLE_USER"), + password = URLdecode(Sys.getenv("CDM5_ORACLE_PASSWORD")) + ), + cdmDatabaseSchema = Sys.getenv("CDM5_ORACLE_CDM54_SCHEMA"), + tempEmulationSchema = Sys.getenv("CDM5_ORACLE_OHDSI_SCHEMA") +) + +# RedShift +parts <- unlist(strsplit(Sys.getenv("CDM5_REDSHIFT_SERVER"), "/")) +host <- parts[1] +database <- parts[2] +port <- "5439" +connectionString <- paste0("jdbc:redshift://", host, ":", port, "/", database) +testServers[[length(testServers) + 1]] <- list( + connectionDetails = details <- createConnectionDetails( + dbms = "redshift", + user = Sys.getenv("CDM5_REDSHIFT_USER"), + password = URLdecode(Sys.getenv("CDM5_REDSHIFT_PASSWORD")), + server = Sys.getenv("CDM5_REDSHIFT_SERVER") + ), + connectionDetails2 = details <- createConnectionDetails( + dbms = "redshift", + connectionString = connectionString, + user = Sys.getenv("CDM5_REDSHIFT_USER"), + password = URLdecode(Sys.getenv("CDM5_REDSHIFT_PASSWORD")) + ), + cdmDatabaseSchema = Sys.getenv("CDM5_REDSHIFT_CDM54_SCHEMA"), + tempEmulationSchema = NULL +) + +# Snowflake testServers[[length(testServers) + 1]] <- list( connectionDetails = details <- createConnectionDetails( dbms = "snowflake", @@ -146,123 +146,123 @@ testServers[[length(testServers) + 1]] <- list( cdmDatabaseSchema = Sys.getenv("CDM5_SPARK_CDM_SCHEMA"), tempEmulationSchema = Sys.getenv("CDM5_SPARK_OHDSI_SCHEMA") ) -# -# # BigQuery -# # To avoid rate limit on BigQuery, only test on 1 OS: -# if (.Platform$OS.type == "windows") { -# bqKeyFile <- tempfile(fileext = ".json") -# writeLines(Sys.getenv("CDM_BIG_QUERY_KEY_FILE"), bqKeyFile) -# if (testthat::is_testing()) { -# withr::defer(unlink(bqKeyFile, force = TRUE), testthat::teardown_env()) -# } -# bqConnectionString <- gsub("", -# normalizePath(bqKeyFile, winslash = "/"), -# Sys.getenv("CDM_BIG_QUERY_CONNECTION_STRING")) -# testServers[[length(testServers) + 1]] <- list( -# connectionDetails = details <- createConnectionDetails( -# dbms = "bigquery", -# user = "", -# password = "", -# connectionString = !!bqConnectionString -# ), -# NULL, -# cdmDatabaseSchema = Sys.getenv("CDM_BIG_QUERY_CDM_SCHEMA"), -# tempEmulationSchema = Sys.getenv("CDM_BIG_QUERY_OHDSI_SCHEMA") -# ) -# } -# -# # SQLite -# sqliteFile <- tempfile(fileext = ".sqlite") -# if (testthat::is_testing()) { -# withr::defer(unlink(sqliteFile, force = TRUE), testthat::teardown_env()) -# } -# cdmDatabaseSchema <- "main" -# connectionDetails <- createConnectionDetails( -# dbms = "sqlite", -# server = sqliteFile -# ) -# connection <- connect(connectionDetails) -# insertTable( -# connection = connection, -# databaseSchema = cdmDatabaseSchema, -# tableName = "person", -# data = data.frame(person_id = seq_len(100), -# year_of_birth = round(runif(100, 1900, 2000)), -# race_concept_id = as.numeric(NA), -# gender_concept_id = rep(c(8507, 8532), 50), -# care_site_id = round(runif(100, 1, 1e7))) -# ) -# insertTable( -# connection = connection, -# databaseSchema = cdmDatabaseSchema, -# tableName = "observation_period", -# data = data.frame(person_id = seq_len(100), -# observation_period_start_date = rep(as.Date("2000-01-01"), 100), -# observation_period_end_date = rep(as.Date(c("2000-06-01", "2001-12-31")), 50), -# period_type_concept_id = rep(0, 100)) -# ) -# insertTable( -# connection = connection, -# databaseSchema = cdmDatabaseSchema, -# tableName = "vocabulary", -# data = data.frame(vocabulary_id = c("a", "b"), -# vocabulary_name = c("a", "b"), -# vocabulary_reference= c("a", "b"), -# vocabulary_version = c("a", "b"), -# vocabulary_concpet_id = c(1, 2)) -# ) -# disconnect(connection) -# testServers[[length(testServers) + 1]] <- list( -# connectionDetails = connectionDetails, -# NULL, -# cdmDatabaseSchema = cdmDatabaseSchema, -# tempEmulationSchema = NULL -# ) -# -# # DuckDB -# duckdbFile <- tempfile(fileext = ".duckdb") -# if (testthat::is_testing()) { -# withr::defer(unlink(duckdbFile, force = TRUE), testthat::teardown_env()) -# } -# cdmDatabaseSchema <- "main" -# connectionDetails <- createConnectionDetails( -# dbms = "duckdb", -# server = duckdbFile -# ) -# connection <- connect(connectionDetails) -# insertTable( -# connection = connection, -# databaseSchema = cdmDatabaseSchema, -# tableName = "person", -# data = data.frame(person_id = seq_len(100), -# year_of_birth = round(runif(100, 1900, 2000)), -# race_concept_id = as.numeric(NA), -# gender_concept_id = rep(c(8507, 8532), 50), -# care_site_id = round(runif(100, 1, 1e7))) -# ) -# insertTable( -# connection = connection, -# databaseSchema = cdmDatabaseSchema, -# tableName = "observation_period", -# data = data.frame(person_id = seq_len(100), -# observation_period_start_date = rep(as.Date("2000-01-01"), 100), -# observation_period_end_date = rep(as.Date(c("2000-06-01", "2001-12-31")), 50), -# period_type_concept_id = rep(0, 100)) -# ) -# insertTable( -# connection = connection, -# databaseSchema = cdmDatabaseSchema, -# tableName = "vocabulary", -# data = data.frame(vocabulary_id = c("a", "b"), -# vocabulary_name = c("a", "b"), -# vocabulary_reference= c("a", "b"), -# vocabulary_version = c("a", "b"), -# vocabulary_concpet_id = c(1, 2)) -# ) -# disconnect(connection) -# testServers[[length(testServers) + 1]] <- list( -# connectionDetails = connectionDetails, -# NULL, -# cdmDatabaseSchema = cdmDatabaseSchema, -# tempEmulationSchema = NULL -# ) + +# BigQuery +# To avoid rate limit on BigQuery, only test on 1 OS: +if (.Platform$OS.type == "windows") { + bqKeyFile <- tempfile(fileext = ".json") + writeLines(Sys.getenv("CDM_BIG_QUERY_KEY_FILE"), bqKeyFile) + if (testthat::is_testing()) { + withr::defer(unlink(bqKeyFile, force = TRUE), testthat::teardown_env()) + } + bqConnectionString <- gsub("", + normalizePath(bqKeyFile, winslash = "/"), + Sys.getenv("CDM_BIG_QUERY_CONNECTION_STRING")) + testServers[[length(testServers) + 1]] <- list( + connectionDetails = details <- createConnectionDetails( + dbms = "bigquery", + user = "", + password = "", + connectionString = !!bqConnectionString + ), + NULL, + cdmDatabaseSchema = Sys.getenv("CDM_BIG_QUERY_CDM_SCHEMA"), + tempEmulationSchema = Sys.getenv("CDM_BIG_QUERY_OHDSI_SCHEMA") + ) +} + +# SQLite +sqliteFile <- tempfile(fileext = ".sqlite") +if (testthat::is_testing()) { + withr::defer(unlink(sqliteFile, force = TRUE), testthat::teardown_env()) +} +cdmDatabaseSchema <- "main" +connectionDetails <- createConnectionDetails( + dbms = "sqlite", + server = sqliteFile +) +connection <- connect(connectionDetails) +insertTable( + connection = connection, + databaseSchema = cdmDatabaseSchema, + tableName = "person", + data = data.frame(person_id = seq_len(100), + year_of_birth = round(runif(100, 1900, 2000)), + race_concept_id = as.numeric(NA), + gender_concept_id = rep(c(8507, 8532), 50), + care_site_id = round(runif(100, 1, 1e7))) +) +insertTable( + connection = connection, + databaseSchema = cdmDatabaseSchema, + tableName = "observation_period", + data = data.frame(person_id = seq_len(100), + observation_period_start_date = rep(as.Date("2000-01-01"), 100), + observation_period_end_date = rep(as.Date(c("2000-06-01", "2001-12-31")), 50), + period_type_concept_id = rep(0, 100)) +) +insertTable( + connection = connection, + databaseSchema = cdmDatabaseSchema, + tableName = "vocabulary", + data = data.frame(vocabulary_id = c("a", "b"), + vocabulary_name = c("a", "b"), + vocabulary_reference= c("a", "b"), + vocabulary_version = c("a", "b"), + vocabulary_concpet_id = c(1, 2)) +) +disconnect(connection) +testServers[[length(testServers) + 1]] <- list( + connectionDetails = connectionDetails, + NULL, + cdmDatabaseSchema = cdmDatabaseSchema, + tempEmulationSchema = NULL +) + +# DuckDB +duckdbFile <- tempfile(fileext = ".duckdb") +if (testthat::is_testing()) { + withr::defer(unlink(duckdbFile, force = TRUE), testthat::teardown_env()) +} +cdmDatabaseSchema <- "main" +connectionDetails <- createConnectionDetails( + dbms = "duckdb", + server = duckdbFile +) +connection <- connect(connectionDetails) +insertTable( + connection = connection, + databaseSchema = cdmDatabaseSchema, + tableName = "person", + data = data.frame(person_id = seq_len(100), + year_of_birth = round(runif(100, 1900, 2000)), + race_concept_id = as.numeric(NA), + gender_concept_id = rep(c(8507, 8532), 50), + care_site_id = round(runif(100, 1, 1e7))) +) +insertTable( + connection = connection, + databaseSchema = cdmDatabaseSchema, + tableName = "observation_period", + data = data.frame(person_id = seq_len(100), + observation_period_start_date = rep(as.Date("2000-01-01"), 100), + observation_period_end_date = rep(as.Date(c("2000-06-01", "2001-12-31")), 50), + period_type_concept_id = rep(0, 100)) +) +insertTable( + connection = connection, + databaseSchema = cdmDatabaseSchema, + tableName = "vocabulary", + data = data.frame(vocabulary_id = c("a", "b"), + vocabulary_name = c("a", "b"), + vocabulary_reference= c("a", "b"), + vocabulary_version = c("a", "b"), + vocabulary_concpet_id = c(1, 2)) +) +disconnect(connection) +testServers[[length(testServers) + 1]] <- list( + connectionDetails = connectionDetails, + NULL, + cdmDatabaseSchema = cdmDatabaseSchema, + tempEmulationSchema = NULL +) From 297021114ced694767ef4116b197942bbc161b3b Mon Sep 17 00:00:00 2001 From: schuemie Date: Tue, 18 Jun 2024 14:15:16 +0200 Subject: [PATCH 19/26] Removing DuckDB from unit tests --- tests/testthat/setup.R | 92 +++++++++++++++++++++--------------------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/tests/testthat/setup.R b/tests/testthat/setup.R index d11efa41..a7dfc12e 100644 --- a/tests/testthat/setup.R +++ b/tests/testthat/setup.R @@ -220,49 +220,49 @@ testServers[[length(testServers) + 1]] <- list( ) # DuckDB -duckdbFile <- tempfile(fileext = ".duckdb") -if (testthat::is_testing()) { - withr::defer(unlink(duckdbFile, force = TRUE), testthat::teardown_env()) -} -cdmDatabaseSchema <- "main" -connectionDetails <- createConnectionDetails( - dbms = "duckdb", - server = duckdbFile -) -connection <- connect(connectionDetails) -insertTable( - connection = connection, - databaseSchema = cdmDatabaseSchema, - tableName = "person", - data = data.frame(person_id = seq_len(100), - year_of_birth = round(runif(100, 1900, 2000)), - race_concept_id = as.numeric(NA), - gender_concept_id = rep(c(8507, 8532), 50), - care_site_id = round(runif(100, 1, 1e7))) -) -insertTable( - connection = connection, - databaseSchema = cdmDatabaseSchema, - tableName = "observation_period", - data = data.frame(person_id = seq_len(100), - observation_period_start_date = rep(as.Date("2000-01-01"), 100), - observation_period_end_date = rep(as.Date(c("2000-06-01", "2001-12-31")), 50), - period_type_concept_id = rep(0, 100)) -) -insertTable( - connection = connection, - databaseSchema = cdmDatabaseSchema, - tableName = "vocabulary", - data = data.frame(vocabulary_id = c("a", "b"), - vocabulary_name = c("a", "b"), - vocabulary_reference= c("a", "b"), - vocabulary_version = c("a", "b"), - vocabulary_concpet_id = c(1, 2)) -) -disconnect(connection) -testServers[[length(testServers) + 1]] <- list( - connectionDetails = connectionDetails, - NULL, - cdmDatabaseSchema = cdmDatabaseSchema, - tempEmulationSchema = NULL -) +# duckdbFile <- tempfile(fileext = ".duckdb") +# if (testthat::is_testing()) { +# withr::defer(unlink(duckdbFile, force = TRUE), testthat::teardown_env()) +# } +# cdmDatabaseSchema <- "main" +# connectionDetails <- createConnectionDetails( +# dbms = "duckdb", +# server = duckdbFile +# ) +# connection <- connect(connectionDetails) +# insertTable( +# connection = connection, +# databaseSchema = cdmDatabaseSchema, +# tableName = "person", +# data = data.frame(person_id = seq_len(100), +# year_of_birth = round(runif(100, 1900, 2000)), +# race_concept_id = as.numeric(NA), +# gender_concept_id = rep(c(8507, 8532), 50), +# care_site_id = round(runif(100, 1, 1e7))) +# ) +# insertTable( +# connection = connection, +# databaseSchema = cdmDatabaseSchema, +# tableName = "observation_period", +# data = data.frame(person_id = seq_len(100), +# observation_period_start_date = rep(as.Date("2000-01-01"), 100), +# observation_period_end_date = rep(as.Date(c("2000-06-01", "2001-12-31")), 50), +# period_type_concept_id = rep(0, 100)) +# ) +# insertTable( +# connection = connection, +# databaseSchema = cdmDatabaseSchema, +# tableName = "vocabulary", +# data = data.frame(vocabulary_id = c("a", "b"), +# vocabulary_name = c("a", "b"), +# vocabulary_reference= c("a", "b"), +# vocabulary_version = c("a", "b"), +# vocabulary_concpet_id = c(1, 2)) +# ) +# disconnect(connection) +# testServers[[length(testServers) + 1]] <- list( +# connectionDetails = connectionDetails, +# NULL, +# cdmDatabaseSchema = cdmDatabaseSchema, +# tempEmulationSchema = NULL +# ) From abe8ae25d020714bf4c034231bec5e4f4b0cd615 Mon Sep 17 00:00:00 2001 From: schuemie Date: Tue, 18 Jun 2024 15:15:17 +0200 Subject: [PATCH 20/26] Disabling SQLite from unit tests --- tests/testthat/setup.R | 92 +++++++++++++++++++++--------------------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/tests/testthat/setup.R b/tests/testthat/setup.R index a7dfc12e..29c81d49 100644 --- a/tests/testthat/setup.R +++ b/tests/testthat/setup.R @@ -172,52 +172,52 @@ if (.Platform$OS.type == "windows") { } # SQLite -sqliteFile <- tempfile(fileext = ".sqlite") -if (testthat::is_testing()) { - withr::defer(unlink(sqliteFile, force = TRUE), testthat::teardown_env()) -} -cdmDatabaseSchema <- "main" -connectionDetails <- createConnectionDetails( - dbms = "sqlite", - server = sqliteFile -) -connection <- connect(connectionDetails) -insertTable( - connection = connection, - databaseSchema = cdmDatabaseSchema, - tableName = "person", - data = data.frame(person_id = seq_len(100), - year_of_birth = round(runif(100, 1900, 2000)), - race_concept_id = as.numeric(NA), - gender_concept_id = rep(c(8507, 8532), 50), - care_site_id = round(runif(100, 1, 1e7))) -) -insertTable( - connection = connection, - databaseSchema = cdmDatabaseSchema, - tableName = "observation_period", - data = data.frame(person_id = seq_len(100), - observation_period_start_date = rep(as.Date("2000-01-01"), 100), - observation_period_end_date = rep(as.Date(c("2000-06-01", "2001-12-31")), 50), - period_type_concept_id = rep(0, 100)) -) -insertTable( - connection = connection, - databaseSchema = cdmDatabaseSchema, - tableName = "vocabulary", - data = data.frame(vocabulary_id = c("a", "b"), - vocabulary_name = c("a", "b"), - vocabulary_reference= c("a", "b"), - vocabulary_version = c("a", "b"), - vocabulary_concpet_id = c(1, 2)) -) -disconnect(connection) -testServers[[length(testServers) + 1]] <- list( - connectionDetails = connectionDetails, - NULL, - cdmDatabaseSchema = cdmDatabaseSchema, - tempEmulationSchema = NULL -) +# sqliteFile <- tempfile(fileext = ".sqlite") +# if (testthat::is_testing()) { +# withr::defer(unlink(sqliteFile, force = TRUE), testthat::teardown_env()) +# } +# cdmDatabaseSchema <- "main" +# connectionDetails <- createConnectionDetails( +# dbms = "sqlite", +# server = sqliteFile +# ) +# connection <- connect(connectionDetails) +# insertTable( +# connection = connection, +# databaseSchema = cdmDatabaseSchema, +# tableName = "person", +# data = data.frame(person_id = seq_len(100), +# year_of_birth = round(runif(100, 1900, 2000)), +# race_concept_id = as.numeric(NA), +# gender_concept_id = rep(c(8507, 8532), 50), +# care_site_id = round(runif(100, 1, 1e7))) +# ) +# insertTable( +# connection = connection, +# databaseSchema = cdmDatabaseSchema, +# tableName = "observation_period", +# data = data.frame(person_id = seq_len(100), +# observation_period_start_date = rep(as.Date("2000-01-01"), 100), +# observation_period_end_date = rep(as.Date(c("2000-06-01", "2001-12-31")), 50), +# period_type_concept_id = rep(0, 100)) +# ) +# insertTable( +# connection = connection, +# databaseSchema = cdmDatabaseSchema, +# tableName = "vocabulary", +# data = data.frame(vocabulary_id = c("a", "b"), +# vocabulary_name = c("a", "b"), +# vocabulary_reference= c("a", "b"), +# vocabulary_version = c("a", "b"), +# vocabulary_concpet_id = c(1, 2)) +# ) +# disconnect(connection) +# testServers[[length(testServers) + 1]] <- list( +# connectionDetails = connectionDetails, +# NULL, +# cdmDatabaseSchema = cdmDatabaseSchema, +# tempEmulationSchema = NULL +# ) # DuckDB # duckdbFile <- tempfile(fileext = ".duckdb") From 94307d65a4dca1f4eae0e90307ddea9615709cf9 Mon Sep 17 00:00:00 2001 From: schuemie Date: Tue, 18 Jun 2024 15:35:03 +0200 Subject: [PATCH 21/26] Disabling installation of BQ driver --- tests/testthat/setup.R | 44 +++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/tests/testthat/setup.R b/tests/testthat/setup.R index 29c81d49..2ed3f3a1 100644 --- a/tests/testthat/setup.R +++ b/tests/testthat/setup.R @@ -11,7 +11,7 @@ if (Sys.getenv("DONT_DOWNLOAD_JDBC_DRIVERS", "") != "TRUE") { downloadJdbcDrivers("redshift") downloadJdbcDrivers("spark") downloadJdbcDrivers("snowflake") - downloadJdbcDrivers("bigquery") + # downloadJdbcDrivers("bigquery") if (testthat::is_testing()) { withr::defer({ @@ -149,27 +149,27 @@ testServers[[length(testServers) + 1]] <- list( # BigQuery # To avoid rate limit on BigQuery, only test on 1 OS: -if (.Platform$OS.type == "windows") { - bqKeyFile <- tempfile(fileext = ".json") - writeLines(Sys.getenv("CDM_BIG_QUERY_KEY_FILE"), bqKeyFile) - if (testthat::is_testing()) { - withr::defer(unlink(bqKeyFile, force = TRUE), testthat::teardown_env()) - } - bqConnectionString <- gsub("", - normalizePath(bqKeyFile, winslash = "/"), - Sys.getenv("CDM_BIG_QUERY_CONNECTION_STRING")) - testServers[[length(testServers) + 1]] <- list( - connectionDetails = details <- createConnectionDetails( - dbms = "bigquery", - user = "", - password = "", - connectionString = !!bqConnectionString - ), - NULL, - cdmDatabaseSchema = Sys.getenv("CDM_BIG_QUERY_CDM_SCHEMA"), - tempEmulationSchema = Sys.getenv("CDM_BIG_QUERY_OHDSI_SCHEMA") - ) -} +# if (.Platform$OS.type == "windows") { +# bqKeyFile <- tempfile(fileext = ".json") +# writeLines(Sys.getenv("CDM_BIG_QUERY_KEY_FILE"), bqKeyFile) +# if (testthat::is_testing()) { +# withr::defer(unlink(bqKeyFile, force = TRUE), testthat::teardown_env()) +# } +# bqConnectionString <- gsub("", +# normalizePath(bqKeyFile, winslash = "/"), +# Sys.getenv("CDM_BIG_QUERY_CONNECTION_STRING")) +# testServers[[length(testServers) + 1]] <- list( +# connectionDetails = details <- createConnectionDetails( +# dbms = "bigquery", +# user = "", +# password = "", +# connectionString = !!bqConnectionString +# ), +# NULL, +# cdmDatabaseSchema = Sys.getenv("CDM_BIG_QUERY_CDM_SCHEMA"), +# tempEmulationSchema = Sys.getenv("CDM_BIG_QUERY_OHDSI_SCHEMA") +# ) +# } # SQLite # sqliteFile <- tempfile(fileext = ".sqlite") From ebb165b61f3728968516f039702dbd346d412922 Mon Sep 17 00:00:00 2001 From: schuemie Date: Tue, 18 Jun 2024 15:58:07 +0200 Subject: [PATCH 22/26] Re-enabling all DBMSs. Only install BQ driver on Windows --- tests/testthat/setup.R | 188 +++++++++++++++++++++-------------------- 1 file changed, 95 insertions(+), 93 deletions(-) diff --git a/tests/testthat/setup.R b/tests/testthat/setup.R index 2ed3f3a1..d3993f00 100644 --- a/tests/testthat/setup.R +++ b/tests/testthat/setup.R @@ -11,7 +11,9 @@ if (Sys.getenv("DONT_DOWNLOAD_JDBC_DRIVERS", "") != "TRUE") { downloadJdbcDrivers("redshift") downloadJdbcDrivers("spark") downloadJdbcDrivers("snowflake") - # downloadJdbcDrivers("bigquery") + if (.Platform$OS.type == "windows") { + downloadJdbcDrivers("bigquery") + } if (testthat::is_testing()) { withr::defer({ @@ -172,97 +174,97 @@ testServers[[length(testServers) + 1]] <- list( # } # SQLite -# sqliteFile <- tempfile(fileext = ".sqlite") -# if (testthat::is_testing()) { -# withr::defer(unlink(sqliteFile, force = TRUE), testthat::teardown_env()) -# } -# cdmDatabaseSchema <- "main" -# connectionDetails <- createConnectionDetails( -# dbms = "sqlite", -# server = sqliteFile -# ) -# connection <- connect(connectionDetails) -# insertTable( -# connection = connection, -# databaseSchema = cdmDatabaseSchema, -# tableName = "person", -# data = data.frame(person_id = seq_len(100), -# year_of_birth = round(runif(100, 1900, 2000)), -# race_concept_id = as.numeric(NA), -# gender_concept_id = rep(c(8507, 8532), 50), -# care_site_id = round(runif(100, 1, 1e7))) -# ) -# insertTable( -# connection = connection, -# databaseSchema = cdmDatabaseSchema, -# tableName = "observation_period", -# data = data.frame(person_id = seq_len(100), -# observation_period_start_date = rep(as.Date("2000-01-01"), 100), -# observation_period_end_date = rep(as.Date(c("2000-06-01", "2001-12-31")), 50), -# period_type_concept_id = rep(0, 100)) -# ) -# insertTable( -# connection = connection, -# databaseSchema = cdmDatabaseSchema, -# tableName = "vocabulary", -# data = data.frame(vocabulary_id = c("a", "b"), -# vocabulary_name = c("a", "b"), -# vocabulary_reference= c("a", "b"), -# vocabulary_version = c("a", "b"), -# vocabulary_concpet_id = c(1, 2)) -# ) -# disconnect(connection) -# testServers[[length(testServers) + 1]] <- list( -# connectionDetails = connectionDetails, -# NULL, -# cdmDatabaseSchema = cdmDatabaseSchema, -# tempEmulationSchema = NULL -# ) +sqliteFile <- tempfile(fileext = ".sqlite") +if (testthat::is_testing()) { + withr::defer(unlink(sqliteFile, force = TRUE), testthat::teardown_env()) +} +cdmDatabaseSchema <- "main" +connectionDetails <- createConnectionDetails( + dbms = "sqlite", + server = sqliteFile +) +connection <- connect(connectionDetails) +insertTable( + connection = connection, + databaseSchema = cdmDatabaseSchema, + tableName = "person", + data = data.frame(person_id = seq_len(100), + year_of_birth = round(runif(100, 1900, 2000)), + race_concept_id = as.numeric(NA), + gender_concept_id = rep(c(8507, 8532), 50), + care_site_id = round(runif(100, 1, 1e7))) +) +insertTable( + connection = connection, + databaseSchema = cdmDatabaseSchema, + tableName = "observation_period", + data = data.frame(person_id = seq_len(100), + observation_period_start_date = rep(as.Date("2000-01-01"), 100), + observation_period_end_date = rep(as.Date(c("2000-06-01", "2001-12-31")), 50), + period_type_concept_id = rep(0, 100)) +) +insertTable( + connection = connection, + databaseSchema = cdmDatabaseSchema, + tableName = "vocabulary", + data = data.frame(vocabulary_id = c("a", "b"), + vocabulary_name = c("a", "b"), + vocabulary_reference= c("a", "b"), + vocabulary_version = c("a", "b"), + vocabulary_concpet_id = c(1, 2)) +) +disconnect(connection) +testServers[[length(testServers) + 1]] <- list( + connectionDetails = connectionDetails, + NULL, + cdmDatabaseSchema = cdmDatabaseSchema, + tempEmulationSchema = NULL +) # DuckDB -# duckdbFile <- tempfile(fileext = ".duckdb") -# if (testthat::is_testing()) { -# withr::defer(unlink(duckdbFile, force = TRUE), testthat::teardown_env()) -# } -# cdmDatabaseSchema <- "main" -# connectionDetails <- createConnectionDetails( -# dbms = "duckdb", -# server = duckdbFile -# ) -# connection <- connect(connectionDetails) -# insertTable( -# connection = connection, -# databaseSchema = cdmDatabaseSchema, -# tableName = "person", -# data = data.frame(person_id = seq_len(100), -# year_of_birth = round(runif(100, 1900, 2000)), -# race_concept_id = as.numeric(NA), -# gender_concept_id = rep(c(8507, 8532), 50), -# care_site_id = round(runif(100, 1, 1e7))) -# ) -# insertTable( -# connection = connection, -# databaseSchema = cdmDatabaseSchema, -# tableName = "observation_period", -# data = data.frame(person_id = seq_len(100), -# observation_period_start_date = rep(as.Date("2000-01-01"), 100), -# observation_period_end_date = rep(as.Date(c("2000-06-01", "2001-12-31")), 50), -# period_type_concept_id = rep(0, 100)) -# ) -# insertTable( -# connection = connection, -# databaseSchema = cdmDatabaseSchema, -# tableName = "vocabulary", -# data = data.frame(vocabulary_id = c("a", "b"), -# vocabulary_name = c("a", "b"), -# vocabulary_reference= c("a", "b"), -# vocabulary_version = c("a", "b"), -# vocabulary_concpet_id = c(1, 2)) -# ) -# disconnect(connection) -# testServers[[length(testServers) + 1]] <- list( -# connectionDetails = connectionDetails, -# NULL, -# cdmDatabaseSchema = cdmDatabaseSchema, -# tempEmulationSchema = NULL -# ) +duckdbFile <- tempfile(fileext = ".duckdb") +if (testthat::is_testing()) { + withr::defer(unlink(duckdbFile, force = TRUE), testthat::teardown_env()) +} +cdmDatabaseSchema <- "main" +connectionDetails <- createConnectionDetails( + dbms = "duckdb", + server = duckdbFile +) +connection <- connect(connectionDetails) +insertTable( + connection = connection, + databaseSchema = cdmDatabaseSchema, + tableName = "person", + data = data.frame(person_id = seq_len(100), + year_of_birth = round(runif(100, 1900, 2000)), + race_concept_id = as.numeric(NA), + gender_concept_id = rep(c(8507, 8532), 50), + care_site_id = round(runif(100, 1, 1e7))) +) +insertTable( + connection = connection, + databaseSchema = cdmDatabaseSchema, + tableName = "observation_period", + data = data.frame(person_id = seq_len(100), + observation_period_start_date = rep(as.Date("2000-01-01"), 100), + observation_period_end_date = rep(as.Date(c("2000-06-01", "2001-12-31")), 50), + period_type_concept_id = rep(0, 100)) +) +insertTable( + connection = connection, + databaseSchema = cdmDatabaseSchema, + tableName = "vocabulary", + data = data.frame(vocabulary_id = c("a", "b"), + vocabulary_name = c("a", "b"), + vocabulary_reference= c("a", "b"), + vocabulary_version = c("a", "b"), + vocabulary_concpet_id = c(1, 2)) +) +disconnect(connection) +testServers[[length(testServers) + 1]] <- list( + connectionDetails = connectionDetails, + NULL, + cdmDatabaseSchema = cdmDatabaseSchema, + tempEmulationSchema = NULL +) From 9c3074b5243a9636ba2a757efb3bd780ff33951a Mon Sep 17 00:00:00 2001 From: schuemie Date: Wed, 19 Jun 2024 06:03:19 +0200 Subject: [PATCH 23/26] Disabling SQLite and DuckDB again --- tests/testthat/setup.R | 188 ++++++++++++++++++++--------------------- 1 file changed, 94 insertions(+), 94 deletions(-) diff --git a/tests/testthat/setup.R b/tests/testthat/setup.R index d3993f00..09d13d78 100644 --- a/tests/testthat/setup.R +++ b/tests/testthat/setup.R @@ -174,97 +174,97 @@ testServers[[length(testServers) + 1]] <- list( # } # SQLite -sqliteFile <- tempfile(fileext = ".sqlite") -if (testthat::is_testing()) { - withr::defer(unlink(sqliteFile, force = TRUE), testthat::teardown_env()) -} -cdmDatabaseSchema <- "main" -connectionDetails <- createConnectionDetails( - dbms = "sqlite", - server = sqliteFile -) -connection <- connect(connectionDetails) -insertTable( - connection = connection, - databaseSchema = cdmDatabaseSchema, - tableName = "person", - data = data.frame(person_id = seq_len(100), - year_of_birth = round(runif(100, 1900, 2000)), - race_concept_id = as.numeric(NA), - gender_concept_id = rep(c(8507, 8532), 50), - care_site_id = round(runif(100, 1, 1e7))) -) -insertTable( - connection = connection, - databaseSchema = cdmDatabaseSchema, - tableName = "observation_period", - data = data.frame(person_id = seq_len(100), - observation_period_start_date = rep(as.Date("2000-01-01"), 100), - observation_period_end_date = rep(as.Date(c("2000-06-01", "2001-12-31")), 50), - period_type_concept_id = rep(0, 100)) -) -insertTable( - connection = connection, - databaseSchema = cdmDatabaseSchema, - tableName = "vocabulary", - data = data.frame(vocabulary_id = c("a", "b"), - vocabulary_name = c("a", "b"), - vocabulary_reference= c("a", "b"), - vocabulary_version = c("a", "b"), - vocabulary_concpet_id = c(1, 2)) -) -disconnect(connection) -testServers[[length(testServers) + 1]] <- list( - connectionDetails = connectionDetails, - NULL, - cdmDatabaseSchema = cdmDatabaseSchema, - tempEmulationSchema = NULL -) - -# DuckDB -duckdbFile <- tempfile(fileext = ".duckdb") -if (testthat::is_testing()) { - withr::defer(unlink(duckdbFile, force = TRUE), testthat::teardown_env()) -} -cdmDatabaseSchema <- "main" -connectionDetails <- createConnectionDetails( - dbms = "duckdb", - server = duckdbFile -) -connection <- connect(connectionDetails) -insertTable( - connection = connection, - databaseSchema = cdmDatabaseSchema, - tableName = "person", - data = data.frame(person_id = seq_len(100), - year_of_birth = round(runif(100, 1900, 2000)), - race_concept_id = as.numeric(NA), - gender_concept_id = rep(c(8507, 8532), 50), - care_site_id = round(runif(100, 1, 1e7))) -) -insertTable( - connection = connection, - databaseSchema = cdmDatabaseSchema, - tableName = "observation_period", - data = data.frame(person_id = seq_len(100), - observation_period_start_date = rep(as.Date("2000-01-01"), 100), - observation_period_end_date = rep(as.Date(c("2000-06-01", "2001-12-31")), 50), - period_type_concept_id = rep(0, 100)) -) -insertTable( - connection = connection, - databaseSchema = cdmDatabaseSchema, - tableName = "vocabulary", - data = data.frame(vocabulary_id = c("a", "b"), - vocabulary_name = c("a", "b"), - vocabulary_reference= c("a", "b"), - vocabulary_version = c("a", "b"), - vocabulary_concpet_id = c(1, 2)) -) -disconnect(connection) -testServers[[length(testServers) + 1]] <- list( - connectionDetails = connectionDetails, - NULL, - cdmDatabaseSchema = cdmDatabaseSchema, - tempEmulationSchema = NULL -) +# sqliteFile <- tempfile(fileext = ".sqlite") +# if (testthat::is_testing()) { +# withr::defer(unlink(sqliteFile, force = TRUE), testthat::teardown_env()) +# } +# cdmDatabaseSchema <- "main" +# connectionDetails <- createConnectionDetails( +# dbms = "sqlite", +# server = sqliteFile +# ) +# connection <- connect(connectionDetails) +# insertTable( +# connection = connection, +# databaseSchema = cdmDatabaseSchema, +# tableName = "person", +# data = data.frame(person_id = seq_len(100), +# year_of_birth = round(runif(100, 1900, 2000)), +# race_concept_id = as.numeric(NA), +# gender_concept_id = rep(c(8507, 8532), 50), +# care_site_id = round(runif(100, 1, 1e7))) +# ) +# insertTable( +# connection = connection, +# databaseSchema = cdmDatabaseSchema, +# tableName = "observation_period", +# data = data.frame(person_id = seq_len(100), +# observation_period_start_date = rep(as.Date("2000-01-01"), 100), +# observation_period_end_date = rep(as.Date(c("2000-06-01", "2001-12-31")), 50), +# period_type_concept_id = rep(0, 100)) +# ) +# insertTable( +# connection = connection, +# databaseSchema = cdmDatabaseSchema, +# tableName = "vocabulary", +# data = data.frame(vocabulary_id = c("a", "b"), +# vocabulary_name = c("a", "b"), +# vocabulary_reference= c("a", "b"), +# vocabulary_version = c("a", "b"), +# vocabulary_concpet_id = c(1, 2)) +# ) +# disconnect(connection) +# testServers[[length(testServers) + 1]] <- list( +# connectionDetails = connectionDetails, +# NULL, +# cdmDatabaseSchema = cdmDatabaseSchema, +# tempEmulationSchema = NULL +# ) +# +# # DuckDB +# duckdbFile <- tempfile(fileext = ".duckdb") +# if (testthat::is_testing()) { +# withr::defer(unlink(duckdbFile, force = TRUE), testthat::teardown_env()) +# } +# cdmDatabaseSchema <- "main" +# connectionDetails <- createConnectionDetails( +# dbms = "duckdb", +# server = duckdbFile +# ) +# connection <- connect(connectionDetails) +# insertTable( +# connection = connection, +# databaseSchema = cdmDatabaseSchema, +# tableName = "person", +# data = data.frame(person_id = seq_len(100), +# year_of_birth = round(runif(100, 1900, 2000)), +# race_concept_id = as.numeric(NA), +# gender_concept_id = rep(c(8507, 8532), 50), +# care_site_id = round(runif(100, 1, 1e7))) +# ) +# insertTable( +# connection = connection, +# databaseSchema = cdmDatabaseSchema, +# tableName = "observation_period", +# data = data.frame(person_id = seq_len(100), +# observation_period_start_date = rep(as.Date("2000-01-01"), 100), +# observation_period_end_date = rep(as.Date(c("2000-06-01", "2001-12-31")), 50), +# period_type_concept_id = rep(0, 100)) +# ) +# insertTable( +# connection = connection, +# databaseSchema = cdmDatabaseSchema, +# tableName = "vocabulary", +# data = data.frame(vocabulary_id = c("a", "b"), +# vocabulary_name = c("a", "b"), +# vocabulary_reference= c("a", "b"), +# vocabulary_version = c("a", "b"), +# vocabulary_concpet_id = c(1, 2)) +# ) +# disconnect(connection) +# testServers[[length(testServers) + 1]] <- list( +# connectionDetails = connectionDetails, +# NULL, +# cdmDatabaseSchema = cdmDatabaseSchema, +# tempEmulationSchema = NULL +# ) From 9838bea074df33369f43b97bae9e34daaf83092e Mon Sep 17 00:00:00 2001 From: schuemie Date: Wed, 19 Jun 2024 08:25:59 +0200 Subject: [PATCH 24/26] Reverting to last non-failing state --- tests/testthat/setup.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/testthat/setup.R b/tests/testthat/setup.R index 09d13d78..5e258aa9 100644 --- a/tests/testthat/setup.R +++ b/tests/testthat/setup.R @@ -11,9 +11,9 @@ if (Sys.getenv("DONT_DOWNLOAD_JDBC_DRIVERS", "") != "TRUE") { downloadJdbcDrivers("redshift") downloadJdbcDrivers("spark") downloadJdbcDrivers("snowflake") - if (.Platform$OS.type == "windows") { - downloadJdbcDrivers("bigquery") - } + # if (.Platform$OS.type == "windows") { + # downloadJdbcDrivers("bigquery") + # } if (testthat::is_testing()) { withr::defer({ From ae17ee599a802626fc993593489992aed79e42ae Mon Sep 17 00:00:00 2001 From: schuemie Date: Fri, 21 Jun 2024 11:34:40 +0200 Subject: [PATCH 25/26] Enabling all but Databricks --- tests/testthat/setup.R | 260 ++++++++++++++++++++--------------------- 1 file changed, 130 insertions(+), 130 deletions(-) diff --git a/tests/testthat/setup.R b/tests/testthat/setup.R index 5e258aa9..3a721a20 100644 --- a/tests/testthat/setup.R +++ b/tests/testthat/setup.R @@ -9,11 +9,11 @@ if (Sys.getenv("DONT_DOWNLOAD_JDBC_DRIVERS", "") != "TRUE") { downloadJdbcDrivers("sql server") downloadJdbcDrivers("oracle") downloadJdbcDrivers("redshift") - downloadJdbcDrivers("spark") + # downloadJdbcDrivers("spark") downloadJdbcDrivers("snowflake") - # if (.Platform$OS.type == "windows") { - # downloadJdbcDrivers("bigquery") - # } + if (.Platform$OS.type == "windows") { + downloadJdbcDrivers("bigquery") + } if (testthat::is_testing()) { withr::defer({ @@ -137,134 +137,134 @@ testServers[[length(testServers) + 1]] <- list( ) # # Databricks (Spark) -testServers[[length(testServers) + 1]] <- list( - connectionDetails = details <- createConnectionDetails( - dbms = "spark", - user = Sys.getenv("CDM5_SPARK_USER"), - password = URLdecode(Sys.getenv("CDM5_SPARK_PASSWORD")), - connectionString = Sys.getenv("CDM5_SPARK_CONNECTION_STRING") - ), - NULL, - cdmDatabaseSchema = Sys.getenv("CDM5_SPARK_CDM_SCHEMA"), - tempEmulationSchema = Sys.getenv("CDM5_SPARK_OHDSI_SCHEMA") -) +# testServers[[length(testServers) + 1]] <- list( +# connectionDetails = details <- createConnectionDetails( +# dbms = "spark", +# user = Sys.getenv("CDM5_SPARK_USER"), +# password = URLdecode(Sys.getenv("CDM5_SPARK_PASSWORD")), +# connectionString = Sys.getenv("CDM5_SPARK_CONNECTION_STRING") +# ), +# NULL, +# cdmDatabaseSchema = Sys.getenv("CDM5_SPARK_CDM_SCHEMA"), +# tempEmulationSchema = Sys.getenv("CDM5_SPARK_OHDSI_SCHEMA") +# ) # BigQuery # To avoid rate limit on BigQuery, only test on 1 OS: -# if (.Platform$OS.type == "windows") { -# bqKeyFile <- tempfile(fileext = ".json") -# writeLines(Sys.getenv("CDM_BIG_QUERY_KEY_FILE"), bqKeyFile) -# if (testthat::is_testing()) { -# withr::defer(unlink(bqKeyFile, force = TRUE), testthat::teardown_env()) -# } -# bqConnectionString <- gsub("", -# normalizePath(bqKeyFile, winslash = "/"), -# Sys.getenv("CDM_BIG_QUERY_CONNECTION_STRING")) -# testServers[[length(testServers) + 1]] <- list( -# connectionDetails = details <- createConnectionDetails( -# dbms = "bigquery", -# user = "", -# password = "", -# connectionString = !!bqConnectionString -# ), -# NULL, -# cdmDatabaseSchema = Sys.getenv("CDM_BIG_QUERY_CDM_SCHEMA"), -# tempEmulationSchema = Sys.getenv("CDM_BIG_QUERY_OHDSI_SCHEMA") -# ) -# } +if (.Platform$OS.type == "windows") { + bqKeyFile <- tempfile(fileext = ".json") + writeLines(Sys.getenv("CDM_BIG_QUERY_KEY_FILE"), bqKeyFile) + if (testthat::is_testing()) { + withr::defer(unlink(bqKeyFile, force = TRUE), testthat::teardown_env()) + } + bqConnectionString <- gsub("", + normalizePath(bqKeyFile, winslash = "/"), + Sys.getenv("CDM_BIG_QUERY_CONNECTION_STRING")) + testServers[[length(testServers) + 1]] <- list( + connectionDetails = details <- createConnectionDetails( + dbms = "bigquery", + user = "", + password = "", + connectionString = !!bqConnectionString + ), + NULL, + cdmDatabaseSchema = Sys.getenv("CDM_BIG_QUERY_CDM_SCHEMA"), + tempEmulationSchema = Sys.getenv("CDM_BIG_QUERY_OHDSI_SCHEMA") + ) +} # SQLite -# sqliteFile <- tempfile(fileext = ".sqlite") -# if (testthat::is_testing()) { -# withr::defer(unlink(sqliteFile, force = TRUE), testthat::teardown_env()) -# } -# cdmDatabaseSchema <- "main" -# connectionDetails <- createConnectionDetails( -# dbms = "sqlite", -# server = sqliteFile -# ) -# connection <- connect(connectionDetails) -# insertTable( -# connection = connection, -# databaseSchema = cdmDatabaseSchema, -# tableName = "person", -# data = data.frame(person_id = seq_len(100), -# year_of_birth = round(runif(100, 1900, 2000)), -# race_concept_id = as.numeric(NA), -# gender_concept_id = rep(c(8507, 8532), 50), -# care_site_id = round(runif(100, 1, 1e7))) -# ) -# insertTable( -# connection = connection, -# databaseSchema = cdmDatabaseSchema, -# tableName = "observation_period", -# data = data.frame(person_id = seq_len(100), -# observation_period_start_date = rep(as.Date("2000-01-01"), 100), -# observation_period_end_date = rep(as.Date(c("2000-06-01", "2001-12-31")), 50), -# period_type_concept_id = rep(0, 100)) -# ) -# insertTable( -# connection = connection, -# databaseSchema = cdmDatabaseSchema, -# tableName = "vocabulary", -# data = data.frame(vocabulary_id = c("a", "b"), -# vocabulary_name = c("a", "b"), -# vocabulary_reference= c("a", "b"), -# vocabulary_version = c("a", "b"), -# vocabulary_concpet_id = c(1, 2)) -# ) -# disconnect(connection) -# testServers[[length(testServers) + 1]] <- list( -# connectionDetails = connectionDetails, -# NULL, -# cdmDatabaseSchema = cdmDatabaseSchema, -# tempEmulationSchema = NULL -# ) -# -# # DuckDB -# duckdbFile <- tempfile(fileext = ".duckdb") -# if (testthat::is_testing()) { -# withr::defer(unlink(duckdbFile, force = TRUE), testthat::teardown_env()) -# } -# cdmDatabaseSchema <- "main" -# connectionDetails <- createConnectionDetails( -# dbms = "duckdb", -# server = duckdbFile -# ) -# connection <- connect(connectionDetails) -# insertTable( -# connection = connection, -# databaseSchema = cdmDatabaseSchema, -# tableName = "person", -# data = data.frame(person_id = seq_len(100), -# year_of_birth = round(runif(100, 1900, 2000)), -# race_concept_id = as.numeric(NA), -# gender_concept_id = rep(c(8507, 8532), 50), -# care_site_id = round(runif(100, 1, 1e7))) -# ) -# insertTable( -# connection = connection, -# databaseSchema = cdmDatabaseSchema, -# tableName = "observation_period", -# data = data.frame(person_id = seq_len(100), -# observation_period_start_date = rep(as.Date("2000-01-01"), 100), -# observation_period_end_date = rep(as.Date(c("2000-06-01", "2001-12-31")), 50), -# period_type_concept_id = rep(0, 100)) -# ) -# insertTable( -# connection = connection, -# databaseSchema = cdmDatabaseSchema, -# tableName = "vocabulary", -# data = data.frame(vocabulary_id = c("a", "b"), -# vocabulary_name = c("a", "b"), -# vocabulary_reference= c("a", "b"), -# vocabulary_version = c("a", "b"), -# vocabulary_concpet_id = c(1, 2)) -# ) -# disconnect(connection) -# testServers[[length(testServers) + 1]] <- list( -# connectionDetails = connectionDetails, -# NULL, -# cdmDatabaseSchema = cdmDatabaseSchema, -# tempEmulationSchema = NULL -# ) +sqliteFile <- tempfile(fileext = ".sqlite") +if (testthat::is_testing()) { + withr::defer(unlink(sqliteFile, force = TRUE), testthat::teardown_env()) +} +cdmDatabaseSchema <- "main" +connectionDetails <- createConnectionDetails( + dbms = "sqlite", + server = sqliteFile +) +connection <- connect(connectionDetails) +insertTable( + connection = connection, + databaseSchema = cdmDatabaseSchema, + tableName = "person", + data = data.frame(person_id = seq_len(100), + year_of_birth = round(runif(100, 1900, 2000)), + race_concept_id = as.numeric(NA), + gender_concept_id = rep(c(8507, 8532), 50), + care_site_id = round(runif(100, 1, 1e7))) +) +insertTable( + connection = connection, + databaseSchema = cdmDatabaseSchema, + tableName = "observation_period", + data = data.frame(person_id = seq_len(100), + observation_period_start_date = rep(as.Date("2000-01-01"), 100), + observation_period_end_date = rep(as.Date(c("2000-06-01", "2001-12-31")), 50), + period_type_concept_id = rep(0, 100)) +) +insertTable( + connection = connection, + databaseSchema = cdmDatabaseSchema, + tableName = "vocabulary", + data = data.frame(vocabulary_id = c("a", "b"), + vocabulary_name = c("a", "b"), + vocabulary_reference= c("a", "b"), + vocabulary_version = c("a", "b"), + vocabulary_concpet_id = c(1, 2)) +) +disconnect(connection) +testServers[[length(testServers) + 1]] <- list( + connectionDetails = connectionDetails, + NULL, + cdmDatabaseSchema = cdmDatabaseSchema, + tempEmulationSchema = NULL +) + +# DuckDB +duckdbFile <- tempfile(fileext = ".duckdb") +if (testthat::is_testing()) { + withr::defer(unlink(duckdbFile, force = TRUE), testthat::teardown_env()) +} +cdmDatabaseSchema <- "main" +connectionDetails <- createConnectionDetails( + dbms = "duckdb", + server = duckdbFile +) +connection <- connect(connectionDetails) +insertTable( + connection = connection, + databaseSchema = cdmDatabaseSchema, + tableName = "person", + data = data.frame(person_id = seq_len(100), + year_of_birth = round(runif(100, 1900, 2000)), + race_concept_id = as.numeric(NA), + gender_concept_id = rep(c(8507, 8532), 50), + care_site_id = round(runif(100, 1, 1e7))) +) +insertTable( + connection = connection, + databaseSchema = cdmDatabaseSchema, + tableName = "observation_period", + data = data.frame(person_id = seq_len(100), + observation_period_start_date = rep(as.Date("2000-01-01"), 100), + observation_period_end_date = rep(as.Date(c("2000-06-01", "2001-12-31")), 50), + period_type_concept_id = rep(0, 100)) +) +insertTable( + connection = connection, + databaseSchema = cdmDatabaseSchema, + tableName = "vocabulary", + data = data.frame(vocabulary_id = c("a", "b"), + vocabulary_name = c("a", "b"), + vocabulary_reference= c("a", "b"), + vocabulary_version = c("a", "b"), + vocabulary_concpet_id = c(1, 2)) +) +disconnect(connection) +testServers[[length(testServers) + 1]] <- list( + connectionDetails = connectionDetails, + NULL, + cdmDatabaseSchema = cdmDatabaseSchema, + tempEmulationSchema = NULL +) From 5169a00ba285048383752184cba4e379d59ba801 Mon Sep 17 00:00:00 2001 From: schuemie Date: Fri, 21 Jun 2024 13:23:40 +0200 Subject: [PATCH 26/26] Reenabling Databricks --- tests/testthat/setup.R | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/testthat/setup.R b/tests/testthat/setup.R index 3a721a20..1529823d 100644 --- a/tests/testthat/setup.R +++ b/tests/testthat/setup.R @@ -9,7 +9,7 @@ if (Sys.getenv("DONT_DOWNLOAD_JDBC_DRIVERS", "") != "TRUE") { downloadJdbcDrivers("sql server") downloadJdbcDrivers("oracle") downloadJdbcDrivers("redshift") - # downloadJdbcDrivers("spark") + downloadJdbcDrivers("spark") downloadJdbcDrivers("snowflake") if (.Platform$OS.type == "windows") { downloadJdbcDrivers("bigquery") @@ -136,18 +136,18 @@ testServers[[length(testServers) + 1]] <- list( tempEmulationSchema = Sys.getenv("CDM_SNOWFLAKE_OHDSI_SCHEMA") ) -# # Databricks (Spark) -# testServers[[length(testServers) + 1]] <- list( -# connectionDetails = details <- createConnectionDetails( -# dbms = "spark", -# user = Sys.getenv("CDM5_SPARK_USER"), -# password = URLdecode(Sys.getenv("CDM5_SPARK_PASSWORD")), -# connectionString = Sys.getenv("CDM5_SPARK_CONNECTION_STRING") -# ), -# NULL, -# cdmDatabaseSchema = Sys.getenv("CDM5_SPARK_CDM_SCHEMA"), -# tempEmulationSchema = Sys.getenv("CDM5_SPARK_OHDSI_SCHEMA") -# ) +# Databricks (Spark) +testServers[[length(testServers) + 1]] <- list( + connectionDetails = details <- createConnectionDetails( + dbms = "spark", + user = Sys.getenv("CDM5_SPARK_USER"), + password = URLdecode(Sys.getenv("CDM5_SPARK_PASSWORD")), + connectionString = Sys.getenv("CDM5_SPARK_CONNECTION_STRING") + ), + NULL, + cdmDatabaseSchema = Sys.getenv("CDM5_SPARK_CDM_SCHEMA"), + tempEmulationSchema = Sys.getenv("CDM5_SPARK_OHDSI_SCHEMA") +) # BigQuery # To avoid rate limit on BigQuery, only test on 1 OS: