Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jz-dmp-cmdexectool
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
姚本章
jz-dmp-cmdexectool
Commits
61dfdf71
Commit
61dfdf71
authored
Mar 03, 2021
by
mcb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit
parent
798665cc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
SyncParameters.java
...mdexectool/scheduler/common/task/sync/SyncParameters.java
+9
-8
No files found.
src/main/java/com/jz/dmp/cmdexectool/scheduler/common/task/sync/SyncParameters.java
View file @
61dfdf71
...
@@ -140,15 +140,15 @@ public class SyncParameters extends AbstractParameters {
...
@@ -140,15 +140,15 @@ public class SyncParameters extends AbstractParameters {
sourceField
+=
","
+
item
.
get
(
"sourceField"
);
sourceField
+=
","
+
item
.
get
(
"sourceField"
);
targetField
+=
","
+
item
.
get
(
"sourceField"
)
+
" as "
+
item
.
get
(
"targetField"
);
targetField
+=
","
+
item
.
get
(
"sourceField"
)
+
" as "
+
item
.
get
(
"targetField"
);
}
}
for
(
String
tableName
:
registerTableName
)
{
//
for (String tableName : registerTableName) {
Map
sqlModel
=
new
HashMap
();
Map
sqlModel
=
new
HashMap
();
StringBuilder
sql
=
new
StringBuilder
()
StringBuilder
sql
=
new
StringBuilder
()
.
append
(
" select "
)
.
append
(
" select "
)
.
append
(
" "
+
sourceField
.
substring
(
1
)
+
" "
)
.
append
(
" "
+
sourceField
.
substring
(
1
)
+
" "
)
.
append
(
" from "
)
.
append
(
" from "
)
.
append
(
" "
+
tableName
);
.
append
(
" "
+
registerTableName
[
0
]
);
sqlModel
.
put
(
"sql"
,
sql
);
sqlModel
.
put
(
"sql"
,
sql
);
String
table_name
=
tableName
+
"_view"
;
String
table_name
=
registerTableName
[
0
]
+
"_view"
;
sqlModel
.
put
(
"table_name"
,
table_name
);
sqlModel
.
put
(
"table_name"
,
table_name
);
transform
=
transform
+
FreeMarkerUtils
.
freemakerJson
(
CommConstant
.
WATERDROP_FTL_TRANSFORM_SQL
,
sqlModel
,
freeMarkerConfig
);
transform
=
transform
+
FreeMarkerUtils
.
freemakerJson
(
CommConstant
.
WATERDROP_FTL_TRANSFORM_SQL
,
sqlModel
,
freeMarkerConfig
);
...
@@ -158,9 +158,9 @@ public class SyncParameters extends AbstractParameters {
...
@@ -158,9 +158,9 @@ public class SyncParameters extends AbstractParameters {
.
append
(
" "
+
targetField
.
substring
(
1
)
+
" "
)
.
append
(
" "
+
targetField
.
substring
(
1
)
+
" "
)
.
append
(
" from "
)
.
append
(
" from "
)
.
append
(
" "
+
table_name
);
.
append
(
" "
+
table_name
);
targetModel
.
put
(
"sql"
,
targetSql
);
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
);
}
//
}
}
}
/*if (mappingObj.size() > 0 && null != mappingObj) {
/*if (mappingObj.size() > 0 && null != mappingObj) {
for (Map<String, Object> item : mappingObj) {
for (Map<String, Object> item : mappingObj) {
...
@@ -190,7 +190,10 @@ public class SyncParameters extends AbstractParameters {
...
@@ -190,7 +190,10 @@ public class SyncParameters extends AbstractParameters {
}
}
}
}
if
(
sourceTypeId
==
DatasouceTypeConstant
.
Hive
)
{
if
(
sourceTypeId
==
DatasouceTypeConstant
.
Hive
)
{
//source
}
if
(
sourceTypeId
==
DatasouceTypeConstant
.
Kudu
)
{
//source
}
}
if
(
sourceTypeId
==
DatasouceTypeConstant
.
SFTP
)
{
if
(
sourceTypeId
==
DatasouceTypeConstant
.
SFTP
)
{
//source
//source
...
@@ -212,8 +215,6 @@ public class SyncParameters extends AbstractParameters {
...
@@ -212,8 +215,6 @@ public class SyncParameters extends AbstractParameters {
sftpModel
.
put
(
"result_table_name"
,
tableName
);
//spark生成的临时表名
sftpModel
.
put
(
"result_table_name"
,
tableName
);
//spark生成的临时表名
source
=
source
+
FreeMarkerUtils
.
freemakerJson
(
CommConstant
.
WATERDROP_FTL_SOURCE_SFTP
,
sftpModel
,
freeMarkerConfig
);
source
=
source
+
FreeMarkerUtils
.
freemakerJson
(
CommConstant
.
WATERDROP_FTL_SOURCE_SFTP
,
sftpModel
,
freeMarkerConfig
);
}
}
//sink
}
}
//waterdrop script
//waterdrop script
Map
<
String
,
String
>
waterdropModel
=
new
HashMap
<
String
,
String
>();
Map
<
String
,
String
>
waterdropModel
=
new
HashMap
<
String
,
String
>();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment