Commit 61dfdf71 authored by mcb's avatar mcb

commit

parent 798665cc
......@@ -140,15 +140,15 @@ public class SyncParameters extends AbstractParameters {
sourceField += "," + item.get("sourceField");
targetField += "," + item.get("sourceField") + " as " + item.get("targetField");
}
for (String tableName : registerTableName) {
//for (String tableName : registerTableName) {
Map sqlModel = new HashMap();
StringBuilder sql = new StringBuilder()
.append(" select ")
.append(" " + sourceField.substring(1) + " ")
.append(" from ")
.append(" " + tableName);
.append(" " + registerTableName[0]);
sqlModel.put("sql", sql);
String table_name = tableName + "_view";
String table_name = registerTableName[0] + "_view";
sqlModel.put("table_name", table_name);
transform = transform + FreeMarkerUtils.freemakerJson(CommConstant.WATERDROP_FTL_TRANSFORM_SQL, sqlModel, freeMarkerConfig);
......@@ -158,9 +158,9 @@ public class SyncParameters extends AbstractParameters {
.append(" " + targetField.substring(1) + " ")
.append(" from ")
.append(" " + table_name);
targetModel.put("sql",targetSql);
targetModel.put("sql", targetSql);
transform = transform + FreeMarkerUtils.freemakerJson(CommConstant.WATERDROP_FTL_TRANSFORM_SQL, targetModel, freeMarkerConfig);
}
//}
}
/*if (mappingObj.size() > 0 && null != mappingObj) {
for (Map<String, Object> item : mappingObj) {
......@@ -190,7 +190,10 @@ public class SyncParameters extends AbstractParameters {
}
}
if (sourceTypeId == DatasouceTypeConstant.Hive) {
//source
}
if (sourceTypeId == DatasouceTypeConstant.Kudu) {
//source
}
if (sourceTypeId == DatasouceTypeConstant.SFTP) {
//source
......@@ -212,8 +215,6 @@ public class SyncParameters extends AbstractParameters {
sftpModel.put("result_table_name", tableName); //spark生成的临时表名
source = source + FreeMarkerUtils.freemakerJson(CommConstant.WATERDROP_FTL_SOURCE_SFTP, sftpModel, freeMarkerConfig);
}
//sink
}
//waterdrop script
Map<String, String> waterdropModel = new HashMap<String, String>();
......
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