From edcc3f1e2ed132b9838665de964742882d4bd580 Mon Sep 17 00:00:00 2001 From: Frank DeFalco Date: Tue, 23 May 2023 13:53:13 -0400 Subject: [PATCH] change to SqlRender supported dialects instead of hard coded values --- R/writeDDL.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/R/writeDDL.R b/R/writeDDL.R index 810cce8..8ec2af9 100644 --- a/R/writeDDL.R +++ b/R/writeDDL.R @@ -31,7 +31,8 @@ writeDdl <- function(targetDialect, cdmVersion, outputfolder, cdmDatabaseSchema = "@cdmDatabaseSchema") { # argument checks - stopifnot(targetDialect %in% c("oracle", "postgresql", "pdw", "redshift", "impala", "netezza", "bigquery", "sql server", "spark", "snowflake", "synapse")) + supportedDialects <- SqlRender::listSupportedDialects()$dialect + stopifnot(targetDialect %in% supportedDialects) stopifnot(cdmVersion %in% listSupportedVersions()) stopifnot(is.character(cdmDatabaseSchema))