diff --git a/symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/writer/TransformWriter.java b/symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/writer/TransformWriter.java index 39339c30dd..bbf9045263 100644 --- a/symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/writer/TransformWriter.java +++ b/symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/writer/TransformWriter.java @@ -133,7 +133,8 @@ public void write(CsvData data) { List transformTables = activeTransforms; for (TransformTable transformation : transformTables) { Table transformedTable = new Table(transformation.getTargetCatalogName(), - transformation.getTargetSchemaName(), transformation.getTargetTableName()); + transformation.getTargetSchemaName(), transformation.getTargetTableName(), + getTargetColumnNames(transformation.getTransformColumns()), getTargetColumnNames(transformation.getPrimaryKeyColumns())); callWriter(transformedTable, data); } return; @@ -208,6 +209,15 @@ protected void callWriter(Table transformedTable, CsvData csvData) { } } + protected String[] getTargetColumnNames(List columns) { + String[] names = new String[columns.size()]; + int i = 0; + for (TransformColumn column : columns) { + names[i++] = column.getTargetColumnName(); + } + return names; + } + protected List transform(DataEventType eventType, DataContext context, TransformTable transformation, Map sourceKeyValues, Map oldSourceValues, Map sourceValues) {