View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001234 | SymmetricDS | Improvement | public | 2013-05-20 17:48 | 2022-08-10 12:52 |
Reporter | rotten | Assigned To | |||
Priority | normal | ||||
Status | closed | Resolution | unable to reproduce | ||
Product Version | 3.4.0 | ||||
Summary | 0001234: const transform needs a source column - sometimes | ||||
Description | If 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 Reproduce | Configure 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 Information | Some sort of warning or clearer error message would be useful. Better yet, a const() transformation shouldn't care what the source column is. | ||||
Tags | transformation | ||||
|
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())) { |
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 |