Commit 798665cc authored by mcb's avatar mcb

no message

parent e83f1ad5
...@@ -80,13 +80,13 @@ public class SyncParameters extends AbstractParameters { ...@@ -80,13 +80,13 @@ public class SyncParameters extends AbstractParameters {
envModel.put("sparkappname", "Waterdrop"); envModel.put("sparkappname", "Waterdrop");
env = FreeMarkerUtils.freemakerJson(CommConstant.WATERDROP_FTL_ENV, envModel, freeMarkerConfig); env = FreeMarkerUtils.freemakerJson(CommConstant.WATERDROP_FTL_ENV, envModel, freeMarkerConfig);
//来源信息 //source information
Integer sourceId = Integer.valueOf((String) sourceObj.get("sourceDbId")); Integer sourceId = Integer.valueOf((String) sourceObj.get("sourceDbId"));
DmpSyncingDatasource dmpSyncingDatasource = dmpSyncingDatasourceDao.queryById(sourceId); DmpSyncingDatasource dmpSyncingDatasource = dmpSyncingDatasourceDao.queryById(sourceId);
Integer sourceTypeId = dmpSyncingDatasource.getDatasourceType(); Integer sourceTypeId = dmpSyncingDatasource.getDatasourceType();
String[] registerTableName = ((String) sourceObj.get("registerTableName")).split(","); String[] registerTableName = ((String) sourceObj.get("registerTableName")).split(",");
//目标信息 //target information
Integer targetDbId = Integer.valueOf((String) targetObj.get("targetDbId")); Integer targetDbId = Integer.valueOf((String) targetObj.get("targetDbId"));
DmpSyncingDatasource targetDatasource = dmpSyncingDatasourceDao.queryById(targetDbId); DmpSyncingDatasource targetDatasource = dmpSyncingDatasourceDao.queryById(targetDbId);
Integer targetTypeId = dmpSyncingDatasource.getDatasourceType(); Integer targetTypeId = dmpSyncingDatasource.getDatasourceType();
...@@ -153,12 +153,12 @@ public class SyncParameters extends AbstractParameters { ...@@ -153,12 +153,12 @@ public class SyncParameters extends AbstractParameters {
transform = transform + FreeMarkerUtils.freemakerJson(CommConstant.WATERDROP_FTL_TRANSFORM_SQL, sqlModel, freeMarkerConfig); transform = transform + FreeMarkerUtils.freemakerJson(CommConstant.WATERDROP_FTL_TRANSFORM_SQL, sqlModel, freeMarkerConfig);
Map targetModel = new HashMap(); Map targetModel = new HashMap();
StringBuilder sql1 = new StringBuilder() StringBuilder targetSql = new StringBuilder()
.append(" select ") .append(" select ")
.append(" " + targetField.substring(1) + " ") .append(" " + targetField.substring(1) + " ")
.append(" from ") .append(" from ")
.append(" " + table_name); .append(" " + table_name);
targetModel.put("sql",sql1); targetModel.put("sql",targetSql);
transform = transform + FreeMarkerUtils.freemakerJson(CommConstant.WATERDROP_FTL_TRANSFORM_SQL, targetModel, freeMarkerConfig); transform = transform + FreeMarkerUtils.freemakerJson(CommConstant.WATERDROP_FTL_TRANSFORM_SQL, targetModel, freeMarkerConfig);
} }
} }
...@@ -215,7 +215,6 @@ public class SyncParameters extends AbstractParameters { ...@@ -215,7 +215,6 @@ public class SyncParameters extends AbstractParameters {
//sink //sink
} }
//waterdrop script //waterdrop script
Map<String, String> waterdropModel = new HashMap<String, String>(); Map<String, String> waterdropModel = new HashMap<String, String>();
waterdropModel.put("env", env); waterdropModel.put("env", env);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment