diff --git a/DESCRIPTION b/DESCRIPTION index 910a09e7..0f0e746c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: DataQualityDashboard Type: Package Title: Execute and View Data Quality Checks on OMOP CDM Database -Version: 2.4.1 -Date: 2023-10-18 +Version: 2.5.0 +Date: 2023-11-04 Authors@R: c( person("Katy", "Sadowski", email = "sadowski@ohdsi.org", role = c("aut", "cre")), person("Clair", "Blacketer", role = c("aut")), diff --git a/R/executeDqChecks.R b/R/executeDqChecks.R index 29082f33..178e0ab4 100644 --- a/R/executeDqChecks.R +++ b/R/executeDqChecks.R @@ -93,7 +93,7 @@ executeDqChecks <- function(connectionDetails, if (!str_detect(cdmVersion, regex(acceptedCdmRegex))) { stop("cdmVersion must contain a version of the form '5.X' where X is an integer between 2 and 4 inclusive.") } - + if (sqlOnlyIncrementalInsert == TRUE && sqlOnly == FALSE) { stop("Set `sqlOnly` to TRUE in order to use `sqlOnlyIncrementalInsert` mode.") } @@ -139,7 +139,7 @@ executeDqChecks <- function(connectionDetails, stop("Please populate the cdm_source table before executing data quality checks.") } if (nrow(metadata) > 1) { - metadata <- metadata[1,] + metadata <- metadata[1, ] warning("The cdm_source table has more than 1 row. A single row from this table has been selected to populate DQD metadata.") } metadata$dqdVersion <- as.character(packageVersion("DataQualityDashboard")) diff --git a/R/writeDBResultsTo.R b/R/writeDBResultsTo.R index 39ef902f..2b4e446a 100644 --- a/R/writeDBResultsTo.R +++ b/R/writeDBResultsTo.R @@ -27,52 +27,51 @@ #' writeDBResultsToJson <- function(connection, - resultsDatabaseSchema, - cdmDatabaseSchema, - writeTableName, - outputFolder, - outputFile) { - metadata <- DatabaseConnector::renderTranslateQuerySql( - connection, - sql = "select * from @cdmDatabaseSchema.cdm_source;", - snakeCaseToCamelCase = TRUE, - cdmDatabaseSchema = cdmDatabaseSchema - ) + resultsDatabaseSchema, + cdmDatabaseSchema, + writeTableName, + outputFolder, + outputFile) { + metadata <- DatabaseConnector::renderTranslateQuerySql( + connection, + sql = "select * from @cdmDatabaseSchema.cdm_source;", + snakeCaseToCamelCase = TRUE, + cdmDatabaseSchema = cdmDatabaseSchema + ) - checkResults <- DatabaseConnector::renderTranslateQuerySql( - connection, - sql = "select * from @resultsDatabaseSchema.@writeTableName;", - snakeCaseToCamelCase = TRUE, - resultsDatabaseSchema = resultsDatabaseSchema, - writeTableName = writeTableName - ) + checkResults <- DatabaseConnector::renderTranslateQuerySql( + connection, + sql = "select * from @resultsDatabaseSchema.@writeTableName;", + snakeCaseToCamelCase = TRUE, + resultsDatabaseSchema = resultsDatabaseSchema, + writeTableName = writeTableName + ) - # Quick patch for missing value issues related to SQL Only Implementation - checkResults["error"][checkResults["error"] == ''] <- NA - checkResults["warning"][checkResults["warning"] == ''] <- NA - checkResults["executionTime"][checkResults["executionTime"] == ''] <- '0 secs' - checkResults["queryText"][checkResults["queryText"] == ''] <- '[Generated via SQL Only]' + # Quick patch for missing value issues related to SQL Only Implementation + checkResults["error"][checkResults["error"] == ""] <- NA + checkResults["warning"][checkResults["warning"] == ""] <- NA + checkResults["executionTime"][checkResults["executionTime"] == ""] <- "0 secs" + checkResults["queryText"][checkResults["queryText"] == ""] <- "[Generated via SQL Only]" - overview <- .summarizeResults( - checkResults = checkResults - ) + overview <- .summarizeResults( + checkResults = checkResults + ) - # Quick patch for non-camel-case column name - names(checkResults)[names(checkResults) == "checkid"] <- "checkId" + # Quick patch for non-camel-case column name + names(checkResults)[names(checkResults) == "checkid"] <- "checkId" - allResults <- list( - startTimestamp = Sys.time(), - endTimestamp = Sys.time(), - executionTime = '0 secs', - CheckResults = checkResults, - Metadata = metadata, - Overview = overview - ) + allResults <- list( + startTimestamp = Sys.time(), + endTimestamp = Sys.time(), + executionTime = "0 secs", + CheckResults = checkResults, + Metadata = metadata, + Overview = overview + ) - .writeResultsToJson( - allResults, - outputFolder, - outputFile - ) - -} \ No newline at end of file + .writeResultsToJson( + allResults, + outputFolder, + outputFile + ) +} diff --git a/_pkgdown.yml b/_pkgdown.yml index 57941eb8..63139cb3 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -63,3 +63,7 @@ reference: desc: > Function to convert the case of a results JSON file between snakecase and camelcase contents: convertJsonResultsFileCase + - title: "Write database results to a JSON file" + desc: > + Function to write DQD results from a database table into a JSON file + contents: writeDBResultsToJson diff --git a/docs/404.html b/docs/404.html index ca0796ad..727f16f7 100644 --- a/docs/404.html +++ b/docs/404.html @@ -32,7 +32,7 @@ DataQualityDashboard - 2.4.1 + 2.5.0 diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index 31e872f3..10a745e8 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -17,7 +17,7 @@ DataQualityDashboard - 2.4.1 + 2.5.0 diff --git a/docs/articles/AddNewCheck.html b/docs/articles/AddNewCheck.html index 22f4f9a4..345db18c 100644 --- a/docs/articles/AddNewCheck.html +++ b/docs/articles/AddNewCheck.html @@ -33,7 +33,7 @@ DataQualityDashboard - 2.4.1 + 2.5.0 @@ -108,7 +108,7 @@

Add a New Data Quality Check

Don Torok

-

2023-10-18

+

2023-11-04

Source: vignettes/AddNewCheck.rmd diff --git a/docs/articles/CheckStatusDefinitions.html b/docs/articles/CheckStatusDefinitions.html index f75e735e..ac597143 100644 --- a/docs/articles/CheckStatusDefinitions.html +++ b/docs/articles/CheckStatusDefinitions.html @@ -33,7 +33,7 @@ DataQualityDashboard - 2.4.1 + 2.5.0 @@ -109,7 +109,7 @@

Check Status Descriptions

Dmitry Ilyn

-

2023-10-18

+

2023-11-04

Source: vignettes/CheckStatusDefinitions.rmd diff --git a/docs/articles/CheckTypeDescriptions.html b/docs/articles/CheckTypeDescriptions.html index 3e1ec5c5..ac9d2909 100644 --- a/docs/articles/CheckTypeDescriptions.html +++ b/docs/articles/CheckTypeDescriptions.html @@ -33,7 +33,7 @@ DataQualityDashboard - 2.4.1 + 2.5.0 @@ -109,7 +109,7 @@

Data Quality Check Type Definitions

Clair Blacketer

-

2023-10-18

+

2023-11-04

Source: vignettes/CheckTypeDescriptions.rmd diff --git a/docs/articles/DataQualityDashboard.html b/docs/articles/DataQualityDashboard.html index 023b49f0..fd3146d7 100644 --- a/docs/articles/DataQualityDashboard.html +++ b/docs/articles/DataQualityDashboard.html @@ -33,7 +33,7 @@ DataQualityDashboard - 2.4.1 + 2.5.0 @@ -109,7 +109,7 @@

Getting Started

Clair Blacketer

-

2023-10-18

+

2023-11-04

Source: vignettes/DataQualityDashboard.rmd diff --git a/docs/articles/DqdForCohorts.html b/docs/articles/DqdForCohorts.html index b0aa7263..4b7fae0e 100644 --- a/docs/articles/DqdForCohorts.html +++ b/docs/articles/DqdForCohorts.html @@ -33,7 +33,7 @@ DataQualityDashboard - 2.4.1 + 2.5.0 @@ -109,7 +109,7 @@

Running the DQD on a Cohort

Clair Blacketer

-

2023-10-18

+

2023-11-04

Source: vignettes/DqdForCohorts.rmd diff --git a/docs/articles/SqlOnly.html b/docs/articles/SqlOnly.html index 3ad568b6..47dec90d 100644 --- a/docs/articles/SqlOnly.html +++ b/docs/articles/SqlOnly.html @@ -33,7 +33,7 @@ DataQualityDashboard - 2.4.1 + 2.5.0 @@ -109,7 +109,7 @@

SqlOnly

Maxim Moinat

-

2023-10-18

+

2023-11-04

Source: vignettes/SqlOnly.rmd @@ -324,49 +324,18 @@

(OPTIONAL) Execute queries ) } -# Get results -checkResults <- DatabaseConnector::querySql( - c, - SqlRender::render( - "SELECT * FROM @resultsDatabaseSchema.@writeTableName", - resultsDatabaseSchema = resultsDatabaseSchema, - writeTableName = writeTableName - ), - snakeCaseToCamelCase = TRUE -) -DatabaseConnector::disconnect(c) - -# convert check ID column name to correct format -colnames(checkResults)[colnames(checkResults) == "checkid"] ="checkId" - -# Get overview of DQD results -library(DataQualityDashboard) -overview <- DataQualityDashboard:::.summarizeResults(checkResults = checkResults) +# Extract results table to JSON file for viewing or secondary use -# Create results object, adding fake metadata -result <- list( - startTimestamp = Sys.time(), - endTimestamp = Sys.time(), - executionTime = "", - Metadata = data.frame( - cdmSourceName = cdmSourceName, - cdmSourceAbbreviation = cdmSourceName, - cdmHolder = "", - sourceDescription = "", - sourceDocumentationReference = "", - cdmEtlReference = "", - sourceReleaseDate = "", - cdmReleaseDate = "", - cdmVersion = cdmVersion, - cdmVersionConceptId = 0, - vocabularyVersion = "", - dqdVersion = as.character(packageVersion("DataQualityDashboard")) - ), - Overview = overview, - CheckResults = checkResults -) +DataQualityDashboard::writeDBResultsToJson( + c, + connectionDetails, + resultsDatabaseSchema, + cdmDatabaseSchema, + writeTableName, + jsonOutputFolder, + jsonOutputFile + ) -DataQualityDashboard:::.writeResultsToJson(result, jsonOutputFolder, jsonOutputFile) jsonFilePath <- R.utils::getAbsolutePath(file.path(jsonOutputFolder, jsonOutputFile)) DataQualityDashboard::viewDqDashboard(jsonFilePath) diff --git a/docs/articles/Thresholds.html b/docs/articles/Thresholds.html index dc6f190c..c2de633c 100644 --- a/docs/articles/Thresholds.html +++ b/docs/articles/Thresholds.html @@ -33,7 +33,7 @@ DataQualityDashboard - 2.4.1 + 2.5.0 @@ -109,7 +109,7 @@

