Skip to content

Commit

Permalink
0001953: Transform column value to NULL removes column
Browse files Browse the repository at this point in the history
  • Loading branch information
chenson42 committed Sep 15, 2014
1 parent 6ab5c4f commit 3681623
Showing 1 changed file with 8 additions and 1 deletion.
Expand Up @@ -308,8 +308,15 @@ protected boolean perform(DataContext context, TransformedData data,
data.put(transformColumn,
((NewAndOldValue) value).getNewValue(),
((NewAndOldValue) value).getOldValue(), false);
} else {
} else if (value == null || value instanceof String) {
data.put(transformColumn, (String) value, null, false);
} else if (value instanceof List) {
throw new IllegalStateException(String.format("Column transform failed %s.%s. Transforms that multiply rows must be marked as part of the primary key",
transformColumn.getTransformId(), transformColumn.getTargetColumnName()));
} else {
throw new IllegalStateException(String.format("Column transform failed %s.%s. It returned an unexpected type of %s",
transformColumn.getTransformId(), transformColumn.getTargetColumnName(),
value.getClass().getSimpleName()));
}
} catch (IgnoreColumnException e) {
// Do nothing. We are ignoring the column
Expand Down

0 comments on commit 3681623

Please sign in to comment.