View Issue Details

IDProjectCategoryView StatusLast Update
0001234SymmetricDSImprovementpublic2022-08-10 12:52
Reporterrotten Assigned To 
Prioritynormal 
Status closedResolutionunable to reproduce 
Product Version3.4.0 
Summary0001234: const transform needs a source column - sometimes
DescriptionIf you are using transformations to populate (new) columns in your destination table with constants, and those columns are not primary key columns, you have to have a source column defined in sym_transform_column. You can pick arbitrary valid columns in your source table to get it to work. You can't leave source_column_name null, nor get away with making up source column's that don't exist.

It seems (the only difference I could find between the transforms where it worked, and where it didn't work) that when you have the pk column set to '1', you can leave the source column name as null, and the constant will get correctly populated.


Steps To ReproduceConfigure a transform with 'SPECIFIED' as the column_policy. Replicate the pk, and set up copy for a couple of random columns. Then set up a new column on the destination table that you want to populate with a constant.

If the source column name is null, the const transform will populate the destination column as null.

It will throw these warnings in the log:

2013-05-20 13:15:04,749 WARN [SymmetricDS] [TransformWriter] [qtp751762087-22] Could not find a source column of for the transformation: my_test_transform

You can see the destination column getting set to null if you turn up debug logging on TransformWriter:

<category name="org.jumpmind.symmetric.io.data.writer.TransformWriter">
    <priority value="DEBUG" />
</category>



Additional InformationSome sort of warning or clearer error message would be useful. Better yet, a const() transformation shouldn't care what the source column is.
Tagstransformation

Activities

chenson

2013-12-07 14:59

administrator   ~0000401

I could not duplicate this and I don't see in the code how this could happen. The error that printed out only happens in one place in the transformation process and it is on the other side of the following if statement:

if (StringUtils.isBlank(transformColumn.getSourceColumnName())
  || sourceValues.containsKey(transformColumn.getSourceColumnName())) {

Issue History

Date Modified Username Field Change
2013-05-20 17:48 rotten New Issue
2013-06-08 15:05 chenson Target Version => 3.6.0
2013-12-07 14:59 chenson Note Added: 0000401
2013-12-07 20:53 chenson Target Version 3.6.0 =>
2019-04-22 14:18 elong Tag Attached: transformation
2022-08-10 12:52 emiller Status new => closed
2022-08-10 12:52 emiller Resolution open => unable to reproduce