Failure Thresholds and How to Change Them

Clair Blacketer

-

2023-10-18

+

2023-11-04

Source: vignettes/Thresholds.rmd diff --git a/docs/articles/index.html b/docs/articles/index.html index 78d2d687..fb48c266 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -17,7 +17,7 @@ DataQualityDashboard - 2.4.1 + 2.5.0 diff --git a/docs/authors.html b/docs/authors.html index 22af3d2d..30f2df9a 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -17,7 +17,7 @@ DataQualityDashboard - 2.4.1 + 2.5.0 diff --git a/docs/index.html b/docs/index.html index 9eff8be6..fe3503a6 100644 --- a/docs/index.html +++ b/docs/index.html @@ -33,7 +33,7 @@ DataQualityDashboard - 2.4.1 + 2.5.0 diff --git a/docs/news/index.html b/docs/news/index.html index 1431a0ed..967560e6 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -17,7 +17,7 @@ DataQualityDashboard - 2.4.1 + 2.5.0 diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index ec39574d..80cea51a 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -9,5 +9,5 @@ articles: DqdForCohorts: DqdForCohorts.html SqlOnly: SqlOnly.html Thresholds: Thresholds.html -last_built: 2023-10-19T03:18Z +last_built: 2023-11-04T22:21Z diff --git a/docs/pull_request_template.html b/docs/pull_request_template.html index a0d1e7e4..d1520df6 100644 --- a/docs/pull_request_template.html +++ b/docs/pull_request_template.html @@ -17,7 +17,7 @@ DataQualityDashboard - 2.4.1 + 2.5.0 diff --git a/docs/reference/convertJsonResultsFileCase.html b/docs/reference/convertJsonResultsFileCase.html index 9fea5133..a368edb5 100644 --- a/docs/reference/convertJsonResultsFileCase.html +++ b/docs/reference/convertJsonResultsFileCase.html @@ -17,7 +17,7 @@ DataQualityDashboard - 2.4.1 + 2.5.0 diff --git a/docs/reference/dot-evaluateThresholds.html b/docs/reference/dot-evaluateThresholds.html index fe120aa0..36ea9d79 100644 --- a/docs/reference/dot-evaluateThresholds.html +++ b/docs/reference/dot-evaluateThresholds.html @@ -17,7 +17,7 @@ DataQualityDashboard - 2.4.1 + 2.5.0 diff --git a/docs/reference/dot-getCheckId.html b/docs/reference/dot-getCheckId.html index 0ead8722..9af848d3 100644 --- a/docs/reference/dot-getCheckId.html +++ b/docs/reference/dot-getCheckId.html @@ -17,7 +17,7 @@ DataQualityDashboard - 2.4.1 + 2.5.0 diff --git a/docs/reference/dot-processCheck.html b/docs/reference/dot-processCheck.html index 518d5bd0..7f6a37fb 100644 --- a/docs/reference/dot-processCheck.html +++ b/docs/reference/dot-processCheck.html @@ -17,7 +17,7 @@ DataQualityDashboard - 2.4.1 + 2.5.0 diff --git a/docs/reference/dot-recordResult.html b/docs/reference/dot-recordResult.html index c8970af0..9bb44bc9 100644 --- a/docs/reference/dot-recordResult.html +++ b/docs/reference/dot-recordResult.html @@ -17,7 +17,7 @@ DataQualityDashboard - 2.4.1 + 2.5.0 diff --git a/docs/reference/dot-runCheck.html b/docs/reference/dot-runCheck.html index 9ad867ae..74734e1c 100644 --- a/docs/reference/dot-runCheck.html +++ b/docs/reference/dot-runCheck.html @@ -17,7 +17,7 @@ DataQualityDashboard - 2.4.1 + 2.5.0 diff --git a/docs/reference/dot-summarizeResults.html b/docs/reference/dot-summarizeResults.html index 9d0aadf6..02072c33 100644 --- a/docs/reference/dot-summarizeResults.html +++ b/docs/reference/dot-summarizeResults.html @@ -17,7 +17,7 @@ DataQualityDashboard - 2.4.1 + 2.5.0 diff --git a/docs/reference/dot-writeResultsToCsv.html b/docs/reference/dot-writeResultsToCsv.html index fce5b97b..bff6ecef 100644 --- a/docs/reference/dot-writeResultsToCsv.html +++ b/docs/reference/dot-writeResultsToCsv.html @@ -17,7 +17,7 @@ DataQualityDashboard - 2.4.1 + 2.5.0 diff --git a/docs/reference/dot-writeResultsToJson.html b/docs/reference/dot-writeResultsToJson.html index 2df4c8b7..023d75d4 100644 --- a/docs/reference/dot-writeResultsToJson.html +++ b/docs/reference/dot-writeResultsToJson.html @@ -17,7 +17,7 @@ DataQualityDashboard - 2.4.1 + 2.5.0 diff --git a/docs/reference/dot-writeResultsToTable.html b/docs/reference/dot-writeResultsToTable.html index 86861bc0..79c55e02 100644 --- a/docs/reference/dot-writeResultsToTable.html +++ b/docs/reference/dot-writeResultsToTable.html @@ -17,7 +17,7 @@ DataQualityDashboard - 2.4.1 + 2.5.0 diff --git a/docs/reference/executeDqChecks.html b/docs/reference/executeDqChecks.html index eb39a4ec..3641da35 100644 --- a/docs/reference/executeDqChecks.html +++ b/docs/reference/executeDqChecks.html @@ -17,7 +17,7 @@ DataQualityDashboard - 2.4.1 + 2.5.0 diff --git a/docs/reference/index.html b/docs/reference/index.html index fb1fd296..109e13a3 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -17,7 +17,7 @@ DataQualityDashboard - 2.4.1 + 2.5.0 @@ -135,6 +135,14 @@

