Skip to content

Commit

Permalink
fixed targetDialect
Browse files Browse the repository at this point in the history
targetDialect uses connection now
  • Loading branch information
jreps committed May 16, 2018
1 parent a1ef41f commit c947d9a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/ImportExport.R
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ createExistingModelSql <- function(modelTable, modelNames, interceptTable,
}

colnames(intercepts) <- SqlRender::camelCaseToSnakeCase(colnames(intercepts))
DatabaseConnector::insertTable(connection, tableName='#intercepts', data = intercepts, tempTable = T)
DatabaseConnector::insertTable(connection, tableName='intercepts', data = intercepts, tempTable = T)


# =================================
Expand Down Expand Up @@ -691,7 +691,7 @@ getExistingmodelsCovariateData <- function(connection,
rowIdField = rowIdField,
targetCovariateTable = "#cov_temp"
)$sql
sql <- SqlRender::translateSql(sql, targetDialect ='pdw')$sql
sql <- SqlRender::translateSql(sql, targetDialect =attr(connection,"dbms"))$sql
DatabaseConnector::executeSql(connection, sql)
}

Expand Down Expand Up @@ -738,7 +738,7 @@ getExistingmodelsCovariateData <- function(connection,
sql <- SqlRender::renderSql(sql,
analysis_id = analysisId
)$sql
sql <- SqlRender::translateSql(sql, targetDialect ='pdw')$sql
sql <- SqlRender::translateSql(sql, targetDialect =attr(connection,"dbms"))$sql

# Retrieve the covariate:
covariates <- DatabaseConnector::querySql.ffdf(connection, sql)
Expand Down

0 comments on commit c947d9a

Please sign in to comment.