Skip to content

Commit

Permalink
0001449: Add support for allowing a database writer filter to change …
Browse files Browse the repository at this point in the history
…the target tables catalog, schema and table name
  • Loading branch information
chenson42 committed Oct 22, 2013
1 parent 10cd856 commit d718319
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -381,10 +381,11 @@ protected boolean filterBefore(CsvData data) {
statistics.get(batch).startTimer(DataWriterStatisticConstants.FILTERMILLIS);
for (IDatabaseWriterFilter filter : filters) {
process &= filter.beforeWrite(this.context, this.sourceTable, data);
// re-lookup target table in case the source has changed
// re-lookup target table in case the source table has changed
Table oldTargetTable = targetTable;
targetTable = lookupTableAtTarget(this.sourceTable);
if (!oldTargetTable.equals(targetTable)) {
// allow for auto increment columns to be inserted into if appropriate
String quote = getPlatform().getDatabaseInfo().getDelimiterToken();
transaction.allowInsertIntoAutoIncrementColumns(false, oldTargetTable, quote);
transaction.allowInsertIntoAutoIncrementColumns(true, targetTable, quote);
Expand Down

0 comments on commit d718319

Please sign in to comment.