Convert results JSON file case convertJsonResultsFileCase()

Convert JSON results file case

+ +

Write database results to a JSON file

+

Function to write DQD results from a database table into a JSON file

+ + +

writeDBResultsToJson()

+ +

Write DQD results database table to json

diff --git a/docs/reference/reEvaluateThresholds.html b/docs/reference/reEvaluateThresholds.html index 0a7df4a7..04a13f52 100644 --- a/docs/reference/reEvaluateThresholds.html +++ b/docs/reference/reEvaluateThresholds.html @@ -17,7 +17,7 @@ DataQualityDashboard - 2.4.1 + 2.5.0 diff --git a/docs/reference/viewDqDashboard.html b/docs/reference/viewDqDashboard.html index 41557122..9ee5dba0 100644 --- a/docs/reference/viewDqDashboard.html +++ b/docs/reference/viewDqDashboard.html @@ -17,7 +17,7 @@ DataQualityDashboard - 2.4.1 + 2.5.0 diff --git a/docs/reference/writeDBResultsToJson.html b/docs/reference/writeDBResultsToJson.html new file mode 100644 index 00000000..a3423b33 --- /dev/null +++ b/docs/reference/writeDBResultsToJson.html @@ -0,0 +1,153 @@ + +Write DQD results database table to json — writeDBResultsToJson • DataQualityDashboard + + +
+
+ + + +
+
+ + +
+

