Skip to content

Commit

Permalink
Updating Circe-generated SQL (to avoid errors on DataBricks).
Browse files Browse the repository at this point in the history
  • Loading branch information
Admin_mschuemi authored and Admin_mschuemi committed Dec 11, 2024
1 parent eee3fc1 commit 2e3b6f1
Show file tree
Hide file tree
Showing 9 changed files with 1,209 additions and 653 deletions.
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: MethodEvaluation
Type: Package
Title: Package for Evaluation of Estimation Methods
Version: 2.3.0
Date: 2023-06-30
Version: 2.3.1
Date: 2024-12-11
Authors@R: c(
person("Martijn", "Schuemie", , "[email protected]", role = c("aut", "cre"))
)
Expand Down Expand Up @@ -47,5 +47,5 @@ Suggests:
Remotes:
ohdsi/FeatureExtraction,
ohdsi/Eunomia
RoxygenNote: 7.2.3
RoxygenNote: 7.3.2
Encoding: UTF-8
8 changes: 8 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
MethodEvaluation 2.3.1
======================

Changes:

1. Updating Circe-generated SQL (to avoid errors on DataBricks).


MethodEvaluation 2.3.0
======================

Expand Down
10 changes: 10 additions & 0 deletions extras/PackageMaintenance.R
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,13 @@ OhdsiRTools::insertCohortDefinitionInPackage(1775839,
OhdsiRTools::insertCohortDefinitionInPackage(1775840,
"thiazides_diuretics",
baseUrl = keyring::key_get("ohdsiBaseUrl"))

# Regenerate SQL for cohort definitions ----------------------------------------
# Old Circe SQL is outdated? Doesn't run on DataBricks

cohorts <- list.files("inst/cohorts")
for (cohort in cohorts) {
json <- readLines(file.path("inst/cohorts", cohort))
sql <- CirceR::buildCohortQuery(json, options = CirceR::createGenerateOptions(generateStats = FALSE))
SqlRender::writeSql(sql, file.path("inst/sql/sql_server", gsub(".json", ".sql", cohort)))
}
Loading

0 comments on commit 2e3b6f1

Please sign in to comment.