Skip to content

Commit

Permalink
0005095: Initial load before custom sql to support table replacement
Browse files Browse the repository at this point in the history
with delimiters
  • Loading branch information
joshahicks committed Oct 5, 2021
1 parent 8d5aaf1 commit 849f8ec
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -1777,10 +1777,16 @@ public List<String> resolveTargetTables(String sql, TriggerRouter triggerRouter,
tableNames.add(transform.getFullyQualifiedTargetTableName());
}
} else {

tableNames.add(sourceTableName);
}

for (String tableName : tableNames) {
if (parameterService.is(ParameterConstants.DB_DELIMITED_IDENTIFIER_MODE)) {
String delimiter = engine.getTargetDialect().getTargetPlatform().getDatabaseInfo().getDelimiterToken();
tableName = tableName.replaceAll("\\.", delimiter + "." + delimiter);
tableName = delimiter + tableName + delimiter;
}
sqlStatements.add(String.format(sql, tableName));
}
}
Expand Down

0 comments on commit 849f8ec

Please sign in to comment.