Write DQD results database table to json

+
+ +
+
writeDBResultsToJson(
+  connection,
+  resultsDatabaseSchema,
+  cdmDatabaseSchema,
+  writeTableName,
+  outputFolder,
+  outputFile
+)
+
+ +
+

Arguments

+
connection
+

A connection object

+ + +
resultsDatabaseSchema
+

The fully qualified database name of the results schema

+ + +
cdmDatabaseSchema
+

The fully qualified database name of the CDM schema

+ + +
writeTableName
+

Name of DQD results table in the database to read from

+ + +
outputFolder
+

The folder to output the json results file to

+ + +
outputFile
+

The output filename of the json results file

+ +
+ +
+ +
+ + +
+ + + + + + + + diff --git a/docs/reference/writeJsonResultsToCsv.html b/docs/reference/writeJsonResultsToCsv.html index 3083ad75..3bbd7d1f 100644 --- a/docs/reference/writeJsonResultsToCsv.html +++ b/docs/reference/writeJsonResultsToCsv.html @@ -17,7 +17,7 @@ DataQualityDashboard - 2.4.1 + 2.5.0 diff --git a/docs/reference/writeJsonResultsToTable.html b/docs/reference/writeJsonResultsToTable.html index 43b428f9..d23c3f39 100644 --- a/docs/reference/writeJsonResultsToTable.html +++ b/docs/reference/writeJsonResultsToTable.html @@ -17,7 +17,7 @@ DataQualityDashboard - 2.4.1 + 2.5.0 diff --git a/docs/sitemap.xml b/docs/sitemap.xml index 99f8a396..5ae0b4bc 100644 --- a/docs/sitemap.xml +++ b/docs/sitemap.xml @@ -117,6 +117,9 @@ /reference/viewDqDashboard.html + + /reference/writeDBResultsToJson.html + /reference/writeJsonResultsToCsv.html diff --git a/extras/DataQualityDashboard.pdf b/extras/DataQualityDashboard.pdf index 24a693fa..eb9dfa03 100644 Binary files a/extras/DataQualityDashboard.pdf and b/extras/DataQualityDashboard.pdf differ diff --git a/inst/doc/AddNewCheck.pdf b/inst/doc/AddNewCheck.pdf index ff24ed57..fe53eb2d 100644 Binary files a/inst/doc/AddNewCheck.pdf and b/inst/doc/AddNewCheck.pdf differ diff --git a/inst/doc/CheckStatusDefinitions.pdf b/inst/doc/CheckStatusDefinitions.pdf index b158d7cb..762f2594 100644 Binary files a/inst/doc/CheckStatusDefinitions.pdf and b/inst/doc/CheckStatusDefinitions.pdf differ diff --git a/inst/doc/CheckTypeDescriptions.pdf b/inst/doc/CheckTypeDescriptions.pdf index 4fc209fa..ff299a02 100644 Binary files a/inst/doc/CheckTypeDescriptions.pdf and b/inst/doc/CheckTypeDescriptions.pdf differ diff --git a/inst/doc/DataQualityDashboard.pdf b/inst/doc/DataQualityDashboard.pdf index 9d1faceb..062c6e2b 100644 Binary files a/inst/doc/DataQualityDashboard.pdf and b/inst/doc/DataQualityDashboard.pdf differ diff --git a/inst/doc/DqdForCohorts.pdf b/inst/doc/DqdForCohorts.pdf index dc381e31..9025cf6f 100644 Binary files a/inst/doc/DqdForCohorts.pdf and b/inst/doc/DqdForCohorts.pdf differ diff --git a/inst/doc/SqlOnly.pdf b/inst/doc/SqlOnly.pdf index f9107177..85328c66 100644 Binary files a/inst/doc/SqlOnly.pdf and b/inst/doc/SqlOnly.pdf differ diff --git a/inst/doc/Thresholds.pdf b/inst/doc/Thresholds.pdf index bb044544..a26b1308 100644 Binary files a/inst/doc/Thresholds.pdf and b/inst/doc/Thresholds.pdf differ diff --git a/tests/testthat/test-executeDqChecks.R b/tests/testthat/test-executeDqChecks.R index 35fbff93..1cafeff2 100644 --- a/tests/testthat/test-executeDqChecks.R +++ b/tests/testthat/test-executeDqChecks.R @@ -332,12 +332,12 @@ test_that("Incremental insert SQL is valid.", { test_that("Multiple cdm_source rows triggers warning.", { outputFolder <- tempfile("dqd_") on.exit(unlink(outputFolder, recursive = TRUE)) - + connectionDetailsEunomiaCS <- Eunomia::getEunomiaConnectionDetails() connection <- DatabaseConnector::connect(connectionDetailsEunomiaCS) on.exit(DatabaseConnector::disconnect(connection), add = TRUE) DatabaseConnector::renderTranslateExecuteSql(connection, "INSERT INTO @database_schema.cdm_source VALUES ('foo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);", database_schema = cdmDatabaseSchemaEunomia) - + w <- capture_warnings( results <- executeDqChecks( connectionDetails = connectionDetailsEunomiaCS, @@ -347,11 +347,11 @@ test_that("Multiple cdm_source rows triggers warning.", { checkNames = "measurePersonCompleteness", outputFolder = outputFolder, writeToTable = F - )) - + ) + ) + expect_match(w, "Missing check names", all = FALSE) expect_match(w, "The cdm_source table has", all = FALSE) - + expect_true(nrow(results$CheckResults) > 1) }) - diff --git a/tests/testthat/test-writeDBResultsTo.R b/tests/testthat/test-writeDBResultsTo.R index 9cc11808..8d10e79a 100644 --- a/tests/testthat/test-writeDBResultsTo.R +++ b/tests/testthat/test-writeDBResultsTo.R @@ -38,10 +38,10 @@ test_that("Write DB results to json", { on.exit(DatabaseConnector::disconnect(connection), add = TRUE) # Check that file was exported properly - expect_true(file.exists(file.path(outputFolder,testExportFile))) + expect_true(file.exists(file.path(outputFolder, testExportFile))) # Check that export length matches length of db table - results <- jsonlite::fromJSON(file.path(outputFolder,testExportFile)) + results <- jsonlite::fromJSON(file.path(outputFolder, testExportFile)) table_rows <- DatabaseConnector::renderTranslateQuerySql( connection, sql = "select count(*) from @resultsDatabaseSchema.@writeTableName;", @@ -50,5 +50,4 @@ test_that("Write DB results to json", { snakeCaseToCamelCase = TRUE ) expect_true(length(results$CheckResults) == table_rows) - -}) \ No newline at end of file +})