Skip to content

Commit

Permalink
Adding cdmDatabaseSchema parameter to TRUNACTE and lookup queries
Browse files Browse the repository at this point in the history
  • Loading branch information
schuemie committed Dec 13, 2017
1 parent b499124 commit a4834a1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/org/ohdsi/rabbitInAHat/ETLTestFrameWorkGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public class ETLTestFrameWorkGenerator {
public static void main(String[] args) {
ETL etl = ETL.fromFile("C:\\Home\\Research\\ETLs\\JMDC ETL\\JMDC ETL CDMv5\\JMDC to CDMv5 ETL v08.json.gz", FileFormat.GzipJson);
ETLTestFrameWorkGenerator generator = new ETLTestFrameWorkGenerator();
generator.generate(etl, "c:/temp/tf.R");
generator.generate(etl, "C:\\Home\\Research\\ETLs\\JMDC ETL\\JMDC ETL CDMv5\\JmdcTestFramework.R");
}

public ETLTestFrameWorkGenerator() {
Expand Down Expand Up @@ -273,7 +273,7 @@ protected void createLookupFunctions() {
line.append(") {");
r.add(line.toString());
line = new StringBuilder();
line.append(" statement <- paste0('SELECT ', fetchField , ' FROM ");
line.append(" statement <- paste0('SELECT ', fetchField , ' FROM @cdm_database_schema.");
line.append(sqlTableName);
line.append(" WHERE')");
r.add(line.toString());
Expand Down Expand Up @@ -305,7 +305,7 @@ protected void createGenerateInsertSqlFunction() {
r.add(" insertSql <- c()");
for (Table table : sourceDb.getTables())
if (!table.isStem())
r.add(" insertSql <- c(insertSql, \"TRUNCATE TABLE " + convertToSqlName(table.getName()) + ";\")");
r.add(" insertSql <- c(insertSql, \"TRUNCATE TABLE @cdm_database_schema." + convertToSqlName(table.getName()) + ";\")");
r.add(" createInsertStatement <- function(insert, env) {");
r.add(" s <- c()");
r.add(" if (env$testId != insert$testId) {");
Expand Down

0 comments on commit a4834a1

Please sign in to comment.