View Issue Details

IDProjectCategoryView StatusLast Update
0000219SymmetricDSNew Featurepublic2014-08-28 01:02
ReporterAssigned Toelong  
Priorityhigh 
Status closedResolutionfixed 
Target Version3.0.0Fixed in Version3.0.0 
Summary0000219: Synchronize tables to same schema/catalog in target if source_schema_name / source_catalog_name is defined for trigger
Description"Here's a suggested improvement to synchronize tables to same schema/catalog in target if source_schema_name / source_catalog_name is defined for trigger and target schema name / catalog name hasn't been defined in the router. This is a ""breaking change"" and maybe there should be a configuration parameter to control the behaviour? Maybe add a property to router? (keep source schema / keep source catalog) I haven't tested this patch, but I assume this would be the correct place to add the change: {code} Index: src/main/java/org/jumpmind/symmetric/extract/csv/CsvExtractor.java =================================================================== --- src/main/java/org/jumpmind/symmetric/extract/csv/CsvExtractor.java (revision 3175) +++ src/main/java/org/jumpmind/symmetric/extract/csv/CsvExtractor.java (working copy) @@ -24,6 +24,7 @@ import java.io.BufferedWriter; import java.io.IOException; +import org.apache.commons.lang.StringUtils; import org.jumpmind.symmetric.common.ParameterConstants; import org.jumpmind.symmetric.common.csv.CsvConstants; import org.jumpmind.symmetric.extract.DataExtractorContext; @@ -88,11 +89,11 @@ protected void writeTable(Data data, String routerId, BufferedWriter out) throws IOException { // TODO Add property and write the source schema and the source catalog if set Router router = triggerRouterService.getRouterByIdForCurrentNode(routerId, false); - String schemaName = (router == null || router.getTargetSchemaName() == null) ? """" : router + String schemaName = (router == null || router.getTargetSchemaName() == null) ? StringUtils.trimToEmpty(data.getTriggerHistory().getSourceSchemaName()) : router .getTargetSchemaName(); CsvUtils.write(out, CsvConstants.SCHEMA, "", "", schemaName); out.newLine(); - String catalogName = (router == null || router.getTargetCatalogName() == null) ? """" : router + String catalogName = (router == null || router.getTargetCatalogName() == null) ? StringUtils.trimToEmpty(data.getTriggerHistory().getSourceCatalogName()) : router .getTargetCatalogName(); CsvUtils.write(out, CsvConstants.CATALOG, "", "", catalogName); out.newLine(); {code}"
TagsNo tags attached.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2012-06-18 18:12 admin Target Version 3.1.0 =>
2014-02-04 15:49 elong Status new => resolved
2014-02-04 15:49 elong Fixed in Version 3.1.0 => 3.0.0
2014-02-04 15:49 elong Resolution open => fixed
2014-02-04 15:49 elong Assigned To => elong
2014-08-28 01:02 chenson Status resolved => closed