Compare commits
134 Commits
master
...
TDI-44400_
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
82aef70d78 | ||
|
|
18a18ce336 | ||
|
|
51d66a086e | ||
|
|
93735786d2 | ||
|
|
006b9c00b9 | ||
|
|
4790a880e1 | ||
|
|
a96fdec0a7 | ||
|
|
bde9640722 | ||
|
|
a93372f60e | ||
|
|
d1559451e4 | ||
|
|
6abc8d737d | ||
|
|
69c9182794 | ||
|
|
dc62c40afe | ||
|
|
f7952374e4 | ||
|
|
de3f85fc35 | ||
|
|
e62819fd76 | ||
|
|
adca838561 | ||
|
|
e87cfa18a1 | ||
|
|
961e39ef3b | ||
|
|
205d575bab | ||
|
|
15a25708b6 | ||
|
|
4468d89b0e | ||
|
|
3a25678438 | ||
|
|
115ddb1b05 | ||
|
|
e6a755129f | ||
|
|
1938ecc8af | ||
|
|
b15d901b27 | ||
|
|
7f92ad83a1 | ||
|
|
66b0cf243b | ||
|
|
e8ec4d0337 | ||
|
|
1e30a7ea90 | ||
|
|
debbd1107f | ||
|
|
35d279a32a | ||
|
|
6416c9c9bb | ||
|
|
e03637981c | ||
|
|
52c5ef7dfa | ||
|
|
31b3974f81 | ||
|
|
0507e76d5e | ||
|
|
c484ce75b4 | ||
|
|
212c74ebb4 | ||
|
|
489125e931 | ||
|
|
c0b2bae68e | ||
|
|
1f6dd38d99 | ||
|
|
954a123f66 | ||
|
|
a40d2a2379 | ||
|
|
e20d0e57b5 | ||
|
|
e14e19e306 | ||
|
|
94534daf40 | ||
|
|
16e8c9a4fd | ||
|
|
59f80736a2 | ||
|
|
511c3ccbd0 | ||
|
|
dbf67ed4bb | ||
|
|
29a09a75bc | ||
|
|
a73c156a6a | ||
|
|
790fe2ccb4 | ||
|
|
b507ddda61 | ||
|
|
6512df89ad | ||
|
|
a5043f56e8 | ||
|
|
c8ef5195f8 | ||
|
|
2c2bb17695 | ||
|
|
95400d2a90 | ||
|
|
39cf036547 | ||
|
|
2a39dcaab8 | ||
|
|
34e490dd0f | ||
|
|
d1f7dea73c | ||
|
|
c767870d82 | ||
|
|
cc6a1bc1da | ||
|
|
fee90cdd2f | ||
|
|
b8e0a55fb7 | ||
|
|
447e26d05c | ||
|
|
8a24135a74 | ||
|
|
316f2f7e96 | ||
|
|
9693179a6e | ||
|
|
567abbf3d4 | ||
|
|
9a3617679d | ||
|
|
215cf5fe8d | ||
|
|
21be67d243 | ||
|
|
717623b206 | ||
|
|
ea13d1115d | ||
|
|
af52c4df65 | ||
|
|
e934d2112c | ||
|
|
385843d3be | ||
|
|
aae6ad44b5 | ||
|
|
a5e1f73458 | ||
|
|
47cebcbddf | ||
|
|
0efcfa2983 | ||
|
|
76b0a7a979 | ||
|
|
045d5df5df | ||
|
|
453ca6e25a | ||
|
|
844d9e6c29 | ||
|
|
9d218fbecf | ||
|
|
2e2c5f810d | ||
|
|
9c25ce552b | ||
|
|
a42b25c9bb | ||
|
|
7d6e7e1c85 | ||
|
|
cfabaf818a | ||
|
|
e2f426e39f | ||
|
|
ba1bf20653 | ||
|
|
063db841c0 | ||
|
|
a6640f95a9 | ||
|
|
d01f8a7da9 | ||
|
|
f8e9e01e31 | ||
|
|
94ff584488 | ||
|
|
1db094edd3 | ||
|
|
8b9fe33a86 | ||
|
|
4782321f64 | ||
|
|
12b61b8d5f | ||
|
|
8b26ef7e15 | ||
|
|
8ac9327375 | ||
|
|
9f4810e59e | ||
|
|
0f89caccfb | ||
|
|
c16c8f71f8 | ||
|
|
7ab0f2015a | ||
|
|
af43cd8973 | ||
|
|
4169210118 | ||
|
|
3d185eeb95 | ||
|
|
85a8f83baa | ||
|
|
d3faad612e | ||
|
|
059c211971 | ||
|
|
ce028761e5 | ||
|
|
8c2a503063 | ||
|
|
ca7263b7a1 | ||
|
|
04d41a8421 | ||
|
|
d35506dce1 | ||
|
|
5e05ca8947 | ||
|
|
51f8af8aed | ||
|
|
360f1a2612 | ||
|
|
4f668f6a46 | ||
|
|
f75fed8fd8 | ||
|
|
812ac5399d | ||
|
|
d917b791d0 | ||
|
|
9bc4abb02d | ||
|
|
3daedf72de | ||
|
|
854ac0d1b1 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -11,3 +11,4 @@ main/plugins/org.talend.designer.codegen/resources/sparkstreaming_header.javajet
|
||||
main/plugins/org.talend.designer.codegen/resources/sparkstreaming_subprocess_footer.javajet
|
||||
main/plugins/org.talend.designer.codegen/resources/sparkstreaming_subprocess_header.javajet
|
||||
main/plugins/org.talend.designer.codegen/resources/routelet.skeleton
|
||||
.DS_Store
|
||||
@@ -4,5 +4,6 @@ Huge thanks to these people who contributed in making Talend product better:
|
||||
- [jlolling](https://github.com/jlolling) (Jan -and Miss- Lolling)
|
||||
- [kirkalicious](https://github.com/kirkalicious) (Kirk Tarou)
|
||||
- [mrizzato](https://github.com/mrizzato) (Massimiliano Rizzato)
|
||||
- [overpackaging](https://github.com/overpackaging) (Steeve Dreux)
|
||||
- [brazabr](https://github.com/brazabr) (Thiago Benvenuto)
|
||||
- [phoflack](https://jira.talendforge.org/secure/ViewProfile.jspa?name=phoflack) (Philip Hoflack)
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.abstractmap.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.alfrescooutput.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.business.diagram.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.codegen.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.components.exchange.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.core.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.dbmap.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.documentation.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.fileoutputxml.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.gefabstractmap.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.mapper.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.maven.job.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.rowgenerator.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.runprocess.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.scd.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.webservice.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.xmlmap.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.expressionbuilder.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.presentation.onboarding.resource.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.presentation.onboarding.resource.tos.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.repository.ftp.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.repository.json.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.repository.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.repository.view.di.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.sbi.engines.client.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.spagic.engines.client.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.sqlbuilder.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.business.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.fragment.jars.di.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.help.tos.components.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.rcp.branding.tos.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.rcp.branding.tos.test.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.repository.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.sbi.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.spagic.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.tos.components.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.tos.core.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.tos.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.tos.libraries.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.abstractmap</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.alfrescooutput</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.business.diagram</artifactId>
|
||||
|
||||
@@ -86,11 +86,18 @@ if((codePart.equals(ECodePart.END))&&(stat || logstashCurrent)){
|
||||
for(IConnection con:connSet){
|
||||
INode source = con.getSource();
|
||||
String sourceNodeId = source.getUniqueName();
|
||||
|
||||
String sourceLabel = ElementParameterParser.getValue(source, "__LABEL__");
|
||||
String sourceNodeLabel = ((sourceLabel==null || "__UNIQUE_NAME__".equals(sourceLabel) || sourceLabel.contains("\"")) ? sourceNodeId : sourceLabel);
|
||||
|
||||
String targetLabel = ElementParameterParser.getValue(node, "__LABEL__");
|
||||
String targetNodeLabel = ((targetLabel==null || "__UNIQUE_NAME__".equals(targetLabel) || targetLabel.contains("\"")) ? node.getUniqueName() : targetLabel);
|
||||
|
||||
String sourceNodeComponent = source.getComponent().getName();
|
||||
for (INode jobStructureCatcher : jobCatcherNodes) {
|
||||
%>
|
||||
if(runStat.updateStatAndLog(execStat,enableLogStash,resourceMap,iterateId,"<%=con.getUniqueName()%>",2,0,
|
||||
<%=jobStructureCatcher.getUniqueName()%>,"<%=sourceNodeId%>","<%=sourceNodeComponent%>","<%=node.getUniqueName()%>","<%=node.getComponent().getName()%>","<%="REJECT".equals(con.getConnectorName()) ? "reject" : "output"%>")) {
|
||||
"<%=sourceNodeId%>","<%=sourceNodeLabel%>","<%=sourceNodeComponent%>","<%=node.getUniqueName()%>","<%=targetNodeLabel%>","<%=node.getComponent().getName()%>","<%="REJECT".equals(con.getConnectorName()) ? "reject" : "output"%>")) {
|
||||
<%=jobStructureCatcher.getDesignSubjobStartNode().getUniqueName() %>Process(globalMap);
|
||||
}
|
||||
<%
|
||||
@@ -113,11 +120,18 @@ if((codePart.equals(ECodePart.END))&&(stat || logstashCurrent)){
|
||||
for(IConnection con:connSet){
|
||||
INode source = con.getSource();
|
||||
String sourceNodeId = source.getUniqueName();
|
||||
|
||||
String sourceLabel = ElementParameterParser.getValue(source, "__LABEL__");
|
||||
String sourceNodeLabel = ((sourceLabel==null || "__UNIQUE_NAME__".equals(sourceLabel) || sourceLabel.contains("\"")) ? sourceNodeId : sourceLabel);
|
||||
|
||||
String targetLabel = ElementParameterParser.getValue(node, "__LABEL__");
|
||||
String targetNodeLabel = ((targetLabel==null || "__UNIQUE_NAME__".equals(targetLabel) || targetLabel.contains("\"")) ? node.getUniqueName() : targetLabel);
|
||||
|
||||
String sourceNodeComponent = source.getComponent().getName();
|
||||
for (INode jobStructureCatcher : jobCatcherNodes) {
|
||||
%>
|
||||
if(runStat.log(resourceMap,iterateId,"<%=con.getUniqueName()%>",2,0,
|
||||
<%=jobStructureCatcher.getUniqueName()%>,"<%=sourceNodeId%>","<%=sourceNodeComponent%>","<%=node.getUniqueName()%>","<%=node.getComponent().getName()%>","<%="REJECT".equals(con.getConnectorName()) ? "reject" : "output"%>")) {
|
||||
"<%=sourceNodeId%>","<%=sourceNodeLabel%>","<%=sourceNodeComponent%>","<%=node.getUniqueName()%>","<%=targetNodeLabel%>","<%=node.getComponent().getName()%>","<%="REJECT".equals(con.getConnectorName()) ? "reject" : "output"%>")) {
|
||||
<%=jobStructureCatcher.getDesignSubjobStartNode().getUniqueName() %>Process(globalMap);
|
||||
}
|
||||
<%
|
||||
|
||||
@@ -178,16 +178,41 @@
|
||||
}
|
||||
|
||||
if((codePart.equals(ECodePart.MAIN))&&(stat || logstashCurrent)&&connSet.size()>0){
|
||||
INode jobStructureCatcher = jobCatcherNodes.get(0);//about performance monitor, no way to support more than one job catcher component, also that is not necessary
|
||||
String subprocessName4Catcher = jobStructureCatcher.getDesignSubjobStartNode().getUniqueName();
|
||||
|
||||
if(!node.getComponent().useMerge()) {
|
||||
if(stat && logstashCurrent) {
|
||||
%>
|
||||
runStat.updateStatAndLog(execStat,enableLogStash,iterateId,1,1<%for(IConnection con : connSet){%>,"<%=con.getUniqueName()%>"<%}%>);
|
||||
if(runStat.update(execStat,enableLogStash,iterateId,1,1
|
||||
<%for(IConnection con : connSet){
|
||||
INode source = con.getSource();
|
||||
String sourceNodeId = source.getUniqueName();
|
||||
|
||||
String sourceLabel = ElementParameterParser.getValue(source, "__LABEL__");
|
||||
String sourceNodeLabel = ((sourceLabel==null || "__UNIQUE_NAME__".equals(sourceLabel) || sourceLabel.contains("\"")) ? sourceNodeId : sourceLabel);
|
||||
|
||||
String targetLabel = ElementParameterParser.getValue(node, "__LABEL__");
|
||||
String targetNodeLabel = ((targetLabel==null || "__UNIQUE_NAME__".equals(targetLabel) || targetLabel.contains("\"")) ? node.getUniqueName() : targetLabel);
|
||||
|
||||
String sourceNodeComponent = source.getComponent().getName();
|
||||
%>
|
||||
,"<%=con.getUniqueName()%>","<%=sourceNodeId%>","<%=sourceNodeLabel%>","<%=sourceNodeComponent%>","<%=node.getUniqueName()%>","<%=targetNodeLabel%>","<%=node.getComponent().getName()%>"
|
||||
<%}%>
|
||||
)) {
|
||||
<%=subprocessName4Catcher %>Process(globalMap);
|
||||
}
|
||||
<%
|
||||
} else {
|
||||
if(stat) {
|
||||
%>
|
||||
if(execStat){
|
||||
runStat.updateStatOnConnection(iterateId,1,1<%for(IConnection con : connSet){%>,"<%=con.getUniqueName()%>"<%}%>);
|
||||
runStat.updateStatOnConnection(iterateId,1,1
|
||||
<%for(IConnection con : connSet){
|
||||
%>
|
||||
,"<%=con.getUniqueName()%>"
|
||||
<%}%>
|
||||
);
|
||||
}
|
||||
<%
|
||||
}
|
||||
@@ -195,7 +220,24 @@
|
||||
if(logstashCurrent) {
|
||||
%>
|
||||
if(enableLogStash) {
|
||||
runStat.log(iterateId,1,1<%for(IConnection con : connSet){%>,"<%=con.getUniqueName()%>"<%}%>);
|
||||
if(runStat.updateLog(iterateId,1,1
|
||||
<%for(IConnection con : connSet){
|
||||
INode source = con.getSource();
|
||||
String sourceNodeId = source.getUniqueName();
|
||||
|
||||
String sourceLabel = ElementParameterParser.getValue(source, "__LABEL__");
|
||||
String sourceNodeLabel = ((sourceLabel==null || "__UNIQUE_NAME__".equals(sourceLabel) || sourceLabel.contains("\"")) ? sourceNodeId : sourceLabel);
|
||||
|
||||
String targetLabel = ElementParameterParser.getValue(node, "__LABEL__");
|
||||
String targetNodeLabel = ((targetLabel==null || "__UNIQUE_NAME__".equals(targetLabel) || targetLabel.contains("\"")) ? node.getUniqueName() : targetLabel);
|
||||
|
||||
String sourceNodeComponent = source.getComponent().getName();
|
||||
%>
|
||||
,"<%=con.getUniqueName()%>","<%=sourceNodeId%>","<%=sourceNodeLabel%>","<%=sourceNodeComponent%>","<%=node.getUniqueName()%>","<%=targetNodeLabel%>","<%=node.getComponent().getName()%>"
|
||||
<%}%>
|
||||
)) {
|
||||
<%=subprocessName4Catcher %>Process(globalMap);
|
||||
}
|
||||
}
|
||||
<%
|
||||
}
|
||||
@@ -205,18 +247,62 @@
|
||||
if(connection.getUniqueName().equals((String)codeGenArgument.getIncomingName())){
|
||||
if(stat && logstashCurrent) {
|
||||
%>
|
||||
runStat.updateStatAndLog(execStat,enableLogStash,iterateId,1,1<%for(IConnection con : connSet){if(con.getUniqueName().equals((String)codeGenArgument.getIncomingName())){%>,"<%=con.getUniqueName()%>"<%}}%>);
|
||||
if(runStat.update(execStat,enableLogStash,iterateId,1,1
|
||||
<%for(IConnection con : connSet){
|
||||
INode source = con.getSource();
|
||||
String sourceNodeId = source.getUniqueName();
|
||||
|
||||
String sourceLabel = ElementParameterParser.getValue(source, "__LABEL__");
|
||||
String sourceNodeLabel = ((sourceLabel==null || "__UNIQUE_NAME__".equals(sourceLabel) || sourceLabel.contains("\"")) ? sourceNodeId : sourceLabel);
|
||||
|
||||
String targetLabel = ElementParameterParser.getValue(node, "__LABEL__");
|
||||
String targetNodeLabel = ((targetLabel==null || "__UNIQUE_NAME__".equals(targetLabel) || targetLabel.contains("\"")) ? node.getUniqueName() : targetLabel);
|
||||
|
||||
String sourceNodeComponent = source.getComponent().getName();
|
||||
|
||||
if(con.getUniqueName().equals((String)codeGenArgument.getIncomingName())){%>
|
||||
,"<%=con.getUniqueName()%>","<%=sourceNodeId%>","<%=sourceNodeLabel%>","<%=sourceNodeComponent%>","<%=node.getUniqueName()%>","<%=targetNodeLabel%>","<%=node.getComponent().getName()%>"
|
||||
<%}
|
||||
}%>
|
||||
)) {
|
||||
<%=subprocessName4Catcher %>Process(globalMap);
|
||||
}
|
||||
<%
|
||||
} else {
|
||||
if(stat) {%>
|
||||
if(execStat){
|
||||
runStat.updateStatOnConnection(iterateId,1,1<%for(IConnection con : connSet){if(con.getUniqueName().equals((String)codeGenArgument.getIncomingName())){%>,"<%=con.getUniqueName()%>"<%}}%>);
|
||||
runStat.updateStatOnConnection(iterateId,1,1
|
||||
<%for(IConnection con : connSet){
|
||||
if(con.getUniqueName().equals((String)codeGenArgument.getIncomingName())){%>
|
||||
,"<%=con.getUniqueName()%>"
|
||||
<%}
|
||||
}%>
|
||||
);
|
||||
}
|
||||
<%}
|
||||
|
||||
if(logstashCurrent) {%>
|
||||
if(enableLogStash) {
|
||||
runStat.log(iterateId,1,1<%for(IConnection con : connSet){if(con.getUniqueName().equals((String)codeGenArgument.getIncomingName())){%>,"<%=con.getUniqueName()%>"<%}}%>);
|
||||
if(runStat.updateLog(iterateId,1,1
|
||||
<%for(IConnection con : connSet){
|
||||
INode source = con.getSource();
|
||||
String sourceNodeId = source.getUniqueName();
|
||||
|
||||
String sourceLabel = ElementParameterParser.getValue(source, "__LABEL__");
|
||||
String sourceNodeLabel = ((sourceLabel==null || "__UNIQUE_NAME__".equals(sourceLabel) || sourceLabel.contains("\"")) ? sourceNodeId : sourceLabel);
|
||||
|
||||
String targetLabel = ElementParameterParser.getValue(node, "__LABEL__");
|
||||
String targetNodeLabel = ((targetLabel==null || "__UNIQUE_NAME__".equals(targetLabel) || targetLabel.contains("\"")) ? node.getUniqueName() : targetLabel);
|
||||
|
||||
String sourceNodeComponent = source.getComponent().getName();
|
||||
|
||||
if(con.getUniqueName().equals((String)codeGenArgument.getIncomingName())){%>
|
||||
,"<%=con.getUniqueName()%>","<%=sourceNodeId%>","<%=sourceNodeLabel%>","<%=sourceNodeComponent%>","<%=node.getUniqueName()%>","<%=targetNodeLabel%>","<%=node.getComponent().getName()%>"
|
||||
<%}
|
||||
}%>
|
||||
)) {
|
||||
<%=subprocessName4Catcher %>Process(globalMap);
|
||||
}
|
||||
}
|
||||
<%}
|
||||
}
|
||||
@@ -248,9 +334,11 @@
|
||||
|
||||
if(logstashCurrent) {
|
||||
for (INode jobStructureCatcher : jobCatcherNodes) {
|
||||
String label = ElementParameterParser.getValue(node, "__LABEL__");
|
||||
String nodeLabel = ((label==null || "__UNIQUE_NAME__".equals(label) || label.contains("\"")) ? node.getUniqueName() : label);
|
||||
%>
|
||||
if(enableLogStash) {
|
||||
<%=jobStructureCatcher.getUniqueName() %>.addCM("<%=node.getUniqueName()%>", "<%=node.getComponent().getName()%>");
|
||||
<%=jobStructureCatcher.getUniqueName() %>.addCM("<%=node.getUniqueName()%>", "<%=nodeLabel%>", "<%=node.getComponent().getName()%>");
|
||||
<%=jobStructureCatcher.getDesignSubjobStartNode().getUniqueName() %>Process(globalMap);
|
||||
}
|
||||
<%
|
||||
|
||||
@@ -108,6 +108,21 @@
|
||||
exist_tSQLDB = true;
|
||||
}
|
||||
|
||||
|
||||
String[] tcompV0Components = new String[] {
|
||||
"tAzureStorageConnection",
|
||||
"tGoogleDriveConnection",
|
||||
"tMarketoConnection",
|
||||
"tSnowflakeConnection",
|
||||
"tSalesforceConnection",
|
||||
"tNetsuiteConnection",
|
||||
"tMarkLogicConnection"
|
||||
};
|
||||
List<INode> tcompV0ComponentsList = new ArrayList<INode>();
|
||||
for (String tcompV0Component : tcompV0Components) {
|
||||
tcompV0ComponentsList.addAll((List<INode>)process.getNodesOfType(tcompV0Component));
|
||||
}
|
||||
|
||||
boolean exist_tSCP = false;
|
||||
List<INode> scpComponentsList = (List<INode>)process.getNodesOfType("tSCPConnection");
|
||||
if (scpComponentsList.size() > 0) {
|
||||
@@ -167,6 +182,8 @@
|
||||
exist_tSalesforce = true;
|
||||
}
|
||||
|
||||
List<INode> snowflakeComponentsList = (List<INode>)process.getNodesOfType("tSnowflakeConnection");
|
||||
|
||||
boolean exist_tSAP= false;
|
||||
List<INode> sapComponentsList = (List<INode>)process.getNodesOfType("tSAPConnection");
|
||||
if (sapComponentsList.size() > 0) {
|
||||
@@ -447,7 +464,7 @@
|
||||
lastStr = "";
|
||||
}
|
||||
}
|
||||
enableLogStash = "true".equalsIgnoreCase(System.getProperty("monitoring"));
|
||||
enableLogStash = "true".equalsIgnoreCase(System.getProperty("audit.enabled"));
|
||||
|
||||
<%if(isLog4jEnabled){%>
|
||||
if(!"".equals(log4jLevel)){
|
||||
@@ -519,15 +536,15 @@
|
||||
properties_<%=jobCatcherNode.getUniqueName()%>.setProperty("host", "false");
|
||||
|
||||
System.getProperties().stringPropertyNames().stream()
|
||||
.filter(it -> it.startsWith("monitoring.audit.logger.properties."))
|
||||
.forEach(key -> properties_<%=jobCatcherNode.getUniqueName()%>.setProperty(key.substring("monitoring.audit.logger.properties.".length()), System.getProperty(key)));
|
||||
.filter(it -> it.startsWith("audit.logger."))
|
||||
.forEach(key -> properties_<%=jobCatcherNode.getUniqueName()%>.setProperty(key.substring("audit.logger.".length()), System.getProperty(key)));
|
||||
|
||||
<%if(isLog4j1Enabled) {%>
|
||||
org.apache.log4j.Logger.getLogger("audit").setLevel(org.apache.log4j.Level.DEBUG);
|
||||
org.apache.log4j.Logger.getLogger(properties_<%=jobCatcherNode.getUniqueName()%>.getProperty("root.logger")).setLevel(org.apache.log4j.Level.DEBUG);
|
||||
<%}%>
|
||||
|
||||
<%if(isLog4j2Enabled) {%>
|
||||
org.apache.logging.log4j.core.config.Configurator.setLevel("audit", org.apache.logging.log4j.Level.DEBUG);
|
||||
org.apache.logging.log4j.core.config.Configurator.setLevel(properties_<%=jobCatcherNode.getUniqueName()%>.getProperty("root.logger"), org.apache.logging.log4j.Level.DEBUG);
|
||||
<%}%>
|
||||
auditLogger_<%=jobCatcherNode.getUniqueName()%> = org.talend.job.audit.JobEventAuditLoggerFactory.createJobAuditLogger(properties_<%=jobCatcherNode.getUniqueName()%>);
|
||||
}
|
||||
@@ -619,7 +636,16 @@
|
||||
} //endIf
|
||||
%>
|
||||
context.setContextType("<%=ctxParam.getName()%>", "<%=ctxParam.getType()%>");
|
||||
if(context.getStringValue("<%=ctxParam.getName()%>") == null) {
|
||||
context.<%=ctxParam.getName()%> = null;
|
||||
} else {
|
||||
<%//}B1 block%>
|
||||
<%
|
||||
String typeToGenerate ="String";
|
||||
if( !(ctxParam.getType().equals("id_File") || ctxParam.getType().equals("id_Directory") ||ctxParam.getType().equals("id_List Of Value"))) {
|
||||
typeToGenerate=JavaTypesManager.getTypeToGenerate(ctxParam.getType(),true);
|
||||
}
|
||||
|
||||
if (ctxParam.getType().equals("id_Password")) {
|
||||
%>
|
||||
String pwd_<%=ctxParam.getName()%>_value = context.getProperty("<%=ctxParam.getName()%>");
|
||||
@@ -637,13 +663,7 @@
|
||||
}
|
||||
}
|
||||
<%
|
||||
continue;
|
||||
}
|
||||
String typeToGenerate ="String";
|
||||
if( !(ctxParam.getType().equals("id_File") || ctxParam.getType().equals("id_Directory") ||ctxParam.getType().equals("id_List Of Value"))) {
|
||||
typeToGenerate=JavaTypesManager.getTypeToGenerate(ctxParam.getType(),true);
|
||||
}
|
||||
if(typeToGenerate.equals("java.util.Date")) {
|
||||
} else if(typeToGenerate.equals("java.util.Date")) {
|
||||
%>
|
||||
try{
|
||||
String context_<%=ctxParam.getName()%>_value = context.getProperty("<%=ctxParam.getName()%>");
|
||||
@@ -702,6 +722,10 @@
|
||||
}
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<%//{B1 block%>
|
||||
}
|
||||
<%
|
||||
}
|
||||
%>
|
||||
} <%/*close last method*/%>
|
||||
@@ -872,20 +896,6 @@ if(execStat) {
|
||||
}
|
||||
%>
|
||||
|
||||
<%if (hadoopClusterIds.size() > 1) {%>
|
||||
System.err.println("Only one hadoop configuration is allowed in one job!");
|
||||
<%}%>
|
||||
|
||||
<%
|
||||
// run tHadoopConfManager component if there is it.
|
||||
if(!hadoopConfNodes.isEmpty()) {
|
||||
INode hadoopConfNode = hadoopConfNodes.get(0);
|
||||
%>
|
||||
<%=createCallProcess(hadoopConfNode, className, false) %>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
|
||||
<%
|
||||
//2. load implicit contextload
|
||||
if(implicit_Context != null) {
|
||||
@@ -908,6 +918,21 @@ this.globalResumeTicket = true;//to run tPreJob
|
||||
}
|
||||
%>
|
||||
|
||||
<%if (hadoopClusterIds.size() > 1) {%>
|
||||
System.err.println("Only one hadoop configuration is allowed in one job!");
|
||||
<%}%>
|
||||
|
||||
<%
|
||||
// run tHadoopConfManager component if there is it.
|
||||
if(!hadoopConfNodes.isEmpty()) {
|
||||
INode hadoopConfNode = hadoopConfNodes.get(0);
|
||||
if (hadoopConfNode.isStart()) {
|
||||
%>
|
||||
<%=createCallProcess(hadoopConfNode, className, false) %>
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
|
||||
<%
|
||||
//4. flush the begin msg
|
||||
@@ -1320,13 +1345,11 @@ if (execStat) {
|
||||
} else {
|
||||
type = "ftp";
|
||||
}
|
||||
if ("ftp".equals(type)) { %>
|
||||
((com.enterprisedt.net.ftp.FTPClient) obj_conn).quit();
|
||||
<%} else if ("sftp".equals(type)) { %>
|
||||
if ("sftp".equals(type)) { %>
|
||||
((com.jcraft.jsch.ChannelSftp) obj_conn).quit();
|
||||
<%} else { %>
|
||||
((org.apache.commons.net.ftp.FTPSClient) obj_conn).disconnect();
|
||||
<%}%>
|
||||
<%} else { %>
|
||||
((org.apache.commons.net.ftp.FTPClient) obj_conn).disconnect();
|
||||
<%}%>
|
||||
}
|
||||
<% } %>
|
||||
} catch (java.lang.Exception e) {
|
||||
@@ -1416,11 +1439,24 @@ if (execStat) {
|
||||
private void closeGSConnections() {
|
||||
try {
|
||||
<% for (INode gsComponent : gsComponentsList) { %>
|
||||
org.jets3t.service.impl.rest.httpclient.GoogleStorageService service_<%=gsComponent.getUniqueName()%> =
|
||||
(org.jets3t.service.impl.rest.httpclient.GoogleStorageService)globalMap.get("service_<%=gsComponent.getUniqueName()%>");
|
||||
if(service_<%=gsComponent.getUniqueName()%> !=null){
|
||||
service_<%=gsComponent.getUniqueName()%>.shutdown();
|
||||
}
|
||||
|
||||
<%
|
||||
String authType = ElementParameterParser.getValue(gsComponent, "__AUTH_TYPE__");
|
||||
if (authType.equals("USER_ACCOUNT_HMAC")){
|
||||
%>
|
||||
|
||||
org.jets3t.service.impl.rest.httpclient.GoogleStorageService service_<%=gsComponent.getUniqueName()%> =
|
||||
(org.jets3t.service.impl.rest.httpclient.GoogleStorageService)globalMap.get("service_<%=gsComponent.getUniqueName()%>");
|
||||
if(service_<%=gsComponent.getUniqueName()%> !=null){
|
||||
service_<%=gsComponent.getUniqueName()%>.shutdown();
|
||||
}
|
||||
<%
|
||||
} else if (authType.equals("SERVICE_ACCOUNT")) {
|
||||
%>
|
||||
//Don't need to close storage when use google storage api
|
||||
<%
|
||||
}
|
||||
%>
|
||||
|
||||
<% } %>
|
||||
} catch (java.lang.Exception e) {
|
||||
@@ -1501,12 +1537,14 @@ if (execStat) {
|
||||
<% } %>
|
||||
<% for (INode existNode : existComponentsList) { %>
|
||||
connections.put("col_<%=existNode.getUniqueName()%>", globalMap.get("col_<%=existNode.getUniqueName()%>"));
|
||||
<% } %>
|
||||
<% }
|
||||
|
||||
<% for (INode salesforceNode : salesforceComponentsList) { %>
|
||||
connections.put("conn_<%=salesforceNode.getUniqueName()%>", globalMap.get("conn_<%=salesforceNode.getUniqueName()%>"));
|
||||
<% } %>
|
||||
<% for (INode sapNode : sapComponentsList) { %>
|
||||
for (INode tcompV0ConnectionNode : tcompV0ComponentsList) { %>
|
||||
connections.put("<%=tcompV0ConnectionNode.getUniqueName()%>_connection", globalMap.get("<%=tcompV0ConnectionNode.getUniqueName()%>_connection"));
|
||||
connections.put("<%=tcompV0ConnectionNode.getUniqueName()%>_COMPONENT_RUNTIME_PROPERTIES", globalMap.get("<%=tcompV0ConnectionNode.getUniqueName()%>_COMPONENT_RUNTIME_PROPERTIES"));
|
||||
<% }
|
||||
|
||||
for (INode sapNode : sapComponentsList) { %>
|
||||
connections.put("conn_<%=sapNode.getUniqueName()%>", globalMap.get("conn_<%=sapNode.getUniqueName()%>"));
|
||||
<% } %>
|
||||
<% for (INode gsNode : gsComponentsList) { %>
|
||||
@@ -1570,7 +1608,7 @@ if (execStat) {
|
||||
}
|
||||
} else if (arg.startsWith("--log4jLevel=")) {
|
||||
log4jLevel = arg.substring(13);
|
||||
} else if (arg.startsWith("--monitoring") && arg.contains("=")) {//for trunjob call
|
||||
} else if (arg.startsWith("--audit.enabled") && arg.contains("=")) {//for trunjob call
|
||||
final int equal = arg.indexOf('=');
|
||||
final String key = arg.substring("--".length(), equal);
|
||||
System.setProperty(key, arg.substring(equal + 1));
|
||||
|
||||
@@ -116,7 +116,11 @@ class IndexedRecordToRowStructGenerator {
|
||||
routines.system.DynamicMetadata dynamicMetadata_<%=cid%> = new routines.system.DynamicMetadata();
|
||||
org.apache.avro.Schema dynamicFieldSchema_<%=cid%> = dynamicField_<%=cid%>.schema();
|
||||
// set name
|
||||
dynamicMetadata_<%=cid%>.setName(dynamicField_<%=cid%>.name());
|
||||
if("true".equals(dynamicField_<%=cid%>.getProp("ENABLE_SPECIAL_TABLENAME"))){
|
||||
dynamicMetadata_<%=cid%>.setName(dynamicField_<%=cid%>.getProp("talend.field.dbColumnName"));
|
||||
}else{
|
||||
dynamicMetadata_<%=cid%>.setName(dynamicField_<%=cid%>.name());
|
||||
}
|
||||
// set db name
|
||||
dynamicMetadata_<%=cid%>.setDbName(dynamicField_<%=cid%>.name());
|
||||
// set nullable
|
||||
@@ -166,6 +170,14 @@ class IndexedRecordToRowStructGenerator {
|
||||
if (columnName.equals(dynamicColName)) {
|
||||
%>
|
||||
java.util.Map<String, Object> dynamicValue_<%=cid%> = (java.util.Map<String, Object>) <%=codeVarSchemaEnforcer%>.get(<%=i%>);
|
||||
org.apache.avro.Schema dynSchema_<%=cid%> = ((org.talend.codegen.enforcer.OutgoingDynamicSchemaEnforcer) <%=codeVarSchemaEnforcer%>).getDynamicFieldsSchema();
|
||||
for (org.apache.avro.Schema.Field dynamicField_<%=cid%> : dynSchema_<%=cid%>.getFields()){
|
||||
String name = dynamicField_<%=cid%>.name();
|
||||
if("true".equals(dynamicField_<%=cid%>.getProp("ENABLE_SPECIAL_TABLENAME"))){
|
||||
dynamicValue_<%=cid%>.put(dynamicField_<%=cid%>.getProp("talend.field.dbColumnName"), dynamicValue_<%=cid%>.get(name));
|
||||
dynamicValue_<%=cid%>.remove(name);
|
||||
}
|
||||
}
|
||||
for (java.util.Map.Entry<String, Object> dynamicValueEntry_<%=cid%> : dynamicValue_<%=cid%>.entrySet()) {
|
||||
<%=codeVarDynamic%>.setColumnValue(<%=codeVarDynamic%>.getIndex(dynamicValueEntry_<%=cid%>.getKey()), dynamicValueEntry_<%=cid%>.getValue());
|
||||
}
|
||||
|
||||
@@ -298,6 +298,15 @@ if(isRunInMultiThread){
|
||||
}
|
||||
<% } %>
|
||||
}
|
||||
|
||||
//if the stored or passed value is "<TALEND_NULL>" string, it mean null
|
||||
public String getStringValue(String key) {
|
||||
String origin_value = this.getProperty(key);
|
||||
if(NULL_VALUE_EXPRESSION_IN_COMMAND_STRING_FOR_CHILD_JOB_ONLY.equals(origin_value)) {
|
||||
return null;
|
||||
}
|
||||
return origin_value;
|
||||
}
|
||||
|
||||
<%
|
||||
for (IContextParameter ctxParam :params)
|
||||
@@ -381,7 +390,14 @@ public <%=JavaTypesManager.getTypeToGenerate(ctxParam.getType(),true)%> get<%=Ch
|
||||
}
|
||||
}
|
||||
boolean enableLogStash = jobCatcherNode != null;
|
||||
if (stats || enableLogStash) {
|
||||
if (enableLogStash) {
|
||||
%>
|
||||
private final JobStructureCatcherUtils <%=jobCatcherNode.getUniqueName() %> = new JobStructureCatcherUtils(jobName, "<%=process.getId() %>", "<%=process.getVersion() %>");
|
||||
private org.talend.job.audit.JobAuditLogger auditLogger_<%=jobCatcherNode.getUniqueName()%> = null;
|
||||
|
||||
private RunStat runStat = new RunStat(<%=jobCatcherNode.getUniqueName() %>);
|
||||
<%
|
||||
} else if(stats) {
|
||||
%>
|
||||
private RunStat runStat = new RunStat();
|
||||
<%
|
||||
@@ -422,13 +438,6 @@ private RunTrace runTrace = new RunTrace();
|
||||
<%
|
||||
}
|
||||
|
||||
if(enableLogStash) {
|
||||
%>
|
||||
JobStructureCatcherUtils <%=jobCatcherNode.getUniqueName() %> = new JobStructureCatcherUtils(jobName, "<%=process.getId() %>", "<%=process.getVersion() %>");
|
||||
org.talend.job.audit.JobAuditLogger auditLogger_<%=jobCatcherNode.getUniqueName()%> = null;
|
||||
<%
|
||||
}
|
||||
|
||||
for (INode metterCatcher : process.getNodesOfType("tFlowMeterCatcher")) {
|
||||
%>
|
||||
MetterCatcherUtils <%=metterCatcher.getUniqueName() %> = new MetterCatcherUtils("<%=process.getId() %>", "<%=process.getVersion() %>");
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.codegen</artifactId>
|
||||
|
||||
@@ -66,6 +66,7 @@ import org.talend.designer.codegen.model.CodeGeneratorEmittersPoolFactory;
|
||||
import org.talend.designer.codegen.model.CodeGeneratorInternalTemplatesFactoryProvider;
|
||||
import org.talend.designer.codegen.proxy.JetProxy;
|
||||
import org.talend.designer.core.generic.model.Component;
|
||||
import org.talend.designer.runprocess.ProcessorUtilities;
|
||||
|
||||
/**
|
||||
* CodeGenerator.
|
||||
@@ -353,8 +354,12 @@ public class CodeGenerator implements ICodeGenerator {
|
||||
.getDefault().getService(IResourcesDependenciesService.class);
|
||||
String resourcePathForContext = null;
|
||||
if (process instanceof IProcess2) {
|
||||
resourcePathForContext = resourceService.getResourcePathForContext(process,
|
||||
contextPar.getValue());
|
||||
String value = contextPar.getValue();
|
||||
// for runtime
|
||||
if (!ProcessorUtilities.isExportConfig()) {
|
||||
contextPar.setType(JavaTypesManager.FILE.getId());
|
||||
}
|
||||
resourcePathForContext = resourceService.getResourcePathForContext(process, value);
|
||||
} else {
|
||||
// for PreviewFileInputContentDataProcess run
|
||||
resourcePathForContext = resourceService.getResourceItemFilePath(contextPar.getValue());
|
||||
|
||||
@@ -28,9 +28,9 @@ import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.ResourceBundle;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.Semaphore;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
@@ -70,7 +70,6 @@ import org.talend.core.model.components.ComponentCategory;
|
||||
import org.talend.core.model.components.ComponentManager;
|
||||
import org.talend.core.model.components.ComponentProviderInfo;
|
||||
import org.talend.core.model.components.ComponentUtilities;
|
||||
import org.talend.core.model.components.EComponentType;
|
||||
import org.talend.core.model.components.IComponent;
|
||||
import org.talend.core.model.components.IComponentsFactory;
|
||||
import org.talend.core.model.components.IComponentsHandler;
|
||||
@@ -838,23 +837,21 @@ public class ComponentsFactory implements IComponentsFactory {
|
||||
init(false);
|
||||
}
|
||||
|
||||
for (IComponent comp : componentList) {
|
||||
if (comp.getComponentType() != EComponentType.JOBLET) {
|
||||
continue;
|
||||
}
|
||||
String comName = comp.getName();
|
||||
if (comp != null && paletteType.equals(comp.getPaletteType())) {
|
||||
if (comName.equals(name)) {
|
||||
return comp;
|
||||
} else if (new JobletUtil().matchExpression(comName)) {
|
||||
String[] names = comName.split(":"); //$NON-NLS-1$
|
||||
comName = names[1];
|
||||
if (comName.equals(name)) {
|
||||
return comp;
|
||||
}
|
||||
// check if reference joblet component presents
|
||||
JobletUtil jobletUtils = new JobletUtil();
|
||||
Optional<IComponent> result = jobletUtils.findComponentByName(componentList, name, paletteType);
|
||||
if (!result.isPresent()) {
|
||||
// check if any name matching joblet component presents
|
||||
if (jobletUtils.matchExpression(name)) {
|
||||
name = StringUtils.substringAfterLast(name, ":"); //$NON-NLS-1$
|
||||
if (StringUtils.isNotBlank(name)) {
|
||||
result = jobletUtils.findComponentByName(componentList, name, paletteType);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (result.isPresent()) {
|
||||
return result.get();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -60,6 +60,7 @@ public enum EInternalTemplate {
|
||||
// just to have compiled templates
|
||||
FOOTER_ROUTE("footer_route", "0.0.1"), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
HEADER_ROUTE("header_route", "0.0.1"), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
MICROSERVICE_APP_SECURITY("microservice_app_security","0.0.1"), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
CAMEL_RUNIF("camel_run_if", "0.0.1"), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
CAMEL_SPECIALLINKS("camel_speciallinks", "0.0.1"), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
MICROSERVICE_APP("microservice_app", "0.0.1"), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.components.exchange</artifactId>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
<groupId>org.talend.components</groupId>
|
||||
<artifactId>google-storage-utils</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<version>1.1.0</version>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<talend.nexus.url>https://artifacts-oss.talend.com</talend.nexus.url>
|
||||
@@ -46,6 +46,12 @@
|
||||
<artifactId>jets3t</artifactId>
|
||||
<version>0.9.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-api</artifactId>
|
||||
<version>5.6.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<distributionManagement>
|
||||
<snapshotRepository>
|
||||
@@ -64,8 +70,8 @@
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>2.3.2</version>
|
||||
<configuration>
|
||||
<source>1.6</source>
|
||||
<target>1.6</target>
|
||||
<source>8</source>
|
||||
<target>8</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
|
||||
@@ -5,8 +5,10 @@ import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.jets3t.service.model.GSObject;
|
||||
@@ -44,6 +46,50 @@ public class GSObjectUtil {
|
||||
return objects;
|
||||
}
|
||||
|
||||
public Map<String, File> generateFileMap(File rootFile, String directory, Map<String, String> filter){
|
||||
Map<String, File> allFiles = generateFileMap(rootFile, directory);
|
||||
Map<String, File> resultMap = new HashMap<>();
|
||||
for (Map.Entry<String, String> entry : filter.entrySet()) {
|
||||
//key is path to file on local machine
|
||||
//value is new path in GS
|
||||
File currentFile = new File(entry.getKey());
|
||||
if (allFiles.containsValue(currentFile)){
|
||||
resultMap.put(entry.getValue(), currentFile);
|
||||
}
|
||||
}
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
public Map<String, File> generateFileMap(File rootFile, String directory){
|
||||
if (rootFile == null){
|
||||
throw new IllegalArgumentException("File can't be null");
|
||||
}
|
||||
if (directory == null){
|
||||
throw new IllegalArgumentException("Directory name can't be null");
|
||||
}
|
||||
|
||||
if (!directory.isEmpty() && !"/".equals(directory.substring(directory.length()-1))){
|
||||
directory = directory + "/";
|
||||
}
|
||||
|
||||
Map<String,File> fileMap = new HashMap<>();
|
||||
|
||||
if (!rootFile.isDirectory()){
|
||||
fileMap.put(directory + rootFile.getName(), rootFile);
|
||||
return fileMap;
|
||||
}
|
||||
|
||||
String pathToDirectory = rootFile.getAbsolutePath();
|
||||
List<File> allFiles = listAllFiles(pathToDirectory);
|
||||
|
||||
for (File currentFile : allFiles){
|
||||
if (!currentFile.isDirectory()){
|
||||
fileMap.put(combineTwoNames(pathToDirectory, directory, currentFile), currentFile);
|
||||
}
|
||||
}
|
||||
return fileMap;
|
||||
}
|
||||
|
||||
public java.util.Map<String, String> genFileFilterList(java.util.List<java.util.Map<String, String>> list,
|
||||
String localdir, String remotedir) {
|
||||
if (remotedir != null && !"".equals(remotedir)) {
|
||||
@@ -120,4 +166,23 @@ public class GSObjectUtil {
|
||||
InputStream mimetypesFile = this.getClass().getResourceAsStream("/resource/mime.types");
|
||||
Mimetypes.getInstance().loadAndReplaceMimetypes(mimetypesFile);
|
||||
}
|
||||
|
||||
private List<File> listAllFiles(String directoryName) {
|
||||
File directory = new File(directoryName);
|
||||
List<File> resultList = new ArrayList<>();
|
||||
File[] fList = directory.listFiles();
|
||||
resultList.addAll(Arrays.asList(fList));
|
||||
for (File file : fList) {
|
||||
if (file.isDirectory()) {
|
||||
resultList.addAll(listAllFiles(file.getAbsolutePath()));
|
||||
}
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
|
||||
private String combineTwoNames(String coreDir, String targetDir, File file){
|
||||
String filePath = file.getAbsolutePath();
|
||||
String relativePath = targetDir + filePath.replace(coreDir + "/", "");
|
||||
return relativePath;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,129 @@
|
||||
package util;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.talend.gs.util.GSObjectUtil;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Map;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
class GSObjectUtilTest {
|
||||
|
||||
@Test
|
||||
void checkSizeOfFilesInFolderTest() {
|
||||
String pathToDirectory = "src/test/resources/dirWithThreeFiles";
|
||||
String pathToFile1 = "src/test/resources/dirWithThreeFiles/1.csv";
|
||||
String pathToFile2 = "src/test/resources/dirWithThreeFiles/2.csv";
|
||||
String pathToFile3 = "src/test/resources/dirWithThreeFiles/3.csv";
|
||||
String pathToFile4 = "src/test/resources/dirWithThreeFiles/inner/1.csv";
|
||||
|
||||
String expectedRelativePathToFile1 = "/1.csv";
|
||||
String expectedRelativePathToFile2 = "/2.csv";
|
||||
String expectedRelativePathToFile3 = "/3.csv";
|
||||
String expectedRelativePathToFile4 = "/inner/1.csv";
|
||||
|
||||
File rootFile = new File(pathToDirectory);
|
||||
GSObjectUtil gsObjectUtil = new GSObjectUtil();
|
||||
Map<String, File> files = gsObjectUtil.generateFileMap(rootFile, "/");
|
||||
assertEquals(4, files.size());
|
||||
|
||||
File expectedFile1 = new File(pathToFile1);
|
||||
File expectedFile2 = new File(pathToFile2);
|
||||
File expectedFile3 = new File(pathToFile3);
|
||||
File expectedFile4 = new File(pathToFile4);
|
||||
|
||||
assertTrue(files.containsKey(expectedRelativePathToFile1));
|
||||
assertTrue(files.containsKey(expectedRelativePathToFile2));
|
||||
assertTrue(files.containsKey(expectedRelativePathToFile3));
|
||||
assertTrue(files.containsKey(expectedRelativePathToFile4));
|
||||
|
||||
assertEquals(expectedFile1.getAbsoluteFile(), files.get(expectedRelativePathToFile1).getAbsoluteFile());
|
||||
assertEquals(expectedFile2.getAbsoluteFile(), files.get(expectedRelativePathToFile2).getAbsoluteFile());
|
||||
assertEquals(expectedFile3.getAbsoluteFile(), files.get(expectedRelativePathToFile3).getAbsoluteFile());
|
||||
assertEquals(expectedFile4.getAbsoluteFile(), files.get(expectedRelativePathToFile4).getAbsoluteFile());
|
||||
}
|
||||
|
||||
@Test
|
||||
void checkSizeOfFilesInFolder2Test() {
|
||||
String pathToDirectory = "src/test/resources/dirWithThreeFiles";
|
||||
String pathToFile1 = "src/test/resources/dirWithThreeFiles/1.csv";
|
||||
String pathToFile2 = "src/test/resources/dirWithThreeFiles/2.csv";
|
||||
String pathToFile3 = "src/test/resources/dirWithThreeFiles/3.csv";
|
||||
String pathToFile4 = "src/test/resources/dirWithThreeFiles/inner/1.csv";
|
||||
|
||||
String expectedRelativePathToFile1 = "1.csv";
|
||||
String expectedRelativePathToFile2 = "2.csv";
|
||||
String expectedRelativePathToFile3 = "3.csv";
|
||||
String expectedRelativePathToFile4 = "inner/1.csv";
|
||||
|
||||
File rootFile = new File(pathToDirectory);
|
||||
GSObjectUtil gsObjectUtil = new GSObjectUtil();
|
||||
Map<String, File> files = gsObjectUtil.generateFileMap(rootFile, "");
|
||||
assertEquals(4, files.size());
|
||||
|
||||
File expectedFile1 = new File(pathToFile1);
|
||||
File expectedFile2 = new File(pathToFile2);
|
||||
File expectedFile3 = new File(pathToFile3);
|
||||
File expectedFile4 = new File(pathToFile4);
|
||||
|
||||
assertTrue(files.containsKey(expectedRelativePathToFile1));
|
||||
assertTrue(files.containsKey(expectedRelativePathToFile2));
|
||||
assertTrue(files.containsKey(expectedRelativePathToFile3));
|
||||
assertTrue(files.containsKey(expectedRelativePathToFile4));
|
||||
|
||||
assertEquals(expectedFile1.getAbsoluteFile(), files.get(expectedRelativePathToFile1).getAbsoluteFile());
|
||||
assertEquals(expectedFile2.getAbsoluteFile(), files.get(expectedRelativePathToFile2).getAbsoluteFile());
|
||||
assertEquals(expectedFile3.getAbsoluteFile(), files.get(expectedRelativePathToFile3).getAbsoluteFile());
|
||||
assertEquals(expectedFile4.getAbsoluteFile(), files.get(expectedRelativePathToFile4).getAbsoluteFile());
|
||||
}
|
||||
|
||||
@Test
|
||||
void oneFileWithCustomPathTest(){
|
||||
String pathToFile = "src/test/resources/empty.csv";
|
||||
String pathToFolder = "/folder/folder";
|
||||
File expectedFile = new File(pathToFile);
|
||||
GSObjectUtil gsObjectUtil = new GSObjectUtil();
|
||||
|
||||
Map<String, File> files = gsObjectUtil.generateFileMap(expectedFile, pathToFolder);
|
||||
|
||||
String expectedRelativePathToFile = "/folder/folder/empty.csv";
|
||||
|
||||
assertEquals(1, files.size());
|
||||
assertTrue(files.containsKey(expectedRelativePathToFile));
|
||||
assertEquals(expectedFile.getAbsoluteFile(), files.get(expectedRelativePathToFile).getAbsoluteFile());
|
||||
}
|
||||
|
||||
@Test
|
||||
void oneFileWithOtherCustomPathTest(){
|
||||
String pathToFile = "src/test/resources/empty.csv";
|
||||
String pathToFolder = "folder/folder";
|
||||
File expectedFile = new File(pathToFile);
|
||||
GSObjectUtil gsObjectUtil = new GSObjectUtil();
|
||||
|
||||
Map<String, File> files = gsObjectUtil.generateFileMap(expectedFile, pathToFolder);
|
||||
|
||||
String expectedRelativePathToFile = "folder/folder/empty.csv";
|
||||
|
||||
assertEquals(1, files.size());
|
||||
assertTrue(files.containsKey(expectedRelativePathToFile));
|
||||
assertEquals(expectedFile.getAbsoluteFile(), files.get(expectedRelativePathToFile).getAbsoluteFile());
|
||||
}
|
||||
|
||||
@Test
|
||||
void folderWithOtherCustomPathTest(){
|
||||
String pathToFolder = "src/test/resources/dirWithThreeFiles/inner";
|
||||
String pathToGSFolder = "folder";
|
||||
File folder = new File(pathToFolder);
|
||||
GSObjectUtil gsObjectUtil = new GSObjectUtil();
|
||||
|
||||
Map<String, File> files = gsObjectUtil.generateFileMap(folder, pathToGSFolder);
|
||||
|
||||
String expectedRelativePathToFile = "folder/1.csv";
|
||||
File expectedFile = new File(pathToFolder + "/1.csv");
|
||||
|
||||
assertEquals(1, files.size());
|
||||
assertTrue(files.containsKey(expectedRelativePathToFile));
|
||||
assertEquals(expectedFile.getAbsoluteFile(), files.get(expectedRelativePathToFile).getAbsoluteFile());
|
||||
}
|
||||
}
|
||||
|
|
|
|
|
|
|
|
|
|
@@ -1,17 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>org.talend.components.lib</groupId>
|
||||
<artifactId>job-audit</artifactId>
|
||||
<version>1.2</version>
|
||||
|
||||
<groupId>org.talend.libraries</groupId>
|
||||
<artifactId>job-audit</artifactId>
|
||||
<version>1.1</version>
|
||||
|
||||
<properties>
|
||||
<talend.nexus.url>https://artifacts-oss.talend.com</talend.nexus.url>
|
||||
<daikon.audit.version>1.16.0</daikon.audit.version>
|
||||
</properties>
|
||||
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>talend_nexus</id>
|
||||
@@ -23,7 +24,7 @@
|
||||
<url>${talend.nexus.url}/nexus/content/repositories/TalendOpenSourceRelease/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
|
||||
<distributionManagement>
|
||||
<snapshotRepository>
|
||||
<id>talend_nexus_deployment</id>
|
||||
@@ -46,47 +47,54 @@
|
||||
</releases>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.talend.daikon</groupId>
|
||||
<artifactId>audit-common</artifactId>
|
||||
<version>1.8.0</version>
|
||||
</dependency>
|
||||
|
||||
<!--
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.talend.daikon</groupId>
|
||||
<artifactId>audit-log4j1</artifactId>
|
||||
<version>1.8.0</version>
|
||||
<groupId>org.talend.daikon</groupId>
|
||||
<artifactId>audit-common</artifactId>
|
||||
<version>${daikon.audit.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- <dependency> <groupId>org.talend.daikon</groupId> <artifactId>audit-log4j1</artifactId>
|
||||
<version>${daikon.audit.version}</version> </dependency> <dependency> <groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId> <version>1.2.17</version> <scope>test</scope>
|
||||
</dependency> -->
|
||||
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>1.2.17</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
-->
|
||||
|
||||
<groupId>org.talend.daikon</groupId>
|
||||
<artifactId>audit-log4j2</artifactId>
|
||||
<version>${daikon.audit.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.talend.daikon</groupId>
|
||||
<artifactId>audit-log4j2</artifactId>
|
||||
<version>1.8.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-api</artifactId>
|
||||
<version>2.12.1</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-core</artifactId>
|
||||
<version>2.12.1</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-api</artifactId>
|
||||
<version>2.12.1</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-core</artifactId>
|
||||
<version>2.12.1</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.5</version>
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
<encoding>UTF-8</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
@@ -6,20 +6,23 @@ import org.talend.logging.audit.EventAuditLogger;
|
||||
import org.talend.logging.audit.LogLevel;
|
||||
|
||||
public interface JobAuditLogger extends EventAuditLogger {
|
||||
|
||||
@AuditEvent(category = "job", message = "Job start : job_name:{jobName}, job_version:{jobVersion}, job_id:{jobId}, timestamp:{timestamp}", level = LogLevel.INFO)
|
||||
void jobstart(Context context);
|
||||
|
||||
@AuditEvent(category = "job", message = "Job stop : job_name:{jobName}, job_version:{jobVersion}, job_id:{jobId}, timestamp:{timestamp}, status:{status}, duration:{duration}", level = LogLevel.INFO)
|
||||
void jobstop(Context context);
|
||||
|
||||
@AuditEvent(category = "connector", message = "Component run : job_name:{jobName}, job_version:{jobVersion}, job_id:{jobId}, connector_type:{connectorType}, connector_id:{connectorId}", level = LogLevel.INFO)
|
||||
void runcomponent(Context context);
|
||||
|
||||
@AuditEvent(category = "connection", message = "Component {connectorType} {connectionType} {rows} rows in {duration} with {connectionName} line", level = LogLevel.INFO)
|
||||
void flowOutput(Context context);
|
||||
|
||||
@AuditEvent(category = "connection", message = "Component {connectorType} received {rows} rows in {duration} with {connectionName} line", level = LogLevel.INFO)
|
||||
void flowInput(Context context);
|
||||
@AuditEvent(category = "jobstart", message = "Job start : job_name:{job_name}, job_version:{job_version}, job_id:{job_id}, timestamp:{timestamp}", level = LogLevel.INFO)
|
||||
void jobstart(Context context);
|
||||
|
||||
@AuditEvent(category = "jobstop", message = "Job stop : job_name:{job_name}, job_version:{job_version}, job_id:{job_id}, timestamp:{timestamp}, status:{status}, duration:{duration}", level = LogLevel.INFO)
|
||||
void jobstop(Context context);
|
||||
|
||||
@AuditEvent(category = "runcomponent", message = "Component run : job_name:{job_name}, job_version:{job_version}, job_id:{job_id}, connector_type:{connector_type}, connector_id:{connector_id}, connector_label:{connector_label}", level = LogLevel.INFO)
|
||||
void runcomponent(Context context);
|
||||
|
||||
@AuditEvent(category = "flowoutput", message = "Component {connector_type} {connector_label} {connection_type} {rows} rows in {duration} with {connection_name} line", level = LogLevel.INFO)
|
||||
void flowOutput(Context context);
|
||||
|
||||
@AuditEvent(category = "flowinput", message = "Component {connector_type} {connector_label} received {rows} rows in {duration} with {connection_name} line", level = LogLevel.INFO)
|
||||
void flowInput(Context context);
|
||||
|
||||
@AuditEvent(category = "flowexecution", message = "connection : {connection_name}, row : {rows}, cost : {duration}", level = LogLevel.INFO)
|
||||
void flowExecution(Context context);
|
||||
|
||||
}
|
||||
|
||||
@@ -5,86 +5,160 @@ import org.talend.logging.audit.ContextBuilder;
|
||||
|
||||
public class JobContextBuilder {
|
||||
|
||||
private final ContextBuilder builder;
|
||||
private final ContextBuilder builder;
|
||||
|
||||
public JobContextBuilder(ContextBuilder builder) {
|
||||
this.builder = builder;
|
||||
}
|
||||
public JobContextBuilder(ContextBuilder builder) {
|
||||
this.builder = builder;
|
||||
}
|
||||
|
||||
public static JobContextBuilder create() {
|
||||
return new JobContextBuilder(ContextBuilder.create());
|
||||
}
|
||||
public static JobContextBuilder create() {
|
||||
return new JobContextBuilder(ContextBuilder.create());
|
||||
}
|
||||
|
||||
public JobContextBuilder jobName(String jobName) {
|
||||
builder.with("jobName", jobName);
|
||||
return this;
|
||||
}
|
||||
|
||||
public JobContextBuilder jobVersion(String jobVersion) {
|
||||
builder.with("jobVersion", jobVersion);
|
||||
return this;
|
||||
}
|
||||
|
||||
public JobContextBuilder jobId(String jobId) {
|
||||
builder.with("jobId", jobId);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* component type like "tXMLMap"
|
||||
* @param connectorType
|
||||
* @return self
|
||||
*/
|
||||
public JobContextBuilder connectorType(String connectorType) {
|
||||
builder.with("connectorType", connectorType);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* component type like "tXMLMap_1"
|
||||
* @param connectorType
|
||||
* @return self
|
||||
*/
|
||||
public JobContextBuilder connectorId(String connectorId) {
|
||||
builder.with("connectorId", connectorId);
|
||||
return this;
|
||||
}
|
||||
|
||||
public JobContextBuilder rows(long rowCount) {
|
||||
builder.with("rows", String.valueOf(rowCount));
|
||||
return this;
|
||||
}
|
||||
|
||||
//output or reject
|
||||
public JobContextBuilder connectionType(String connectionType) {
|
||||
builder.with("connectionType", connectionType);
|
||||
return this;
|
||||
}
|
||||
|
||||
//like "row1"
|
||||
public JobContextBuilder connectionName(String connectionName) {
|
||||
builder.with("connectionName", connectionName);
|
||||
return this;
|
||||
}
|
||||
|
||||
//100s
|
||||
public JobContextBuilder duration(String duration) {
|
||||
builder.with("duration", duration);
|
||||
return this;
|
||||
}
|
||||
|
||||
public JobContextBuilder timestamp(String timestamp) {
|
||||
builder.with("timestamp", timestamp);
|
||||
return this;
|
||||
}
|
||||
|
||||
public JobContextBuilder status(String status) {
|
||||
builder.with("status", status);
|
||||
return this;
|
||||
}
|
||||
public JobContextBuilder jobName(String job_name) {
|
||||
builder.with("job_name", job_name);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Context build() {
|
||||
return builder.build();
|
||||
}
|
||||
public JobContextBuilder jobVersion(String job_version) {
|
||||
builder.with("job_version", job_version);
|
||||
return this;
|
||||
}
|
||||
|
||||
public JobContextBuilder jobId(String job_id) {
|
||||
builder.with("job_id", job_id);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* component label, default is unique name like "tXMLMap_1", but user can adjust
|
||||
* it in studio to any value
|
||||
*
|
||||
* @param connectorType
|
||||
* @return self
|
||||
*/
|
||||
public JobContextBuilder connectorLabel(String connector_label) {
|
||||
builder.with("connector_label", connector_label);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* component type like "tXMLMap"
|
||||
*
|
||||
* @param connectorType
|
||||
* @return self
|
||||
*/
|
||||
public JobContextBuilder connectorType(String connector_type) {
|
||||
builder.with("connector_type", connector_type);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* component unique name like "tXMLMap_1"
|
||||
*
|
||||
* @param connectorType
|
||||
* @return self
|
||||
*/
|
||||
public JobContextBuilder connectorId(String connector_id) {
|
||||
builder.with("connector_id", connector_id);
|
||||
return this;
|
||||
}
|
||||
|
||||
public JobContextBuilder rows(long rows) {
|
||||
builder.with("rows", String.valueOf(rows));
|
||||
return this;
|
||||
}
|
||||
|
||||
// output or reject
|
||||
public JobContextBuilder connectionType(String connection_type) {
|
||||
builder.with("connection_type", connection_type);
|
||||
return this;
|
||||
}
|
||||
|
||||
// like "row1"
|
||||
public JobContextBuilder connectionName(String connection_name) {
|
||||
builder.with("connection_name", connection_name);
|
||||
return this;
|
||||
}
|
||||
|
||||
// 100s
|
||||
public JobContextBuilder duration(String duration) {
|
||||
builder.with("duration", duration);
|
||||
return this;
|
||||
}
|
||||
|
||||
public JobContextBuilder timestamp(String timestamp) {
|
||||
builder.with("timestamp", timestamp);
|
||||
return this;
|
||||
}
|
||||
|
||||
public JobContextBuilder status(String status) {
|
||||
builder.with("status", status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Context build() {
|
||||
return builder.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* source connector id
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public JobContextBuilder sourceId(String source_id) {
|
||||
builder.with("source_id", source_id);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* source connector label
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public JobContextBuilder sourceLabel(String source_label) {
|
||||
builder.with("source_label", source_label);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* source connector name
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public JobContextBuilder sourceConnectorType(String source_connector_type) {
|
||||
builder.with("source_connector_type", source_connector_type);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* target connector id
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public JobContextBuilder targetId(String target_id) {
|
||||
builder.with("target_id", target_id);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* target connector label
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public JobContextBuilder targetLabel(String target_label) {
|
||||
builder.with("target_label", target_label);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* target connector name
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public JobContextBuilder targetConnectorType(String target_connector_type) {
|
||||
builder.with("target_connector_type", target_connector_type);
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -5,45 +5,47 @@ import java.util.Properties;
|
||||
|
||||
import org.talend.logging.audit.AuditLoggerFactory;
|
||||
import org.talend.logging.audit.EventAuditLogger;
|
||||
import org.talend.logging.audit.impl.AbstractBackend;
|
||||
import org.talend.logging.audit.impl.AuditConfiguration;
|
||||
import org.talend.logging.audit.impl.AuditConfigurationMap;
|
||||
import org.talend.logging.audit.impl.AuditLoggerBase;
|
||||
import org.talend.logging.audit.impl.DefaultAuditLoggerBase;
|
||||
import org.talend.logging.audit.impl.ProxyEventAuditLogger;
|
||||
import org.talend.logging.audit.impl.*;
|
||||
|
||||
public class JobEventAuditLoggerFactory {
|
||||
|
||||
public static JobAuditLogger createJobAuditLogger(final Properties properties) {
|
||||
final AuditConfigurationMap config = AuditConfiguration.loadFromProperties(properties);
|
||||
|
||||
AbstractBackend logger = null;
|
||||
|
||||
//load log4j2 implement firstly
|
||||
String loggerClass = "org.talend.logging.audit.log4j2.Log4j2Backend";
|
||||
try {
|
||||
final Class<?> clz = Class.forName(loggerClass);
|
||||
logger = (AbstractBackend) clz.getConstructor(AuditConfigurationMap.class).newInstance(config);
|
||||
} catch (ReflectiveOperationException e) {
|
||||
// do nothing
|
||||
}
|
||||
final DefaultAuditLoggerBase loggerBase;
|
||||
|
||||
//load log4j1 implement if not found log4j2
|
||||
if (logger == null) {
|
||||
loggerClass = "org.talend.logging.audit.log4j1.Log4j1Backend";
|
||||
final Backends backend = AuditConfiguration.BACKEND.getValue(config, Backends.class);
|
||||
if (backend == Backends.CUSTOM) {
|
||||
loggerBase = new DefaultAuditLoggerBase(config);
|
||||
} else {
|
||||
AbstractBackend logger = null;
|
||||
|
||||
// load log4j2 implement firstly
|
||||
String loggerClass = "org.talend.logging.audit.log4j2.Log4j2Backend";
|
||||
try {
|
||||
final Class<?> clz = Class.forName(loggerClass);
|
||||
logger = (AbstractBackend) clz.getConstructor(AuditConfigurationMap.class).newInstance(config);
|
||||
} catch (ReflectiveOperationException e) {
|
||||
// do nothing
|
||||
}
|
||||
}
|
||||
|
||||
if(logger == null) {
|
||||
throw new RuntimeException("Unable to load backend : " + loggerClass);
|
||||
}
|
||||
|
||||
final DefaultAuditLoggerBase loggerBase = new DefaultAuditLoggerBase(logger, config);
|
||||
// load log4j1 implement if not found log4j2
|
||||
if (logger == null) {
|
||||
loggerClass = "org.talend.logging.audit.log4j1.Log4j1Backend";
|
||||
try {
|
||||
final Class<?> clz = Class.forName(loggerClass);
|
||||
logger = (AbstractBackend) clz.getConstructor(AuditConfigurationMap.class).newInstance(config);
|
||||
} catch (ReflectiveOperationException e) {
|
||||
// do nothing
|
||||
}
|
||||
}
|
||||
|
||||
if (logger == null) {
|
||||
throw new RuntimeException("Unable to load backend : " + loggerClass);
|
||||
}
|
||||
|
||||
loggerBase = new DefaultAuditLoggerBase(logger, config);
|
||||
}
|
||||
|
||||
JobAuditLogger result = getEventAuditLogger(JobAuditLogger.class, loggerBase);
|
||||
return result;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>org.talend.components.lib</groupId>
|
||||
<artifactId>talend-proxy</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<version>1.0.1</version>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
@@ -46,9 +46,9 @@
|
||||
<version>3.9</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>1.2.17</version>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>1.7.25</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -1,22 +1,20 @@
|
||||
package org.talend.proxy;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.Proxy;
|
||||
import java.net.ProxySelector;
|
||||
import java.net.SocketAddress;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
|
||||
public class TalendProxySelector extends ProxySelector {
|
||||
private static TalendProxySelector instance;
|
||||
|
||||
private static final Logger log = Logger.getLogger(TalendProxySelector.class);
|
||||
private static final Logger log = LoggerFactory.getLogger(TalendProxySelector.class);
|
||||
|
||||
private ThreadLocal<ProxyHolder> threadLocalProxyHolder;
|
||||
private ProxyHolder globalProxyHolder;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<groupId>org.talend.components.lib</groupId>
|
||||
<artifactId>talendsap</artifactId>
|
||||
<name>talendsap</name>
|
||||
<version>1.0.2</version>
|
||||
<version>1.0.3</version>
|
||||
|
||||
<properties>
|
||||
<talend.nexus.url>https://artifacts-oss.talend.com</talend.nexus.url>
|
||||
@@ -35,9 +35,15 @@
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>dom4j</groupId>
|
||||
<groupId>org.dom4j</groupId>
|
||||
<artifactId>dom4j</artifactId>
|
||||
<version>1.6.1</version>
|
||||
<version>2.1.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>jaxen</groupId>
|
||||
<artifactId>jaxen</artifactId>
|
||||
<version>1.1.6</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
@@ -16,21 +16,11 @@ public class DocumentExtractor {
|
||||
|
||||
public DocumentExtractor(Document doc,String function) {
|
||||
this.doc = doc;
|
||||
this.finalFunction = replaceNamespace(function);
|
||||
this.finalFunction = SAPXMLCoder.encode(function);
|
||||
}
|
||||
|
||||
/**
|
||||
* the xml document which come from the cimt sap api will change the element name which contains "/" and convert "/" to "_-",
|
||||
* we need to do the same thing for finding the element by the xpath
|
||||
* @param name
|
||||
* @return
|
||||
*/
|
||||
private String replaceNamespace(String name) {
|
||||
return name.replace("/", "_-");
|
||||
}
|
||||
|
||||
public String getSingleResult(String name) {
|
||||
final String finalName = replaceNamespace(name);
|
||||
final String finalName = SAPXMLCoder.encode(name);
|
||||
|
||||
XPath xpath = org.dom4j.DocumentHelper.createXPath(
|
||||
sb.append("/").append(finalFunction).append("/OUTPUT/").append(finalName)
|
||||
@@ -47,7 +37,7 @@ public class DocumentExtractor {
|
||||
}
|
||||
|
||||
public List<String> getStructureResult(String structureName,List<String> names) {
|
||||
final String finalStructureName = replaceNamespace(structureName);
|
||||
final String finalStructureName = SAPXMLCoder.encode(structureName);
|
||||
|
||||
XPath xpath = org.dom4j.DocumentHelper.createXPath(
|
||||
sb.append("/").append(finalFunction).append("/OUTPUT/").append(finalStructureName)
|
||||
@@ -65,7 +55,7 @@ public class DocumentExtractor {
|
||||
List<String> result = new ArrayList<String>();
|
||||
|
||||
for(String name : names) {
|
||||
final String finalName = replaceNamespace(name);
|
||||
final String finalName = SAPXMLCoder.encode(name);
|
||||
Node subNode = node.selectSingleNode(finalName);
|
||||
if(subNode == null) {
|
||||
result.add(null);
|
||||
@@ -78,7 +68,7 @@ public class DocumentExtractor {
|
||||
}
|
||||
|
||||
public List<List<String>> getTableResult(String tableName,List<String> names) {
|
||||
final String finalTableName = replaceNamespace(tableName);
|
||||
final String finalTableName = SAPXMLCoder.encode(tableName);
|
||||
|
||||
List<List<String>> result = new ArrayList<List<String>>();
|
||||
|
||||
@@ -112,7 +102,7 @@ public class DocumentExtractor {
|
||||
for(Element element : elements) {
|
||||
List<String> row = new ArrayList<String>();
|
||||
for(String name : names) {
|
||||
final String finalName = replaceNamespace(name);
|
||||
final String finalName = SAPXMLCoder.encode(name);
|
||||
Element subElement = element.element(finalName);
|
||||
if(subElement == null) {
|
||||
row.add(null);
|
||||
|
||||
@@ -28,7 +28,7 @@ public class DocumentHelper {
|
||||
}
|
||||
|
||||
public void setFunctionName(String name) {
|
||||
root = doc.addElement(name);
|
||||
root = doc.addElement(SAPXMLCoder.encode(name));
|
||||
}
|
||||
|
||||
private void correctInput() {
|
||||
@@ -55,20 +55,20 @@ public class DocumentHelper {
|
||||
}
|
||||
if (parameter_type == SAPParameterType.CHANGING) {
|
||||
correctChanging();
|
||||
changing.addElement(name).setText(value);
|
||||
changing.addElement(SAPXMLCoder.encode(name)).setText(value);
|
||||
} else {
|
||||
correctInput();
|
||||
input.addElement(name).setText(value);
|
||||
input.addElement(SAPXMLCoder.encode(name)).setText(value);
|
||||
}
|
||||
}
|
||||
|
||||
public void addStructParameter(String name, SAPParameterType parameter_type) {
|
||||
if (parameter_type == SAPParameterType.CHANGING) {
|
||||
correctChanging();
|
||||
currentStruct = changing.addElement(name);
|
||||
currentStruct = changing.addElement(SAPXMLCoder.encode(name));
|
||||
} else {
|
||||
correctInput();
|
||||
currentStruct = input.addElement(name);
|
||||
currentStruct = input.addElement(SAPXMLCoder.encode(name));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,19 +76,19 @@ public class DocumentHelper {
|
||||
if(value == null) {
|
||||
value = "";
|
||||
}
|
||||
currentStruct.addElement(name).setText(value);
|
||||
currentStruct.addElement(SAPXMLCoder.encode(name)).setText(value);
|
||||
}
|
||||
|
||||
public void addTableParameter(String name, SAPParameterType parameter_type) {
|
||||
if (parameter_type == SAPParameterType.CHANGING) {
|
||||
correctChanging();
|
||||
currentTable = changing.addElement(name);
|
||||
currentTable = changing.addElement(SAPXMLCoder.encode(name));
|
||||
} else if(parameter_type == SAPParameterType.TABLES) {
|
||||
correctTables();
|
||||
currentTable = tables.addElement(name);
|
||||
currentTable = tables.addElement(SAPXMLCoder.encode(name));
|
||||
} else {
|
||||
correctInput();
|
||||
currentTable = input.addElement(name);
|
||||
currentTable = input.addElement(SAPXMLCoder.encode(name));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,66 +100,11 @@ public class DocumentHelper {
|
||||
if(value == null) {
|
||||
value = "";
|
||||
}
|
||||
currentRow.addElement(name).setText(value);
|
||||
currentRow.addElement(SAPXMLCoder.encode(name)).setText(value);
|
||||
}
|
||||
|
||||
public Document getDocument() {
|
||||
return doc;
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws IOException {
|
||||
DocumentHelper helper = new DocumentHelper();
|
||||
helper.setFunctionName("READ_TABLE_FUNCTION");
|
||||
|
||||
helper.addSingleParameter("ID", "1", SAPParameterType.CHANGING);
|
||||
helper.addSingleParameter("NAME", "gaoyan", SAPParameterType.IMPORT);
|
||||
|
||||
helper.addStructParameter("INFO", SAPParameterType.CHANGING);
|
||||
helper.addStructChildParameter("ID", "2");
|
||||
helper.addStructChildParameter("NAME", "wangwei");
|
||||
|
||||
helper.addStructParameter("INFO1", SAPParameterType.IMPORT);
|
||||
helper.addStructChildParameter("ID1", "4");
|
||||
helper.addStructChildParameter("NAME1", "momo");
|
||||
|
||||
helper.addTableParameter("TABLE1", SAPParameterType.TABLES);
|
||||
for (int i = 0; i < 200000; i++) {
|
||||
helper.addTableRow();
|
||||
helper.addTableRowChildParameter("c1", i + "");
|
||||
helper.addTableRowChildParameter("c2", "wangwei" + i);
|
||||
helper.addTableRowChildParameter("c3", "wangwei" + i);
|
||||
helper.addTableRowChildParameter("c4", "wangwei" + i);
|
||||
helper.addTableRowChildParameter("c5", "wangwei" + i);
|
||||
helper.addTableRowChildParameter("c6", "wangwei" + i);
|
||||
helper.addTableRowChildParameter("c7", "wangwei" + i);
|
||||
helper.addTableRowChildParameter("c8", "wangwei" + i);
|
||||
}
|
||||
|
||||
helper.addTableParameter("TABLE2", SAPParameterType.TABLES);
|
||||
for (int i = 0; i < 2; i++) {
|
||||
helper.addTableRow();
|
||||
helper.addTableRowChildParameter("ID4", i + "");
|
||||
helper.addTableRowChildParameter("NAME4", "gaoyan" + i);
|
||||
}
|
||||
|
||||
// StringWriter sw = new StringWriter();
|
||||
// OutputFormat format = OutputFormat.createPrettyPrint();
|
||||
// XMLWriter writer = new XMLWriter(sw, format);
|
||||
Document doc = helper.getDocument();
|
||||
// writer.write(doc);
|
||||
// System.out.println(sw.toString());
|
||||
|
||||
DocumentExtractor ext = new DocumentExtractor(doc,"READ_TABLE_FUNCTION");
|
||||
String single = ext.getSingleResult("ID");
|
||||
System.out.println(single);
|
||||
|
||||
List<String> struct = ext.getStructureResult("INFO", Arrays.asList("ID","NAME"));
|
||||
System.out.println(struct);
|
||||
|
||||
List<List<String>> table = ext.getTableResult("TABLE1", Arrays.asList("c1","c2","c3","c4","c5","c6","c7","c8"));
|
||||
for(List<String> row : table) {
|
||||
System.out.println(row);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,124 @@
|
||||
package org.talend.sap;
|
||||
|
||||
/**
|
||||
* sap <-> valid xml element name by coder
|
||||
*
|
||||
* first char :
|
||||
* 0 <-> _0
|
||||
* 1 <-> _1
|
||||
* 2 <-> _2
|
||||
* ...
|
||||
* 9 <-> _9
|
||||
*
|
||||
* any location char
|
||||
* / <-> _-
|
||||
*/
|
||||
public class SAPXMLCoder {
|
||||
|
||||
/**
|
||||
* convert sapname to xmlname
|
||||
* @param sapname
|
||||
* @return
|
||||
*/
|
||||
public static String encode(String sapname) {
|
||||
if(sapname == null) {
|
||||
return sapname;
|
||||
}
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for(int i=0;i<sapname.length();i++) {
|
||||
char c = sapname.charAt(i);
|
||||
|
||||
if(i==0) {
|
||||
if(isDigit(c)) {
|
||||
sb.append('_').append(c);
|
||||
} else if(c == '/'){
|
||||
sb.append("_-");
|
||||
} else {
|
||||
sb.append(c);
|
||||
}
|
||||
} else {
|
||||
if(c == '/'){
|
||||
sb.append("_-");
|
||||
} else {
|
||||
sb.append(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* convert xmlname to sapname
|
||||
* @param xmlname
|
||||
* @return
|
||||
*/
|
||||
static String decode(String xmlname) {
|
||||
if(xmlname == null) {
|
||||
return xmlname;
|
||||
}
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for(int i=0;i<xmlname.length();i++) {
|
||||
char c = xmlname.charAt(i);
|
||||
|
||||
if(i==0) {
|
||||
if(c == '_') {
|
||||
int next_index = i + 1;
|
||||
if(next_index < xmlname.length()) {
|
||||
char next = xmlname.charAt(next_index);
|
||||
if(isDigit(next)) {
|
||||
sb.append(next);
|
||||
i++;
|
||||
} else if(next == '-') {
|
||||
sb.append('/');
|
||||
i++;
|
||||
} else {
|
||||
sb.append(c);
|
||||
}
|
||||
} else {
|
||||
sb.append(c);
|
||||
}
|
||||
} else {
|
||||
sb.append(c);
|
||||
}
|
||||
} else {
|
||||
if(c == '_') {
|
||||
int next_index = i + 1;
|
||||
if(next_index < xmlname.length()) {
|
||||
char next = xmlname.charAt(next_index);
|
||||
if(next == '-') {
|
||||
sb.append('/');
|
||||
i++;
|
||||
} else {
|
||||
sb.append(c);
|
||||
}
|
||||
} else {
|
||||
sb.append(c);
|
||||
}
|
||||
} else {
|
||||
sb.append(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
private static boolean isDigit(char c) {
|
||||
return c>=48 && c<=57;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
//ecnode
|
||||
System.out.println(encode("/CMT/TLND_TABLE"));
|
||||
System.out.println(encode("0CMT0TLND_TABLE"));
|
||||
System.out.println(encode("1CMT1TLND_TABLE"));
|
||||
|
||||
//decode
|
||||
System.out.println(decode(encode("/CMT/TLND_TABLE")));
|
||||
System.out.println(decode(encode("0CMT0TLND_TABLE")));
|
||||
System.out.println(decode(encode("1CMT1TLND_TABLE")));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
package org.talend.sap;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.dom4j.Document;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class BasicTest {
|
||||
|
||||
@Test
|
||||
public void testSAPXMLCoder() {
|
||||
assertEquals("_-CMT_-TLND_TABLE", SAPXMLCoder.encode("/CMT/TLND_TABLE"));
|
||||
assertEquals("_0CMT0TLND_TABLE", SAPXMLCoder.encode("0CMT0TLND_TABLE"));
|
||||
|
||||
assertEquals("/CMT/TLND_TABLE", SAPXMLCoder.decode(SAPXMLCoder.encode("/CMT/TLND_TABLE")));
|
||||
assertEquals("0CMT0TLND_TABLE", SAPXMLCoder.decode(SAPXMLCoder.encode("0CMT0TLND_TABLE")));
|
||||
|
||||
assertEquals("BAPI_MATERIAL_GET_ALL", SAPXMLCoder.decode(SAPXMLCoder.encode("BAPI_MATERIAL_GET_ALL")));
|
||||
assertEquals("2STEP_PICK", SAPXMLCoder.decode(SAPXMLCoder.encode("2STEP_PICK")));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDocumentHelperAndExtractor() {
|
||||
DocumentHelper helper = new DocumentHelper();
|
||||
String function = "/CMT/TLND_TABLE";
|
||||
helper.setFunctionName(function);
|
||||
|
||||
helper.addSingleParameter("ID", "1", SAPParameterType.CHANGING);
|
||||
helper.addSingleParameter("NAME", "gaoyan", SAPParameterType.IMPORT);
|
||||
|
||||
helper.addStructParameter("INFO", SAPParameterType.CHANGING);
|
||||
helper.addStructChildParameter("ID", "2");
|
||||
helper.addStructChildParameter("NAME", "wangwei");
|
||||
|
||||
helper.addStructParameter("INFO1", SAPParameterType.IMPORT);
|
||||
helper.addStructChildParameter("ID1", "4");
|
||||
helper.addStructChildParameter("NAME1", "momo");
|
||||
|
||||
helper.addTableParameter("TABLE1", SAPParameterType.TABLES);
|
||||
for (int i = 0; i < 10; i++) {
|
||||
helper.addTableRow();
|
||||
helper.addTableRowChildParameter("c1", i + "");
|
||||
helper.addTableRowChildParameter("c2", "wangwei" + i);
|
||||
helper.addTableRowChildParameter("c3", "wangwei" + i);
|
||||
helper.addTableRowChildParameter("c4", "wangwei" + i);
|
||||
helper.addTableRowChildParameter("c5", "wangwei" + i);
|
||||
helper.addTableRowChildParameter("c6", "wangwei" + i);
|
||||
helper.addTableRowChildParameter("c7", "wangwei" + i);
|
||||
helper.addTableRowChildParameter("c8", "wangwei" + i);
|
||||
}
|
||||
|
||||
helper.addTableParameter("TABLE2", SAPParameterType.TABLES);
|
||||
for (int i = 0; i < 2; i++) {
|
||||
helper.addTableRow();
|
||||
helper.addTableRowChildParameter("ID4", i + "");
|
||||
helper.addTableRowChildParameter("NAME4", "gaoyan" + i);
|
||||
}
|
||||
|
||||
Document doc = helper.getDocument();
|
||||
|
||||
DocumentExtractor ext = new DocumentExtractor(doc,function);
|
||||
String single = ext.getSingleResult("ID");
|
||||
assertEquals("1", single);
|
||||
|
||||
List<String> struct = ext.getStructureResult("INFO", Arrays.asList("ID","NAME"));
|
||||
assertEquals(java.util.Arrays.asList("2", "wangwei"), struct);
|
||||
|
||||
List<List<String>> table = ext.getTableResult("TABLE1", Arrays.asList("c1","c2","c3","c4","c5","c6","c7","c8"));
|
||||
assertEquals(10, table.size());
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.components.libs</artifactId>
|
||||
|
||||
@@ -4,6 +4,7 @@ imports="
|
||||
org.talend.core.model.process.INode
|
||||
org.talend.core.model.process.ElementParameterParser
|
||||
org.talend.core.model.process.IConnection
|
||||
org.talend.core.model.process.IProcess
|
||||
java.util.List
|
||||
"
|
||||
%>
|
||||
@@ -14,11 +15,15 @@ imports="
|
||||
|
||||
String cid = node.getUniqueName();
|
||||
dbLog = new DBLogUtil(node);
|
||||
IProcess process = node.getProcess();
|
||||
|
||||
String dataAction = ElementParameterParser.getValue(node,"__DATA_ACTION__");
|
||||
|
||||
String commitEvery = ElementParameterParser.getValue(node, "__COMMIT_EVERY__");
|
||||
|
||||
String useExistingConn = ElementParameterParser.getValue(node,"__USE_EXISTING_CONNECTION__");
|
||||
boolean setAutoCommit = false;
|
||||
|
||||
boolean useExistingConnection = "true".equals(ElementParameterParser.getValue(node,"__USE_EXISTING_CONNECTION__"));
|
||||
|
||||
String useCommitControl = ElementParameterParser.getValue(node,"__USE_COMMIT_CONTROL__");
|
||||
|
||||
@@ -30,6 +35,17 @@ imports="
|
||||
IConnection rejectConn = rejectConns.get(0);
|
||||
rejectConnName = rejectConn.getName();
|
||||
}
|
||||
|
||||
String connection = ElementParameterParser.getValue(node,"__CONNECTION__");
|
||||
if(useExistingConnection) {
|
||||
List<? extends INode> nodes = process.getNodesOfType("tAS400Connection");
|
||||
for (INode ne:nodes) {
|
||||
if (connection.equals(ne.getUniqueName())) {
|
||||
setAutoCommit = "true".equals(ElementParameterParser.getValue(ne, "__AUTO_COMMIT__"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
boolean useBatch = (rejectConnName == null)
|
||||
&& (
|
||||
@@ -82,7 +98,7 @@ imports="
|
||||
%>
|
||||
resourceMap.put("statementClosed_<%=cid%>", true);
|
||||
<%
|
||||
if(!("true").equals(useExistingConn)) {
|
||||
if(!useExistingConnection) {
|
||||
if(("true").equals(useCommitControl)) {
|
||||
if(!("").equals(commitEvery) && !("0").equals(commitEvery)) {
|
||||
%>
|
||||
|
||||
@@ -17,6 +17,7 @@ imports="
|
||||
String dataAction = ElementParameterParser.getValue(node,"__DATA_ACTION__");
|
||||
|
||||
String commitEvery = ElementParameterParser.getValue(node, "__COMMIT_EVERY__");
|
||||
boolean setAutoCommit = false;
|
||||
boolean useExistingConnection = "true".equals(ElementParameterParser.getValue(node,"__USE_EXISTING_CONNECTION__"));
|
||||
|
||||
if(("INSERT_OR_UPDATE").equals(dataAction)) {
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="SESSION_DURATION" FIELD="TEXT" NUM_ROW="15" REQUIRED="true"
|
||||
<PARAMETER NAME="SESSION_DURATION" FIELD="TEXT" NUM_ROW="15"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
GROUP="AUTHENTICATION">
|
||||
<DEFAULT>15</DEFAULT>
|
||||
@@ -105,21 +105,131 @@
|
||||
</PARAMETERS>
|
||||
|
||||
<ADVANCED_PARAMETERS>
|
||||
<PARAMETER NAME="SET_STS_ENDPOINT" FIELD="CHECK" NUM_ROW="1" REQUIRED="true"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'">
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="STS_ENDPOINT" FIELD="TEXT" NUM_ROW="1" REQUIRED="true"
|
||||
SHOW_IF="(ASSUME_ROLE == 'true') AND (SET_STS_ENDPOINT == 'true')">
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
<PARAMETER
|
||||
NAME="SET_STS_ENDPOINT"
|
||||
FIELD="CHECK"
|
||||
NUM_ROW="1"
|
||||
NB_LINES="5"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
SHOW_IF="isShow[ASSUME_ROLE] AND (ASSUME_ROLE == 'true')"
|
||||
>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="STS_ENDPOINT"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="1"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
SHOW_IF="isShow[SET_STS_ENDPOINT] AND (SET_STS_ENDPOINT == 'true')"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="SIGNING_REGION"
|
||||
FIELD="OPENED_LIST"
|
||||
NUM_ROW="2"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
REQUIRED="true"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
>
|
||||
<ITEMS DEFAULT="DEFAULT">
|
||||
<ITEM NAME="DEFAULT" VALUE="DEFAULT" />
|
||||
<ITEM NAME="GovCloud" VALUE=""us-gov-west-1"" />
|
||||
<ITEM NAME="US_EAST_1" VALUE=""us-east-1"" />
|
||||
<ITEM NAME="US_WEST_1" VALUE=""us-west-1"" />
|
||||
<ITEM NAME="US_WEST_2" VALUE=""us-west-2"" />
|
||||
<ITEM NAME="US_EAST_2" VALUE=""us-east-2"" />
|
||||
<ITEM NAME="SA_EAST_1" VALUE=""sa-east-1"" />
|
||||
<ITEM NAME="EU_WEST_1" VALUE=""eu-west-1"" />
|
||||
<ITEM NAME="EU_CENTRAL_1" VALUE=""eu-central-1"" />
|
||||
<ITEM NAME="EU_WEST_2" VALUE=""eu-west-2"" />
|
||||
<ITEM NAME="EU_WEST_3" VALUE=""eu-west-3"" />
|
||||
<ITEM NAME="EU_NORTH_1" VALUE=""eu-north-1"" />
|
||||
<ITEM NAME="CN_NORTH_1" VALUE=""cn-north-1"" />
|
||||
<ITEM NAME="CN_NORTHWEST_1" VALUE=""cn-northwest-1"" />
|
||||
<ITEM NAME="AP_EAST_1" VALUE=""ap-east-1"" />
|
||||
<ITEM NAME="AP_SOUTHEAST_1" VALUE=""ap-southeast-1"" />
|
||||
<ITEM NAME="AP_SOUTHEAST_2" VALUE=""ap-southeast-2"" />
|
||||
<ITEM NAME="AP_NORTHEAST_1" VALUE=""ap-northeast-1"" />
|
||||
<ITEM NAME="AP_NORTHEAST_2" VALUE=""ap-northeast-2"" />
|
||||
<ITEM NAME="AP_SOUTH_1" VALUE=""ap-south-1"" />
|
||||
<ITEM NAME="CA_CENTRAL_1" VALUE=""ca-central-1"" />
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="EXTERNALID"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="3"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="SERIALNUMBER"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="4"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="TOKENCODE"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="5"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="TAGS"
|
||||
FIELD="TABLE"
|
||||
NUM_ROW="6"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
>
|
||||
<ITEMS>
|
||||
<ITEM NAME="TAG_KEY" FIELD="TEXT" />
|
||||
<ITEM NAME="TAG_VALUE" FIELD="TEXT" />
|
||||
<ITEM NAME="TAG_TRANSITIVE" FIELD="CHECK" VALUE="FALSE"/>
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="POLICY_TABLE"
|
||||
FIELD="TABLE"
|
||||
NUM_ROW="7"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
>
|
||||
<ITEMS>
|
||||
<ITEM NAME="POLICY_ARN" VALUE="" />
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="POLICY"
|
||||
FIELD="MEMO"
|
||||
NUM_ROW="8"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
NB_LINES="15"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
</ADVANCED_PARAMETERS>
|
||||
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="aws-java-sdk-1.11.406.jar" MODULE="aws-java-sdk-1.11.406.jar"
|
||||
MVN="mvn:com.amazonaws/aws-java-sdk/1.11.406"
|
||||
<IMPORT NAME="aws-java-sdk-1.11.729.jar" MODULE="aws-java-sdk-1.11.729.jar"
|
||||
MVN="mvn:com.amazonaws/aws-java-sdk/1.11.729"
|
||||
REQUIRED="true" />
|
||||
<IMPORT NAME="jackson-core-2.10.1.jar" MODULE="jackson-core-2.10.1.jar"
|
||||
MVN="mvn:com.fasterxml.jackson.core/jackson-core/2.10.1"
|
||||
@@ -130,22 +240,20 @@
|
||||
<IMPORT NAME="jackson-annotations-2.10.1.jar" MODULE="jackson-annotations-2.10.1.jar"
|
||||
MVN="mvn:com.fasterxml.jackson.core/jackson-annotations/2.10.1"
|
||||
REQUIRED="true" />
|
||||
<IMPORT NAME="httpcore-4.4.9.jar" MODULE="httpcore-4.4.9.jar"
|
||||
MVN="mvn:org.apache.httpcomponents/httpcore/4.4.9"
|
||||
<IMPORT NAME="httpcore-4.4.11.jar" MODULE="httpcore-4.4.11.jar"
|
||||
MVN="mvn:org.apache.httpcomponents/httpcore/4.4.11"
|
||||
REQUIRED="true" />
|
||||
<IMPORT NAME="httpclient-4.5.5.jar" MODULE="httpclient-4.5.5.jar"
|
||||
MVN="mvn:org.apache.httpcomponents/httpclient/4.5.5"
|
||||
<IMPORT NAME="httpclient-4.5.9.jar" MODULE="httpclient-4.5.9.jar"
|
||||
MVN="mvn:org.apache.httpcomponents/httpclient/4.5.9"
|
||||
REQUIRED="true" />
|
||||
<IMPORT NAME="joda-time-2.8.1.jar" MODULE="joda-time-2.8.1.jar"
|
||||
MVN="mvn:joda-time/joda-time/2.8.1"
|
||||
REQUIRED="true" />
|
||||
<IMPORT NAME="commons-logging-1.1.3.jar" MODULE="commons-logging-1.1.3.jar"
|
||||
MVN="mvn:commons-logging/commons-logging/1.1.3"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-logging-1.1.3.jar"
|
||||
<IMPORT NAME="commons-logging-1.2.jar" MODULE="commons-logging-1.2.jar"
|
||||
MVN="mvn:commons-logging/commons-logging/1.2"
|
||||
REQUIRED="true" />
|
||||
<IMPORT NAME="commons-codec-1.6.jar" MODULE="commons-codec-1.6.jar"
|
||||
MVN="mvn:org.talend.libraries/commons-codec-1.6/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-codec-1.6.jar"
|
||||
<IMPORT NAME="commons-codec-1.11.jar" MODULE="commons-codec-1.11.jar"
|
||||
MVN="mvn:commons-codec/commons-codec/1.11"
|
||||
REQUIRED="true" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
@@ -52,5 +52,38 @@ ARN.NAME=Role ARN
|
||||
ROLE_SESSION_NAME.NAME=Role session name
|
||||
SESSION_DURATION.NAME=Session duration(minutes)
|
||||
|
||||
ASSUME_ROLE_CONFIG.NAME=Assume Role Configuration
|
||||
EXTERNALID.NAME=External Id
|
||||
SERIALNUMBER.NAME=Serial number
|
||||
TOKENCODE.NAME=Token code
|
||||
POLICY_TABLE.NAME=IAM Policy ARNs
|
||||
POLICY_TABLE.ITEM.POLICY_ARN=Policy ARN
|
||||
POLICY.NAME=Policy
|
||||
TAGS.NAME=Tags
|
||||
TAGS.ITEM.TAG_KEY=Key
|
||||
TAGS.ITEM.TAG_VALUE=Value
|
||||
TAGS.ITEM.TAG_TRANSITIVE=Transitive
|
||||
SET_STS_ENDPOINT.NAME=STS Endpoint
|
||||
STS_ENDPOINT.NAME=
|
||||
STS_ENDPOINT.NAME=
|
||||
SIGNING_REGION.NAME=Signing region
|
||||
SIGNING_REGION.ITEM.DEFAULT=DEFAULT
|
||||
SIGNING_REGION.ITEM.GovCloud=AWS GovCloud (US)
|
||||
SIGNING_REGION.ITEM.US_EAST_1=US Standard
|
||||
SIGNING_REGION.ITEM.US_WEST_1=US West (N. California)
|
||||
SIGNING_REGION.ITEM.US_WEST_2=US West (Oregon)
|
||||
SIGNING_REGION.ITEM.US_EAST_2=US East (Ohio)
|
||||
SIGNING_REGION.ITEM.SA_EAST_1=South America (Sao Paulo)
|
||||
SIGNING_REGION.ITEM.EU_WEST_1=EU (Ireland)
|
||||
SIGNING_REGION.ITEM.EU_CENTRAL_1=EU (Frankfurt)
|
||||
SIGNING_REGION.ITEM.EU_WEST_2=EU (London)
|
||||
SIGNING_REGION.ITEM.EU_WEST_3=EU (Paris)
|
||||
SIGNING_REGION.ITEM.EU_NORTH_1=EU (Stockholm)
|
||||
SIGNING_REGION.ITEM.CN_NORTH_1=China (Beijing)
|
||||
SIGNING_REGION.ITEM.CN_NORTHWEST_1=China (Ningxia)
|
||||
SIGNING_REGION.ITEM.AP_EAST_1=Asia Pacific (Hong Kong)
|
||||
SIGNING_REGION.ITEM.AP_SOUTHEAST_1=Asia Pacific (Singapore)
|
||||
SIGNING_REGION.ITEM.AP_SOUTHEAST_2=Asia Pacific (Sydney)
|
||||
SIGNING_REGION.ITEM.AP_NORTHEAST_1=Asia Pacific (Tokyo)
|
||||
SIGNING_REGION.ITEM.AP_NORTHEAST_2=Asia Pacific (Seoul)
|
||||
SIGNING_REGION.ITEM.AP_SOUTH_1=Asia Pacific (Mumbai)
|
||||
SIGNING_REGION.ITEM.CA_CENTRAL_1=Canada (Central)
|
||||
@@ -58,7 +58,7 @@
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="SESSION_DURATION" FIELD="TEXT" NUM_ROW="15" REQUIRED="true"
|
||||
<PARAMETER NAME="SESSION_DURATION" FIELD="TEXT" NUM_ROW="15"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
GROUP="AUTHENTICATION">
|
||||
<DEFAULT>15</DEFAULT>
|
||||
@@ -259,47 +259,157 @@
|
||||
</PARAMETERS>
|
||||
|
||||
<ADVANCED_PARAMETERS>
|
||||
<PARAMETER NAME="SET_STS_ENDPOINT" FIELD="CHECK" NUM_ROW="1" REQUIRED="true"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'">
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="STS_ENDPOINT" FIELD="TEXT" NUM_ROW="1" REQUIRED="true"
|
||||
SHOW_IF="(ASSUME_ROLE == 'true') AND (SET_STS_ENDPOINT == 'true')">
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
<PARAMETER
|
||||
NAME="SET_STS_ENDPOINT"
|
||||
FIELD="CHECK"
|
||||
NUM_ROW="1"
|
||||
NB_LINES="5"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
SHOW_IF="isShow[ASSUME_ROLE] AND (ASSUME_ROLE == 'true')"
|
||||
>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="STS_ENDPOINT"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="1"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
SHOW_IF="isShow[SET_STS_ENDPOINT] AND (SET_STS_ENDPOINT == 'true')"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="SIGNING_REGION"
|
||||
FIELD="OPENED_LIST"
|
||||
NUM_ROW="2"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
REQUIRED="true"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
>
|
||||
<ITEMS DEFAULT="DEFAULT">
|
||||
<ITEM NAME="DEFAULT" VALUE="DEFAULT" />
|
||||
<ITEM NAME="GovCloud" VALUE=""us-gov-west-1"" />
|
||||
<ITEM NAME="US_EAST_1" VALUE=""us-east-1"" />
|
||||
<ITEM NAME="US_WEST_1" VALUE=""us-west-1"" />
|
||||
<ITEM NAME="US_WEST_2" VALUE=""us-west-2"" />
|
||||
<ITEM NAME="US_EAST_2" VALUE=""us-east-2"" />
|
||||
<ITEM NAME="SA_EAST_1" VALUE=""sa-east-1"" />
|
||||
<ITEM NAME="EU_WEST_1" VALUE=""eu-west-1"" />
|
||||
<ITEM NAME="EU_CENTRAL_1" VALUE=""eu-central-1"" />
|
||||
<ITEM NAME="EU_WEST_2" VALUE=""eu-west-2"" />
|
||||
<ITEM NAME="EU_WEST_3" VALUE=""eu-west-3"" />
|
||||
<ITEM NAME="EU_NORTH_1" VALUE=""eu-north-1"" />
|
||||
<ITEM NAME="CN_NORTH_1" VALUE=""cn-north-1"" />
|
||||
<ITEM NAME="CN_NORTHWEST_1" VALUE=""cn-northwest-1"" />
|
||||
<ITEM NAME="AP_EAST_1" VALUE=""ap-east-1"" />
|
||||
<ITEM NAME="AP_SOUTHEAST_1" VALUE=""ap-southeast-1"" />
|
||||
<ITEM NAME="AP_SOUTHEAST_2" VALUE=""ap-southeast-2"" />
|
||||
<ITEM NAME="AP_NORTHEAST_1" VALUE=""ap-northeast-1"" />
|
||||
<ITEM NAME="AP_NORTHEAST_2" VALUE=""ap-northeast-2"" />
|
||||
<ITEM NAME="AP_SOUTH_1" VALUE=""ap-south-1"" />
|
||||
<ITEM NAME="CA_CENTRAL_1" VALUE=""ca-central-1"" />
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="EXTERNALID"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="3"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="SERIALNUMBER"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="4"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="TOKENCODE"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="5"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="TAGS"
|
||||
FIELD="TABLE"
|
||||
NUM_ROW="6"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
>
|
||||
<ITEMS>
|
||||
<ITEM NAME="TAG_KEY" FIELD="TEXT" />
|
||||
<ITEM NAME="TAG_VALUE" FIELD="TEXT" />
|
||||
<ITEM NAME="TAG_TRANSITIVE" FIELD="CHECK" VALUE="FALSE"/>
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="POLICY_TABLE"
|
||||
FIELD="TABLE"
|
||||
NUM_ROW="7"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
>
|
||||
<ITEMS>
|
||||
<ITEM NAME="POLICY_ARN" VALUE="" />
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="POLICY"
|
||||
FIELD="MEMO"
|
||||
NUM_ROW="8"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
NB_LINES="15"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="WAIT_FOR_CLUSTER_READY" FIELD="CHECK"
|
||||
NUM_ROW="2" SHOW_IF="(ACTION=='START')" GROUP="ADVANCED_CONFIGURATION">
|
||||
NUM_ROW="10" SHOW_IF="(ACTION=='START')" GROUP="ADVANCED_CONFIGURATION">
|
||||
<DEFAULT>true</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="VISIBLE_TO_ALL_USERS" FIELD="CHECK"
|
||||
NUM_ROW="5" SHOW_IF="ACTION=='START'" GROUP="ADVANCED_CONFIGURATION">
|
||||
NUM_ROW="15" SHOW_IF="ACTION=='START'" GROUP="ADVANCED_CONFIGURATION">
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="TERMINATION_PROTECTED" FIELD="CHECK"
|
||||
NUM_ROW="5" SHOW_IF="ACTION=='START'" GROUP="ADVANCED_CONFIGURATION">
|
||||
NUM_ROW="20" SHOW_IF="ACTION=='START'" GROUP="ADVANCED_CONFIGURATION">
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="ENABLE_DEBUG" FIELD="CHECK"
|
||||
NUM_ROW="7" SHOW_IF="ACTION=='START'" GROUP="ADVANCED_CONFIGURATION">
|
||||
NUM_ROW="25" SHOW_IF="ACTION=='START'" GROUP="ADVANCED_CONFIGURATION">
|
||||
<DEFAULT>true</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="USE_CUSTOMIZE_VERSION" FIELD="CHECK"
|
||||
NUM_ROW="10" SHOW_IF="ACTION=='START'" GROUP="ADVANCED_CONFIGURATION">
|
||||
NUM_ROW="30" SHOW_IF="ACTION=='START'" GROUP="ADVANCED_CONFIGURATION">
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="CUSTOMIZE_VERSION" FIELD="TEXT"
|
||||
NUM_ROW="12" SHOW_IF="(ACTION=='START') AND (USE_CUSTOMIZE_VERSION =='true')" GROUP="CUSTOMIZE_APPLICATION_GROUP">
|
||||
NUM_ROW="35" SHOW_IF="(ACTION=='START') AND (USE_CUSTOMIZE_VERSION =='true')" GROUP="CUSTOMIZE_APPLICATION_GROUP">
|
||||
<DEFAULT>"emr-5.15.0"</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="CUSTOMIZE_APPLICATION_TABLE" FIELD="TABLE" NUM_ROW="13" NB_LINES="5" GROUP="CUSTOMIZE_APPLICATION_GROUP"
|
||||
<PARAMETER NAME="CUSTOMIZE_APPLICATION_TABLE" FIELD="TABLE" NUM_ROW="40" NB_LINES="5" GROUP="CUSTOMIZE_APPLICATION_GROUP"
|
||||
SHOW_IF="(ACTION=='START') AND (USE_CUSTOMIZE_VERSION =='true')">
|
||||
<ITEMS>
|
||||
<ITEM NAME="NAME" FIELD="OPENED_LIST">
|
||||
@@ -334,51 +444,51 @@
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="SUBNET_ID" FIELD="TEXT"
|
||||
NUM_ROW="17" SHOW_IF="ACTION=='START'" GROUP="ADVANCED_INSTANCE_CONFIGURATION">
|
||||
NUM_ROW="45" SHOW_IF="ACTION=='START'" GROUP="ADVANCED_INSTANCE_CONFIGURATION">
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="AVAILABILITY_ZONE" FIELD="TEXT"
|
||||
NUM_ROW="18" SHOW_IF="(ACTION=='START')" GROUP="ADVANCED_INSTANCE_CONFIGURATION">
|
||||
NUM_ROW="50" SHOW_IF="(ACTION=='START')" GROUP="ADVANCED_INSTANCE_CONFIGURATION">
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="MASTER_SECURITY_GROUP" FIELD="TEXT"
|
||||
REQUIRED="true" NUM_ROW="19" SHOW_IF="ACTION=='START'"
|
||||
REQUIRED="true" NUM_ROW="55" SHOW_IF="ACTION=='START'"
|
||||
GROUP="ADVANCED_INSTANCE_CONFIGURATION">
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="ADDITIONAL_MASTER_SECURITY_GROUPS" FIELD="TEXT"
|
||||
REQUIRED="true" NUM_ROW="19" SHOW_IF="ACTION=='START'"
|
||||
REQUIRED="true" NUM_ROW="55" SHOW_IF="ACTION=='START'"
|
||||
GROUP="ADVANCED_INSTANCE_CONFIGURATION">
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="SLAVE_SECURITY_GROUP" FIELD="TEXT"
|
||||
REQUIRED="true" NUM_ROW="20" SHOW_IF="ACTION=='START'"
|
||||
REQUIRED="true" NUM_ROW="60" SHOW_IF="ACTION=='START'"
|
||||
GROUP="ADVANCED_INSTANCE_CONFIGURATION">
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="ADDITIONAL_SLAVE_SECURITY_GROUPS" FIELD="TEXT"
|
||||
REQUIRED="true" NUM_ROW="20" SHOW_IF="ACTION=='START'"
|
||||
REQUIRED="true" NUM_ROW="60" SHOW_IF="ACTION=='START'"
|
||||
GROUP="ADVANCED_INSTANCE_CONFIGURATION">
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="NOTE" FIELD="LABEL" REQUIRED="true"
|
||||
NUM_ROW="30" SHOW_IF="ACTION=='START'" GROUP="ADVANCED_INSTANCE_CONFIGURATION">
|
||||
NUM_ROW="65" SHOW_IF="ACTION=='START'" GROUP="ADVANCED_INSTANCE_CONFIGURATION">
|
||||
<DEFAULT>Additional groups should be set like this : "gname1,gname2,gname3"</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="SERVICE_ACCESS_SECURITY_GROUP" FIELD="TEXT"
|
||||
REQUIRED="true" NUM_ROW="31" SHOW_IF="ACTION=='START'"
|
||||
REQUIRED="true" NUM_ROW="70" SHOW_IF="ACTION=='START'"
|
||||
GROUP="ADVANCED_INSTANCE_CONFIGURATION">
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="BOOTSTRAP_ACTIONS" FIELD="TABLE" SHOW_IF="ACTION=='START'" NUM_ROW="32" NB_LINES="5" GROUP="BOOTSTRAP_GROUP">
|
||||
<PARAMETER NAME="BOOTSTRAP_ACTIONS" FIELD="TABLE" SHOW_IF="ACTION=='START'" NUM_ROW="75" NB_LINES="5" GROUP="BOOTSTRAP_GROUP">
|
||||
<ITEMS>
|
||||
<ITEM NAME="NAME" />
|
||||
<ITEM NAME="SCRIPT_PATH" />
|
||||
@@ -386,7 +496,7 @@
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="STEP_TABLE" FIELD="TABLE" SHOW_IF="ACTION=='START'" NUM_ROW="35" NB_LINES="5" GROUP="STEPS">
|
||||
<PARAMETER NAME="STEP_TABLE" FIELD="TABLE" SHOW_IF="ACTION=='START'" NUM_ROW="80" NB_LINES="5" GROUP="STEPS">
|
||||
<ITEMS>
|
||||
<ITEM NAME="NAME" />
|
||||
<ITEM NAME="ACTION_ON_FAILURE" FIELD="CLOSED_LIST">
|
||||
@@ -402,15 +512,15 @@
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
<PARAMETER NAME="KEEP_ALIVE" FIELD="CHECK"
|
||||
NUM_ROW="36" SHOW_IF="ACTION=='START'" GROUP="STEPS">
|
||||
NUM_ROW="85" SHOW_IF="ACTION=='START'" GROUP="STEPS">
|
||||
<DEFAULT>true</DEFAULT>
|
||||
</PARAMETER>
|
||||
<PARAMETER NAME="WAIT_FOR_STEPS_COMPLETE" FIELD="CHECK"
|
||||
NUM_ROW="37" SHOW_IF="ACTION=='START' AND isShow[WAIT_FOR_CLUSTER_READY] AND (WAIT_FOR_CLUSTER_READY=='true')" GROUP="STEPS">
|
||||
NUM_ROW="90" SHOW_IF="ACTION=='START' AND isShow[WAIT_FOR_CLUSTER_READY] AND (WAIT_FOR_CLUSTER_READY=='true')" GROUP="STEPS">
|
||||
<DEFAULT>true</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="PROPERTY_TABLE" FIELD="TABLE" NUM_ROW="40" NB_LINES="5" GROUP="PROPERTY_GROUP"
|
||||
<PARAMETER NAME="PROPERTY_TABLE" FIELD="TABLE" NUM_ROW="95" NB_LINES="5" GROUP="PROPERTY_GROUP"
|
||||
SHOW_IF="(ACTION=='START') AND (CLUSTER_VERSION!='AMI3_10_0') AND (CLUSTER_VERSION!='AMI3_9_0') AND (CLUSTER_VERSION!='AMI3_8_0') AND (CLUSTER_VERSION!='AMI2_4_11') AND (CLUSTER_VERSION!='AMI2_4_10')">
|
||||
<ITEMS>
|
||||
<ITEM NAME="CLASSIFICATION" />
|
||||
@@ -422,8 +532,8 @@
|
||||
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="aws-java-sdk-1.11.406.jar" MODULE="aws-java-sdk-1.11.406.jar"
|
||||
MVN="mvn:com.amazonaws/aws-java-sdk/1.11.406"
|
||||
<IMPORT NAME="aws-java-sdk-1.11.729.jar" MODULE="aws-java-sdk-1.11.729.jar"
|
||||
MVN="mvn:com.amazonaws/aws-java-sdk/1.11.729"
|
||||
REQUIRED="true" />
|
||||
<IMPORT NAME="jackson-core-2.10.1.jar" MODULE="jackson-core-2.10.1.jar"
|
||||
MVN="mvn:com.fasterxml.jackson.core/jackson-core/2.10.1"
|
||||
@@ -434,22 +544,20 @@
|
||||
<IMPORT NAME="jackson-annotations-2.10.1.jar" MODULE="jackson-annotations-2.10.1.jar"
|
||||
MVN="mvn:com.fasterxml.jackson.core/jackson-annotations/2.10.1"
|
||||
REQUIRED="true" />
|
||||
<IMPORT NAME="httpcore-4.4.9.jar" MODULE="httpcore-4.4.9.jar"
|
||||
MVN="mvn:org.apache.httpcomponents/httpcore/4.4.9"
|
||||
<IMPORT NAME="httpcore-4.4.11.jar" MODULE="httpcore-4.4.11.jar"
|
||||
MVN="mvn:org.apache.httpcomponents/httpcore/4.4.11"
|
||||
REQUIRED="true" />
|
||||
<IMPORT NAME="httpclient-4.5.5.jar" MODULE="httpclient-4.5.5.jar"
|
||||
MVN="mvn:org.apache.httpcomponents/httpclient/4.5.5"
|
||||
<IMPORT NAME="httpclient-4.5.9.jar" MODULE="httpclient-4.5.9.jar"
|
||||
MVN="mvn:org.apache.httpcomponents/httpclient/4.5.9"
|
||||
REQUIRED="true" />
|
||||
<IMPORT NAME="joda-time-2.8.1.jar" MODULE="joda-time-2.8.1.jar"
|
||||
MVN="mvn:joda-time/joda-time/2.8.1"
|
||||
REQUIRED="true" />
|
||||
<IMPORT NAME="commons-logging-1.1.3.jar" MODULE="commons-logging-1.1.3.jar"
|
||||
MVN="mvn:commons-logging/commons-logging/1.1.3"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-logging-1.1.3.jar"
|
||||
<IMPORT NAME="commons-logging-1.2.jar" MODULE="commons-logging-1.2.jar"
|
||||
MVN="mvn:commons-logging/commons-logging/1.2"
|
||||
REQUIRED="true" />
|
||||
<IMPORT NAME="commons-codec-1.6.jar" MODULE="commons-codec-1.6.jar"
|
||||
MVN="mvn:org.talend.libraries/commons-codec-1.6/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-codec-1.6.jar"
|
||||
<IMPORT NAME="commons-codec-1.11.jar" MODULE="commons-codec-1.11.jar"
|
||||
MVN="mvn:commons-codec/commons-codec/1.11"
|
||||
REQUIRED="true" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
@@ -198,8 +198,41 @@ ARN.NAME=Role ARN
|
||||
ROLE_SESSION_NAME.NAME=Role session name
|
||||
SESSION_DURATION.NAME=Session duration(minutes)
|
||||
|
||||
ASSUME_ROLE_CONFIG.NAME=Assume Role Configuration
|
||||
EXTERNALID.NAME=External Id
|
||||
SERIALNUMBER.NAME=Serial number
|
||||
TOKENCODE.NAME=Token code
|
||||
POLICY_TABLE.NAME=IAM Policy ARNs
|
||||
POLICY_TABLE.ITEM.POLICY_ARN=Policy ARN
|
||||
POLICY.NAME=Policy
|
||||
TAGS.NAME=Tags
|
||||
TAGS.ITEM.TAG_KEY=Key
|
||||
TAGS.ITEM.TAG_VALUE=Value
|
||||
TAGS.ITEM.TAG_TRANSITIVE=Transitive
|
||||
SET_STS_ENDPOINT.NAME=STS Endpoint
|
||||
STS_ENDPOINT.NAME=
|
||||
SIGNING_REGION.NAME=Signing region
|
||||
SIGNING_REGION.ITEM.DEFAULT=DEFAULT
|
||||
SIGNING_REGION.ITEM.GovCloud=AWS GovCloud (US)
|
||||
SIGNING_REGION.ITEM.US_EAST_1=US Standard
|
||||
SIGNING_REGION.ITEM.US_WEST_1=US West (N. California)
|
||||
SIGNING_REGION.ITEM.US_WEST_2=US West (Oregon)
|
||||
SIGNING_REGION.ITEM.US_EAST_2=US East (Ohio)
|
||||
SIGNING_REGION.ITEM.SA_EAST_1=South America (Sao Paulo)
|
||||
SIGNING_REGION.ITEM.EU_WEST_1=EU (Ireland)
|
||||
SIGNING_REGION.ITEM.EU_CENTRAL_1=EU (Frankfurt)
|
||||
SIGNING_REGION.ITEM.EU_WEST_2=EU (London)
|
||||
SIGNING_REGION.ITEM.EU_WEST_3=EU (Paris)
|
||||
SIGNING_REGION.ITEM.EU_NORTH_1=EU (Stockholm)
|
||||
SIGNING_REGION.ITEM.CN_NORTH_1=China (Beijing)
|
||||
SIGNING_REGION.ITEM.CN_NORTHWEST_1=China (Ningxia)
|
||||
SIGNING_REGION.ITEM.AP_EAST_1=Asia Pacific (Hong Kong)
|
||||
SIGNING_REGION.ITEM.AP_SOUTHEAST_1=Asia Pacific (Singapore)
|
||||
SIGNING_REGION.ITEM.AP_SOUTHEAST_2=Asia Pacific (Sydney)
|
||||
SIGNING_REGION.ITEM.AP_NORTHEAST_1=Asia Pacific (Tokyo)
|
||||
SIGNING_REGION.ITEM.AP_NORTHEAST_2=Asia Pacific (Seoul)
|
||||
SIGNING_REGION.ITEM.AP_SOUTH_1=Asia Pacific (Mumbai)
|
||||
SIGNING_REGION.ITEM.CA_CENTRAL_1=Canada (Central)
|
||||
|
||||
CUSTOMIZE_APPLICATION_GROUP.NAME=Customize Version and Application
|
||||
USE_CUSTOMIZE_VERSION.NAME=Customize Version and Application
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="SESSION_DURATION" FIELD="TEXT" NUM_ROW="15" REQUIRED="true"
|
||||
<PARAMETER NAME="SESSION_DURATION" FIELD="TEXT" NUM_ROW="15"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
GROUP="AUTHENTICATION">
|
||||
<DEFAULT>15</DEFAULT>
|
||||
@@ -162,21 +162,131 @@
|
||||
</PARAMETERS>
|
||||
|
||||
<ADVANCED_PARAMETERS>
|
||||
<PARAMETER NAME="SET_STS_ENDPOINT" FIELD="CHECK" NUM_ROW="1" REQUIRED="true"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'">
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="STS_ENDPOINT" FIELD="TEXT" NUM_ROW="1" REQUIRED="true"
|
||||
SHOW_IF="(ASSUME_ROLE == 'true') AND (SET_STS_ENDPOINT == 'true')">
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
<PARAMETER
|
||||
NAME="SET_STS_ENDPOINT"
|
||||
FIELD="CHECK"
|
||||
NUM_ROW="1"
|
||||
NB_LINES="5"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
SHOW_IF="isShow[ASSUME_ROLE] AND (ASSUME_ROLE == 'true')"
|
||||
>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="STS_ENDPOINT"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="1"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
SHOW_IF="isShow[SET_STS_ENDPOINT] AND (SET_STS_ENDPOINT == 'true')"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="SIGNING_REGION"
|
||||
FIELD="OPENED_LIST"
|
||||
NUM_ROW="2"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
REQUIRED="true"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
>
|
||||
<ITEMS DEFAULT="DEFAULT">
|
||||
<ITEM NAME="DEFAULT" VALUE="DEFAULT" />
|
||||
<ITEM NAME="GovCloud" VALUE=""us-gov-west-1"" />
|
||||
<ITEM NAME="US_EAST_1" VALUE=""us-east-1"" />
|
||||
<ITEM NAME="US_WEST_1" VALUE=""us-west-1"" />
|
||||
<ITEM NAME="US_WEST_2" VALUE=""us-west-2"" />
|
||||
<ITEM NAME="US_EAST_2" VALUE=""us-east-2"" />
|
||||
<ITEM NAME="SA_EAST_1" VALUE=""sa-east-1"" />
|
||||
<ITEM NAME="EU_WEST_1" VALUE=""eu-west-1"" />
|
||||
<ITEM NAME="EU_CENTRAL_1" VALUE=""eu-central-1"" />
|
||||
<ITEM NAME="EU_WEST_2" VALUE=""eu-west-2"" />
|
||||
<ITEM NAME="EU_WEST_3" VALUE=""eu-west-3"" />
|
||||
<ITEM NAME="EU_NORTH_1" VALUE=""eu-north-1"" />
|
||||
<ITEM NAME="CN_NORTH_1" VALUE=""cn-north-1"" />
|
||||
<ITEM NAME="CN_NORTHWEST_1" VALUE=""cn-northwest-1"" />
|
||||
<ITEM NAME="AP_EAST_1" VALUE=""ap-east-1"" />
|
||||
<ITEM NAME="AP_SOUTHEAST_1" VALUE=""ap-southeast-1"" />
|
||||
<ITEM NAME="AP_SOUTHEAST_2" VALUE=""ap-southeast-2"" />
|
||||
<ITEM NAME="AP_NORTHEAST_1" VALUE=""ap-northeast-1"" />
|
||||
<ITEM NAME="AP_NORTHEAST_2" VALUE=""ap-northeast-2"" />
|
||||
<ITEM NAME="AP_SOUTH_1" VALUE=""ap-south-1"" />
|
||||
<ITEM NAME="CA_CENTRAL_1" VALUE=""ca-central-1"" />
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="EXTERNALID"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="3"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="SERIALNUMBER"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="4"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="TOKENCODE"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="5"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="TAGS"
|
||||
FIELD="TABLE"
|
||||
NUM_ROW="6"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
>
|
||||
<ITEMS>
|
||||
<ITEM NAME="TAG_KEY" FIELD="TEXT" />
|
||||
<ITEM NAME="TAG_VALUE" FIELD="TEXT" />
|
||||
<ITEM NAME="TAG_TRANSITIVE" FIELD="CHECK" VALUE="FALSE"/>
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="POLICY_TABLE"
|
||||
FIELD="TABLE"
|
||||
NUM_ROW="7"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
>
|
||||
<ITEMS>
|
||||
<ITEM NAME="POLICY_ARN" VALUE="" />
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="POLICY"
|
||||
FIELD="MEMO"
|
||||
NUM_ROW="8"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
NB_LINES="15"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
</ADVANCED_PARAMETERS>
|
||||
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="aws-java-sdk-1.11.406.jar" MODULE="aws-java-sdk-1.11.406.jar"
|
||||
MVN="mvn:com.amazonaws/aws-java-sdk/1.11.406"
|
||||
<IMPORT NAME="aws-java-sdk-1.11.729.jar" MODULE="aws-java-sdk-1.11.729.jar"
|
||||
MVN="mvn:com.amazonaws/aws-java-sdk/1.11.729"
|
||||
REQUIRED="true" />
|
||||
<IMPORT NAME="jackson-core-2.10.1.jar" MODULE="jackson-core-2.10.1.jar"
|
||||
MVN="mvn:com.fasterxml.jackson.core/jackson-core/2.10.1"
|
||||
@@ -187,22 +297,20 @@
|
||||
<IMPORT NAME="jackson-annotations-2.10.1.jar" MODULE="jackson-annotations-2.10.1.jar"
|
||||
MVN="mvn:com.fasterxml.jackson.core/jackson-annotations/2.10.1"
|
||||
REQUIRED="true" />
|
||||
<IMPORT NAME="httpcore-4.4.9.jar" MODULE="httpcore-4.4.9.jar"
|
||||
MVN="mvn:org.apache.httpcomponents/httpcore/4.4.9"
|
||||
<IMPORT NAME="httpcore-4.4.11.jar" MODULE="httpcore-4.4.11.jar"
|
||||
MVN="mvn:org.apache.httpcomponents/httpcore/4.4.11"
|
||||
REQUIRED="true" />
|
||||
<IMPORT NAME="httpclient-4.5.5.jar" MODULE="httpclient-4.5.5.jar"
|
||||
MVN="mvn:org.apache.httpcomponents/httpclient/4.5.5"
|
||||
<IMPORT NAME="httpclient-4.5.9.jar" MODULE="httpclient-4.5.9.jar"
|
||||
MVN="mvn:org.apache.httpcomponents/httpclient/4.5.9"
|
||||
REQUIRED="true" />
|
||||
<IMPORT NAME="joda-time-2.8.1.jar" MODULE="joda-time-2.8.1.jar"
|
||||
MVN="mvn:joda-time/joda-time/2.8.1"
|
||||
REQUIRED="true" />
|
||||
<IMPORT NAME="commons-logging-1.1.3.jar" MODULE="commons-logging-1.1.3.jar"
|
||||
MVN="mvn:commons-logging/commons-logging/1.1.3"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-logging-1.1.3.jar"
|
||||
<IMPORT NAME="commons-logging-1.2.jar" MODULE="commons-logging-1.2.jar"
|
||||
MVN="mvn:commons-logging/commons-logging/1.2"
|
||||
REQUIRED="true" />
|
||||
<IMPORT NAME="commons-codec-1.6.jar" MODULE="commons-codec-1.6.jar"
|
||||
MVN="mvn:org.talend.libraries/commons-codec-1.6/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-codec-1.6.jar"
|
||||
<IMPORT NAME="commons-codec-1.11.jar" MODULE="commons-codec-1.11.jar"
|
||||
MVN="mvn:commons-codec/commons-codec/1.11"
|
||||
REQUIRED="true" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
@@ -94,5 +94,38 @@ ARN.NAME=Role ARN
|
||||
ROLE_SESSION_NAME.NAME=Role session name
|
||||
SESSION_DURATION.NAME=Session duration(minutes)
|
||||
|
||||
ASSUME_ROLE_CONFIG.NAME=Assume Role Configuration
|
||||
EXTERNALID.NAME=External Id
|
||||
SERIALNUMBER.NAME=Serial number
|
||||
TOKENCODE.NAME=Token code
|
||||
POLICY_TABLE.NAME=IAM Policy ARNs
|
||||
POLICY_TABLE.ITEM.POLICY_ARN=Policy ARN
|
||||
POLICY.NAME=Policy
|
||||
TAGS.NAME=Tags
|
||||
TAGS.ITEM.TAG_KEY=Key
|
||||
TAGS.ITEM.TAG_VALUE=Value
|
||||
TAGS.ITEM.TAG_TRANSITIVE=Transitive
|
||||
SET_STS_ENDPOINT.NAME=STS Endpoint
|
||||
STS_ENDPOINT.NAME=
|
||||
STS_ENDPOINT.NAME=
|
||||
SIGNING_REGION.NAME=Signing region
|
||||
SIGNING_REGION.ITEM.DEFAULT=DEFAULT
|
||||
SIGNING_REGION.ITEM.GovCloud=AWS GovCloud (US)
|
||||
SIGNING_REGION.ITEM.US_EAST_1=US Standard
|
||||
SIGNING_REGION.ITEM.US_WEST_1=US West (N. California)
|
||||
SIGNING_REGION.ITEM.US_WEST_2=US West (Oregon)
|
||||
SIGNING_REGION.ITEM.US_EAST_2=US East (Ohio)
|
||||
SIGNING_REGION.ITEM.SA_EAST_1=South America (Sao Paulo)
|
||||
SIGNING_REGION.ITEM.EU_WEST_1=EU (Ireland)
|
||||
SIGNING_REGION.ITEM.EU_CENTRAL_1=EU (Frankfurt)
|
||||
SIGNING_REGION.ITEM.EU_WEST_2=EU (London)
|
||||
SIGNING_REGION.ITEM.EU_WEST_3=EU (Paris)
|
||||
SIGNING_REGION.ITEM.EU_NORTH_1=EU (Stockholm)
|
||||
SIGNING_REGION.ITEM.CN_NORTH_1=China (Beijing)
|
||||
SIGNING_REGION.ITEM.CN_NORTHWEST_1=China (Ningxia)
|
||||
SIGNING_REGION.ITEM.AP_EAST_1=Asia Pacific (Hong Kong)
|
||||
SIGNING_REGION.ITEM.AP_SOUTHEAST_1=Asia Pacific (Singapore)
|
||||
SIGNING_REGION.ITEM.AP_SOUTHEAST_2=Asia Pacific (Sydney)
|
||||
SIGNING_REGION.ITEM.AP_NORTHEAST_1=Asia Pacific (Tokyo)
|
||||
SIGNING_REGION.ITEM.AP_NORTHEAST_2=Asia Pacific (Seoul)
|
||||
SIGNING_REGION.ITEM.AP_SOUTH_1=Asia Pacific (Mumbai)
|
||||
SIGNING_REGION.ITEM.CA_CENTRAL_1=Canada (Central)
|
||||
@@ -37,8 +37,10 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
String dataAction = ElementParameterParser.getValue(node,"__DATA_ACTION__");
|
||||
|
||||
String commitEvery = ElementParameterParser.getValue(node, "__COMMIT_EVERY__");
|
||||
|
||||
boolean setAutoCommit = false;
|
||||
|
||||
String useExistingConn = ElementParameterParser.getValue(node,"__USE_EXISTING_CONNECTION__");
|
||||
boolean useExistingConnection = "true".equals(ElementParameterParser.getValue(node,"__USE_EXISTING_CONNECTION__"));
|
||||
|
||||
boolean extendedInsert = false;
|
||||
|
||||
@@ -50,11 +52,13 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
|
||||
String dbVersion = "" ;
|
||||
String connection = ElementParameterParser.getValue(node,"__CONNECTION__");
|
||||
if(("true").equals(useExistingConn)) {
|
||||
if(useExistingConnection) {
|
||||
List<? extends INode> nodes = process.getNodesOfType("tAmazonMysqlConnection");
|
||||
for (INode ne:nodes) {
|
||||
if (connection.equals(ne.getUniqueName())) {
|
||||
dbVersion = ElementParameterParser.getValue(ne, "__DB_VERSION__");
|
||||
setAutoCommit = "true".equals(ElementParameterParser.getValue(ne, "__AUTO_COMMIT__"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -246,7 +250,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
resourceMap.put("statementClosed_<%=cid%>", true);
|
||||
<%
|
||||
if(!("true").equals(useExistingConn)){
|
||||
if(!useExistingConnection){
|
||||
if(!("").equals(commitEvery) && !("0").equals(commitEvery))
|
||||
{
|
||||
%>
|
||||
|
||||
@@ -5,6 +5,7 @@ imports="
|
||||
org.talend.core.model.process.ElementParameterParser
|
||||
org.talend.core.model.process.IConnection
|
||||
org.talend.core.model.utils.NodeUtil
|
||||
org.talend.core.model.process.IProcess
|
||||
java.util.List
|
||||
"
|
||||
%>
|
||||
@@ -15,6 +16,7 @@ imports="
|
||||
|
||||
String cid = node.getUniqueName();
|
||||
dbLog = new DBLogUtil(node);
|
||||
IProcess process = node.getProcess();
|
||||
String dataAction = ElementParameterParser.getValue(node,"__DATA_ACTION__");
|
||||
|
||||
String commitEvery = ElementParameterParser.getValue(node, "__COMMIT_EVERY__");
|
||||
@@ -22,6 +24,7 @@ imports="
|
||||
String dbVersion = ElementParameterParser.getValue(node, "__DB_VERSION__");
|
||||
|
||||
String connection = ElementParameterParser.getValue(node,"__CONNECTION__");
|
||||
boolean setAutoCommit = false;
|
||||
boolean useExistingConnection = "true".equals(ElementParameterParser.getValue(node,"__USE_EXISTING_CONNECTION__"));
|
||||
|
||||
String dieOnError = ElementParameterParser.getValue(node, "__DIE_ON_ERROR__");
|
||||
@@ -48,6 +51,16 @@ imports="
|
||||
IConnection rejectConn = rejectConns.get(0);
|
||||
rejectConnName = rejectConn.getName();
|
||||
}
|
||||
|
||||
if(useExistingConnection) {
|
||||
List<? extends INode> nodes = process.getNodesOfType("tAmazonOracleConnection");
|
||||
for (INode ne:nodes) {
|
||||
if (connection.equals(ne.getUniqueName())) {
|
||||
setAutoCommit = "true".equals(ElementParameterParser.getValue(ne, "__AUTO_COMMIT__"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
boolean isUseBatchByDBVersion = (!useExistingConnection && !"ORACLE_8".equalsIgnoreCase(dbVersion)) || (useExistingConnection && !"ORACLE_8".equalsIgnoreCase(NodeUtil.getNodeByUniqueName(node.getProcess(), connection).getUniqueName()));
|
||||
|
||||
boolean useBatch = true;
|
||||
|
||||
@@ -24,6 +24,9 @@
|
||||
String user = ElementParameterParser.getValue(node, "__USER__");
|
||||
String node_type = ElementParameterParser.getValue(node, "__NODE_TYPE__");
|
||||
String node_count = ElementParameterParser.getValue(node, "__NODE_COUNT__");
|
||||
if (node_count.isEmpty()) {
|
||||
node_count = "1";
|
||||
}
|
||||
|
||||
boolean isLog4jEnabled = "true".equals(ElementParameterParser.getValue(node.getProcess(), "__LOG4J_ACTIVATE__"));
|
||||
|
||||
@@ -88,52 +91,46 @@
|
||||
.withMasterUsername(<%=user%>)
|
||||
.withMasterUserPassword(decryptedPwd_<%=cid%>)
|
||||
|
||||
.withNodeType(<%=node_type%>)
|
||||
.withNodeType(<%=node_type%>);
|
||||
|
||||
<%
|
||||
if(new Integer(node_count) > 1){
|
||||
%>
|
||||
.withNumberOfNodes(<%=node_count%>)
|
||||
<%
|
||||
} else {
|
||||
%>
|
||||
.withClusterType("single-node")
|
||||
<%
|
||||
}
|
||||
%>
|
||||
|
||||
//advanced settings
|
||||
<%if(parameterUtil.isValid(parameter_group_name)) {%>
|
||||
.withClusterParameterGroupName(<%=parameter_group_name%>)
|
||||
<%}%>
|
||||
|
||||
<%if(parameterUtil.isValid(subnet_group_name)) {%>
|
||||
.withClusterSubnetGroupName(<%=subnet_group_name%>)
|
||||
if (<%=node_count%> > 1) {
|
||||
request_<%=cid%> = request_<%=cid%>.withNumberOfNodes(<%=node_count%>);
|
||||
} else {
|
||||
request_<%=cid%> = request_<%=cid%>.withClusterType("single-node");
|
||||
}
|
||||
|
||||
//advanced settings
|
||||
<%if(parameterUtil.isValid(parameter_group_name)) {%>
|
||||
request_<%=cid%> = request_<%=cid%>.withClusterParameterGroupName(<%=parameter_group_name%>);
|
||||
<%}%>
|
||||
|
||||
<%if(parameterUtil.isValid(subnet_group_name)) {%>
|
||||
request_<%=cid%> = request_<%=cid%>.withClusterSubnetGroupName(<%=subnet_group_name%>);
|
||||
<%}%>
|
||||
|
||||
<%
|
||||
if(publicly_accessible) {
|
||||
%>
|
||||
request_<%=cid%> = request_<%=cid%>.withPubliclyAccessible(true);
|
||||
<%if(set_public_ip_address) {%>
|
||||
request_<%=cid%> = request_<%=cid%>.withElasticIp(<%=elastic_ip%>);
|
||||
<%}%>
|
||||
|
||||
<%
|
||||
if(publicly_accessible) {
|
||||
%>
|
||||
.withPubliclyAccessible(true)
|
||||
<%if(set_public_ip_address) {%>
|
||||
.withElasticIp(<%=elastic_ip%>)
|
||||
<%}%>
|
||||
<%
|
||||
} else {
|
||||
%>
|
||||
.withPubliclyAccessible(false)
|
||||
<%
|
||||
}
|
||||
%>
|
||||
|
||||
<%if(parameterUtil.isValid(availability_zone)) {%>
|
||||
.withAvailabilityZone(<%=availability_zone%>)
|
||||
<%}%>
|
||||
|
||||
<%if(parameterUtil.isValid(vpc_security_groupids)) {%>
|
||||
.withVpcSecurityGroupIds(<%=vpc_security_groupids%>.split(","))
|
||||
<%}%>
|
||||
;
|
||||
<%
|
||||
} else {
|
||||
%>
|
||||
request_<%=cid%> = request_<%=cid%>.withPubliclyAccessible(false);
|
||||
<%
|
||||
}
|
||||
%>
|
||||
|
||||
<%if(parameterUtil.isValid(availability_zone)) {%>
|
||||
request_<%=cid%> = request_<%=cid%>.withAvailabilityZone(<%=availability_zone%>);
|
||||
<%}%>
|
||||
|
||||
<%if(parameterUtil.isValid(vpc_security_groupids)) {%>
|
||||
request_<%=cid%> = request_<%=cid%>.withVpcSecurityGroupIds(<%=vpc_security_groupids%>.split(","));
|
||||
<%}%>
|
||||
|
||||
|
||||
com.amazonaws.services.redshift.model.Cluster result_<%=cid%> = client_<%=cid%>.createCluster(request_<%=cid%>);
|
||||
<%if(isLog4jEnabled) {%>
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="SESSION_DURATION" FIELD="TEXT" NUM_ROW="15" REQUIRED="true"
|
||||
<PARAMETER NAME="SESSION_DURATION" FIELD="TEXT" NUM_ROW="15"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
GROUP="AUTHENTICATION">
|
||||
<DEFAULT>15</DEFAULT>
|
||||
@@ -153,31 +153,141 @@
|
||||
</PARAMETERS>
|
||||
|
||||
<ADVANCED_PARAMETERS>
|
||||
<PARAMETER NAME="SET_STS_ENDPOINT" FIELD="CHECK" NUM_ROW="1" REQUIRED="true"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'">
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="STS_ENDPOINT" FIELD="TEXT" NUM_ROW="1" REQUIRED="true"
|
||||
SHOW_IF="(ASSUME_ROLE == 'true') AND (SET_STS_ENDPOINT == 'true')">
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
<PARAMETER
|
||||
NAME="SET_STS_ENDPOINT"
|
||||
FIELD="CHECK"
|
||||
NUM_ROW="1"
|
||||
NB_LINES="5"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
SHOW_IF="isShow[ASSUME_ROLE] AND (ASSUME_ROLE == 'true')"
|
||||
>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="STS_ENDPOINT"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="1"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
SHOW_IF="isShow[SET_STS_ENDPOINT] AND (SET_STS_ENDPOINT == 'true')"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="SIGNING_REGION"
|
||||
FIELD="OPENED_LIST"
|
||||
NUM_ROW="2"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
REQUIRED="true"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
>
|
||||
<ITEMS DEFAULT="DEFAULT">
|
||||
<ITEM NAME="DEFAULT" VALUE="DEFAULT" />
|
||||
<ITEM NAME="GovCloud" VALUE=""us-gov-west-1"" />
|
||||
<ITEM NAME="US_EAST_1" VALUE=""us-east-1"" />
|
||||
<ITEM NAME="US_WEST_1" VALUE=""us-west-1"" />
|
||||
<ITEM NAME="US_WEST_2" VALUE=""us-west-2"" />
|
||||
<ITEM NAME="US_EAST_2" VALUE=""us-east-2"" />
|
||||
<ITEM NAME="SA_EAST_1" VALUE=""sa-east-1"" />
|
||||
<ITEM NAME="EU_WEST_1" VALUE=""eu-west-1"" />
|
||||
<ITEM NAME="EU_CENTRAL_1" VALUE=""eu-central-1"" />
|
||||
<ITEM NAME="EU_WEST_2" VALUE=""eu-west-2"" />
|
||||
<ITEM NAME="EU_WEST_3" VALUE=""eu-west-3"" />
|
||||
<ITEM NAME="EU_NORTH_1" VALUE=""eu-north-1"" />
|
||||
<ITEM NAME="CN_NORTH_1" VALUE=""cn-north-1"" />
|
||||
<ITEM NAME="CN_NORTHWEST_1" VALUE=""cn-northwest-1"" />
|
||||
<ITEM NAME="AP_EAST_1" VALUE=""ap-east-1"" />
|
||||
<ITEM NAME="AP_SOUTHEAST_1" VALUE=""ap-southeast-1"" />
|
||||
<ITEM NAME="AP_SOUTHEAST_2" VALUE=""ap-southeast-2"" />
|
||||
<ITEM NAME="AP_NORTHEAST_1" VALUE=""ap-northeast-1"" />
|
||||
<ITEM NAME="AP_NORTHEAST_2" VALUE=""ap-northeast-2"" />
|
||||
<ITEM NAME="AP_SOUTH_1" VALUE=""ap-south-1"" />
|
||||
<ITEM NAME="CA_CENTRAL_1" VALUE=""ca-central-1"" />
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="EXTERNALID"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="3"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="SERIALNUMBER"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="4"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="TOKENCODE"
|
||||
FIELD="TEXT"
|
||||
NUM_ROW="5"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="TAGS"
|
||||
FIELD="TABLE"
|
||||
NUM_ROW="6"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
>
|
||||
<ITEMS>
|
||||
<ITEM NAME="TAG_KEY" FIELD="TEXT" />
|
||||
<ITEM NAME="TAG_VALUE" FIELD="TEXT" />
|
||||
<ITEM NAME="TAG_TRANSITIVE" FIELD="CHECK" VALUE="FALSE"/>
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="POLICY_TABLE"
|
||||
FIELD="TABLE"
|
||||
NUM_ROW="7"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
>
|
||||
<ITEMS>
|
||||
<ITEM NAME="POLICY_ARN" VALUE="" />
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER
|
||||
NAME="POLICY"
|
||||
FIELD="MEMO"
|
||||
NUM_ROW="8"
|
||||
GROUP="ASSUME_ROLE_CONFIG"
|
||||
NB_LINES="15"
|
||||
SHOW_IF="ASSUME_ROLE == 'true'"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="WAIT_FOR_CLUSTER_READY" FIELD="CHECK"
|
||||
NUM_ROW="3"
|
||||
NUM_ROW="9"
|
||||
SHOW_IF="(ACTION=='CREATE_CLUSTER') OR (ACTION=='RESIZE_CLUSTER') OR (ACTION=='RESTORE_FROM_SNAPSHOT')"
|
||||
GROUP="ADVANCED_CONFIGURATION">
|
||||
<DEFAULT>true</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="ORIGINAL_CLUSTER_ID_OF_SNAPSHOT" FIELD="TEXT"
|
||||
NUM_ROW="5"
|
||||
NUM_ROW="10"
|
||||
SHOW_IF="(ACTION=='RESTORE_FROM_SNAPSHOT') OR (ACTION=='DELETE_SNAPSHOT')"
|
||||
GROUP="ADVANCED_CONFIGURATION">
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="PARAMETER_GROUP_NAME" FIELD="TEXT" NUM_ROW="10"
|
||||
<PARAMETER NAME="PARAMETER_GROUP_NAME" FIELD="TEXT" NUM_ROW="11"
|
||||
SHOW_IF="(ACTION=='CREATE_CLUSTER') OR (ACTION=='RESTORE_FROM_SNAPSHOT')"
|
||||
GROUP="ADVANCED_CONFIGURATION">
|
||||
<DEFAULT>""</DEFAULT>
|
||||
@@ -231,8 +341,8 @@
|
||||
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="aws-java-sdk-1.11.406.jar" MODULE="aws-java-sdk-1.11.406.jar"
|
||||
MVN="mvn:com.amazonaws/aws-java-sdk/1.11.406"
|
||||
<IMPORT NAME="aws-java-sdk-1.11.729.jar" MODULE="aws-java-sdk-1.11.729.jar"
|
||||
MVN="mvn:com.amazonaws/aws-java-sdk/1.11.729"
|
||||
REQUIRED="true" />
|
||||
<IMPORT NAME="jackson-core-2.10.1.jar" MODULE="jackson-core-2.10.1.jar"
|
||||
MVN="mvn:com.fasterxml.jackson.core/jackson-core/2.10.1"
|
||||
@@ -243,22 +353,20 @@
|
||||
<IMPORT NAME="jackson-annotations-2.10.1.jar" MODULE="jackson-annotations-2.10.1.jar"
|
||||
MVN="mvn:com.fasterxml.jackson.core/jackson-annotations/2.10.1"
|
||||
REQUIRED="true" />
|
||||
<IMPORT NAME="httpcore-4.4.9.jar" MODULE="httpcore-4.4.9.jar"
|
||||
MVN="mvn:org.apache.httpcomponents/httpcore/4.4.9"
|
||||
<IMPORT NAME="httpcore-4.4.11.jar" MODULE="httpcore-4.4.11.jar"
|
||||
MVN="mvn:org.apache.httpcomponents/httpcore/4.4.11"
|
||||
REQUIRED="true" />
|
||||
<IMPORT NAME="httpclient-4.5.5.jar" MODULE="httpclient-4.5.5.jar"
|
||||
MVN="mvn:org.apache.httpcomponents/httpclient/4.5.5"
|
||||
<IMPORT NAME="httpclient-4.5.9.jar" MODULE="httpclient-4.5.9.jar"
|
||||
MVN="mvn:org.apache.httpcomponents/httpclient/4.5.9"
|
||||
REQUIRED="true" />
|
||||
<IMPORT NAME="joda-time-2.8.1.jar" MODULE="joda-time-2.8.1.jar"
|
||||
MVN="mvn:joda-time/joda-time/2.8.1"
|
||||
REQUIRED="true" />
|
||||
<IMPORT NAME="commons-logging-1.1.3.jar" MODULE="commons-logging-1.1.3.jar"
|
||||
MVN="mvn:commons-logging/commons-logging/1.1.3"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-logging-1.1.3.jar"
|
||||
<IMPORT NAME="commons-logging-1.2.jar" MODULE="commons-logging-1.2.jar"
|
||||
MVN="mvn:commons-logging/commons-logging/1.2"
|
||||
REQUIRED="true" />
|
||||
<IMPORT NAME="commons-codec-1.6.jar" MODULE="commons-codec-1.6.jar"
|
||||
MVN="mvn:org.talend.libraries/commons-codec-1.6/6.0.0"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-codec-1.6.jar"
|
||||
<IMPORT NAME="commons-codec-1.11.jar" MODULE="commons-codec-1.11.jar"
|
||||
MVN="mvn:commons-codec/commons-codec/1.11"
|
||||
REQUIRED="true" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
@@ -71,5 +71,38 @@ ARN.NAME=Role ARN
|
||||
ROLE_SESSION_NAME.NAME=Role session name
|
||||
SESSION_DURATION.NAME=Session duration(minutes)
|
||||
|
||||
ASSUME_ROLE_CONFIG.NAME=Assume Role Configuration
|
||||
EXTERNALID.NAME=External Id
|
||||
SERIALNUMBER.NAME=Serial number
|
||||
TOKENCODE.NAME=Token code
|
||||
POLICY_TABLE.NAME=IAM Policy ARNs
|
||||
POLICY_TABLE.ITEM.POLICY_ARN=Policy ARN
|
||||
POLICY.NAME=Policy
|
||||
TAGS.NAME=Tags
|
||||
TAGS.ITEM.TAG_KEY=Key
|
||||
TAGS.ITEM.TAG_VALUE=Value
|
||||
TAGS.ITEM.TAG_TRANSITIVE=Transitive
|
||||
SET_STS_ENDPOINT.NAME=STS Endpoint
|
||||
STS_ENDPOINT.NAME=
|
||||
STS_ENDPOINT.NAME=
|
||||
SIGNING_REGION.NAME=Signing region
|
||||
SIGNING_REGION.ITEM.DEFAULT=DEFAULT
|
||||
SIGNING_REGION.ITEM.GovCloud=AWS GovCloud (US)
|
||||
SIGNING_REGION.ITEM.US_EAST_1=US Standard
|
||||
SIGNING_REGION.ITEM.US_WEST_1=US West (N. California)
|
||||
SIGNING_REGION.ITEM.US_WEST_2=US West (Oregon)
|
||||
SIGNING_REGION.ITEM.US_EAST_2=US East (Ohio)
|
||||
SIGNING_REGION.ITEM.SA_EAST_1=South America (Sao Paulo)
|
||||
SIGNING_REGION.ITEM.EU_WEST_1=EU (Ireland)
|
||||
SIGNING_REGION.ITEM.EU_CENTRAL_1=EU (Frankfurt)
|
||||
SIGNING_REGION.ITEM.EU_WEST_2=EU (London)
|
||||
SIGNING_REGION.ITEM.EU_WEST_3=EU (Paris)
|
||||
SIGNING_REGION.ITEM.EU_NORTH_1=EU (Stockholm)
|
||||
SIGNING_REGION.ITEM.CN_NORTH_1=China (Beijing)
|
||||
SIGNING_REGION.ITEM.CN_NORTHWEST_1=China (Ningxia)
|
||||
SIGNING_REGION.ITEM.AP_EAST_1=Asia Pacific (Hong Kong)
|
||||
SIGNING_REGION.ITEM.AP_SOUTHEAST_1=Asia Pacific (Singapore)
|
||||
SIGNING_REGION.ITEM.AP_SOUTHEAST_2=Asia Pacific (Sydney)
|
||||
SIGNING_REGION.ITEM.AP_NORTHEAST_1=Asia Pacific (Tokyo)
|
||||
SIGNING_REGION.ITEM.AP_NORTHEAST_2=Asia Pacific (Seoul)
|
||||
SIGNING_REGION.ITEM.AP_SOUTH_1=Asia Pacific (Mumbai)
|
||||
SIGNING_REGION.ITEM.CA_CENTRAL_1=Canada (Central)
|
||||
@@ -22,16 +22,6 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
INode node = (INode)codeGenArgument.getArgument();
|
||||
String cid = node.getUniqueName();
|
||||
|
||||
String storageType = ElementParameterParser.getValue(node, "__AZURE_STORAGE__");
|
||||
String accountName = ElementParameterParser.getValue(node, "__ACCOUNT_NAME__");
|
||||
|
||||
String clientId = ElementParameterParser.getValue(node, "__CLIENT_ID__");
|
||||
String oauthEndpoint = ElementParameterParser.getValue(node, "__ENDPOINT__");
|
||||
|
||||
String container = ElementParameterParser.getValue(node, "__CONTAINER__");
|
||||
|
||||
String azureFolder = ElementParameterParser.getValue(node, "__AZURE_LOCATION__");
|
||||
|
||||
boolean isLog4jEnabled = ("true").equals(ElementParameterParser.getValue(node.getProcess(), "__LOG4J_ACTIVATE__"));
|
||||
%>
|
||||
|
||||
@@ -62,238 +52,66 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
|
||||
String tableAction = ElementParameterParser.getValue(node,"__TABLE_ACTION__");
|
||||
|
||||
String fieldSeparator = ElementParameterParser.getValueWithUIFieldKey(node,"__FIELDSEPARATOR__","FIELDSEPARATOR");
|
||||
|
||||
String loadFileFormat = ElementParameterParser.getValue(node,"__IMPORT_TYPE__");
|
||||
|
||||
boolean dateFormat = "true".equals(ElementParameterParser.getValue(node,"__DATE_FORMAT__"));
|
||||
|
||||
String datePattern = ElementParameterParser.getValue(node,"__DATE_PATTERN__");
|
||||
|
||||
boolean useStringDelimiter = "true".equals(ElementParameterParser.getValue(node,"__USE_STRING_DELIMITER__"));
|
||||
|
||||
String stringDelimiter = ElementParameterParser.getValueWithUIFieldKey(node,"__STRINGDELIMITER__","STRINGDELIMITER");
|
||||
|
||||
boolean isTypeDefault = "true".equals(ElementParameterParser.getValue(node,"__USE_TYPE_DEFAULT__"));
|
||||
boolean useActiveDirectoryAuth = "true".equals(ElementParameterParser.getValue(node, "__ACTIVE_DIR_AUTH__"));
|
||||
|
||||
// PolyBase & Copy shared config
|
||||
boolean isPolyBase = "POLYBASE".equals(ElementParameterParser.getValue(node,"__LOAD_METHOD__"));
|
||||
|
||||
String storageType = ElementParameterParser.getValue(node, "__AZURE_STORAGE__");
|
||||
String accountName = ElementParameterParser.getValue(node, "__ACCOUNT_NAME__");
|
||||
String container = ElementParameterParser.getValue(node, "__CONTAINER__");
|
||||
String azureFolder = ElementParameterParser.getValue(node, "__AZURE_LOCATION__");
|
||||
boolean isCompress = "true".equals(ElementParameterParser.getValue(node, "__COMPRESS__"));
|
||||
|
||||
String compressionType = null;
|
||||
|
||||
String serdeMethod = ElementParameterParser.getValue(node,"__SERDE_METHOD__");
|
||||
|
||||
if (isCompress) {
|
||||
if ("DELIMITED_TEXT".equals(loadFileFormat)) {
|
||||
compressionType = ElementParameterParser.getValue(node,"__COMPRESSION_TEXT__");
|
||||
} else if ("HIVE_RCFILE".equals(loadFileFormat)) {
|
||||
compressionType = ElementParameterParser.getValue(node,"__COMPRESSION_RC__");
|
||||
} else if ("HIVE_ORC".equals(loadFileFormat)) {
|
||||
compressionType = ElementParameterParser.getValue(node,"__COMPRESSION_ORC__");
|
||||
} else if ("PARQUET".equals(loadFileFormat)) {
|
||||
compressionType = ElementParameterParser.getValue(node,"__COMPRESSION_PARQUET__");
|
||||
}
|
||||
}
|
||||
|
||||
String fileFormatType= null;
|
||||
if ("DELIMITED_TEXT".equals(loadFileFormat)) {
|
||||
fileFormatType = "DelimitedText";
|
||||
} else if ("HIVE_RCFILE".equals(loadFileFormat)) {
|
||||
fileFormatType = "RCFILE";
|
||||
} else if ("HIVE_ORC".equals(loadFileFormat)) {
|
||||
fileFormatType = "ORC";
|
||||
} else if ("PARQUET".equals(loadFileFormat)) {
|
||||
fileFormatType = "PARQUET";
|
||||
}
|
||||
// External Table Reject Options
|
||||
|
||||
boolean isEnabledExtTableOptions = "true".equals(ElementParameterParser.getValue(node, "__EXT_TABLE_OPTIONS__"));
|
||||
|
||||
String rejectType = ElementParameterParser.getValue(node,"__REJECT_TYPE__");
|
||||
|
||||
String rejectValue = ElementParameterParser.getValue(node,"__REJECT_VALUE__");
|
||||
|
||||
String rejectSampleValue = ElementParameterParser.getValue(node,"__REJECT_SAMPLE_VALUE__");
|
||||
|
||||
String DistributionOption = ElementParameterParser.getValue(node,"__DISTRIBUTION__");
|
||||
|
||||
String DistributionColumnName = ElementParameterParser.getValue(node,"__DISTRIBUTION_COLUMN_NAME__");
|
||||
|
||||
String TableOption = ElementParameterParser.getValue(node,"__TABLE_OPTION__");
|
||||
|
||||
String IndexColumns = ElementParameterParser.getValue(node,"__INDEX_COLUMNS__");
|
||||
|
||||
boolean isEnabled_Partition = "true".equals(ElementParameterParser.getValue(node, "__PARTITION__"));
|
||||
|
||||
String PartitionColumnName = ElementParameterParser.getValue(node,"__PARTITION_COLUMN_NAME__");
|
||||
|
||||
String PartitionRange = ElementParameterParser.getValue(node,"__PARTITION_COLUMN_NAME_RANGE__");
|
||||
|
||||
String PartitionValues = ElementParameterParser.getValue(node,"__PARTITION_VALUES__");
|
||||
|
||||
// External Table Reject Options END
|
||||
|
||||
%>
|
||||
|
||||
final String OUT_DELIM_<%=cid %> = <%=fieldSeparator %>;
|
||||
|
||||
String randomIdentifier_<%=cid%> = java.util.UUID.randomUUID().toString().replaceAll("-","");
|
||||
|
||||
String azureCredIdentity_<%=cid%> = "";
|
||||
String azureCredName_<%=cid%> = "";
|
||||
String azureContainer_<%=cid%> = "";
|
||||
|
||||
<%
|
||||
String passwordFieldName = null;
|
||||
if(isPolyBase){
|
||||
if ("ADLS".equals(storageType)) {
|
||||
passwordFieldName = "__PRINCIPAL_KEY__";
|
||||
}else{
|
||||
passwordFieldName = "__SECRET_KEY__";
|
||||
}
|
||||
}else{// Copy command
|
||||
String authMethod = ElementParameterParser.getValue(node,"__AUTH_METHOD__");
|
||||
if ("KEY".equals(authMethod)) {
|
||||
passwordFieldName = "__SECRET_KEY__";
|
||||
}
|
||||
}
|
||||
%>
|
||||
String dbschema_<%=cid%> = null;
|
||||
//external tableName
|
||||
String ext_tableName_<%=cid%> = null;
|
||||
|
||||
String tableName_<%=cid%> = null;
|
||||
String azureFolder_<%=cid%> = <%=azureFolder%>;
|
||||
|
||||
String clientId_<%=cid%> = <%=clientId%>;
|
||||
String oauthEndpoint_<%=cid%> = <%=oauthEndpoint%>;
|
||||
|
||||
<%
|
||||
String passwordFieldName = "";
|
||||
if ("ADLS".equals(storageType)) {
|
||||
passwordFieldName = "__PRINCIPAL_KEY__";
|
||||
}else{
|
||||
passwordFieldName = "__SECRET_KEY__";
|
||||
}
|
||||
if (ElementParameterParser.canEncrypt(node, passwordFieldName)) {
|
||||
%>
|
||||
final String azureAccessKey_<%=cid%> = routines.system.PasswordEncryptUtil.decryptPassword(<%=ElementParameterParser.getEncryptedValue(node, passwordFieldName)%>);
|
||||
<%
|
||||
} else {
|
||||
|
||||
%>
|
||||
final String azureAccessKey_<%=cid%> = <%= ElementParameterParser.getValue(node, passwordFieldName)%>;
|
||||
<%
|
||||
}
|
||||
|
||||
if ("ADLS".equals(storageType)) {
|
||||
%>
|
||||
azureCredIdentity_<%=cid%> = clientId_<%=cid%> + "@" + oauthEndpoint_<%=cid%>;
|
||||
azureCredName_<%=cid%> = "talend_ADLCredential_" + randomIdentifier_<%=cid%>;
|
||||
<%
|
||||
} else {
|
||||
%>
|
||||
azureCredIdentity_<%=cid%> = "talend";
|
||||
azureCredName_<%=cid%> = "talend_AzureStorageCredential_" + randomIdentifier_<%=cid%>;
|
||||
azureContainer_<%=cid%> = <%=container%>;
|
||||
<%
|
||||
}
|
||||
%>
|
||||
|
||||
String azureAccountName_<%=cid%> = <%=accountName%>;
|
||||
String azureExtDataSrc_<%=cid%> = "talend_DataSource_" + randomIdentifier_<%=cid%>;
|
||||
String randomIdentifier_<%=cid%> = java.util.UUID.randomUUID().toString().replaceAll("-","");
|
||||
String azureExtFileFormat_<%=cid%> = "talend_FileFormat_" + randomIdentifier_<%=cid%>;
|
||||
|
||||
String azureFileLoadType_<%=cid%> = "<%=loadFileFormat%>";
|
||||
|
||||
String dwDistributionOptions_<%=cid%> = "";
|
||||
String dwTableOptions_<%=cid%> = "";
|
||||
String dwPartition_<%=cid%> = "";
|
||||
|
||||
<%
|
||||
List<IMetadataColumn> columnList = getColumnList(node);
|
||||
List<Column> stmtStructure = null;
|
||||
Manager manager = null;
|
||||
|
||||
boolean isDynamic = false;
|
||||
List<IMetadataTable> metadatas = node.getMetadataList();
|
||||
if ((metadatas!=null)&&(metadatas.size()>0)) {
|
||||
IMetadataTable metadata = metadatas.get(0);
|
||||
|
||||
}
|
||||
|
||||
if(columnList != null && columnList.size() > 0) {
|
||||
stmtStructure = getManager(dbmsId, cid).createColumnList(columnList, false, null, null);
|
||||
}
|
||||
|
||||
// NOT AAD
|
||||
if(passwordFieldName != null){
|
||||
if (ElementParameterParser.canEncrypt(node, passwordFieldName)) {
|
||||
%>
|
||||
final String azureAccessKey_<%=cid%> = routines.system.PasswordEncryptUtil.decryptPassword(<%=ElementParameterParser.getEncryptedValue(node, passwordFieldName)%>);
|
||||
<%
|
||||
} else {
|
||||
%>
|
||||
|
||||
//BEGIN CONNECTION Code
|
||||
|
||||
java.sql.Connection conn_<%=cid%> = null;
|
||||
final String azureAccessKey_<%=cid%> = <%= ElementParameterParser.getValue(node, passwordFieldName)%>;
|
||||
<%
|
||||
boolean useExistingConnection = "true".equals(ElementParameterParser.getValue(node,"__USE_EXISTING_CONNECTION__"));
|
||||
%>
|
||||
String dbUser_<%=cid %> = null;
|
||||
<%
|
||||
if(useExistingConnection) {
|
||||
String connection = ElementParameterParser.getValue(node,"__CONNECTION__");
|
||||
String conn = "conn_" + connection;
|
||||
String schema = "dbschema_" + connection;
|
||||
%>
|
||||
dbschema_<%=cid%> = (String)globalMap.get("<%=schema%>");
|
||||
conn_<%=cid%> = (java.sql.Connection)globalMap.get("<%=conn%>");
|
||||
<%
|
||||
} else {
|
||||
%>
|
||||
dbschema_<%=cid%> = <%=dbschema%>;
|
||||
String driverClass_<%=cid%> = "com.microsoft.sqlserver.jdbc.SQLServerDriver";
|
||||
<%dbLog.conn().logJDBCDriver(dbLog.var("driverClass"));%>
|
||||
java.lang.Class.forName(driverClass_<%=cid%>);
|
||||
String port_<%=cid%> = <%=dbport%>;
|
||||
String dbname_<%=cid%> = <%=dbname%> ;
|
||||
String url_<%=cid %> = "jdbc:sqlserver://" + <%=dbhost%> ;
|
||||
if (!"".equals(port_<%=cid%>)) {
|
||||
url_<%=cid %> += ":" + <%=dbport%>;
|
||||
}
|
||||
if (!"".equals(dbname_<%=cid%>)) {
|
||||
url_<%=cid%> += ";database=" + <%=dbname%>;
|
||||
}
|
||||
url_<%=cid%> += ";applicationName=Talend;" + <%=dbproperties%>;
|
||||
dbUser_<%=cid %> = <%=dbuser%>;
|
||||
|
||||
<%
|
||||
passwordFieldName = "__PASS__";
|
||||
%>
|
||||
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
|
||||
String dbPwd_<%=cid %> = decryptedPassword_<%=cid%>;
|
||||
<%dbLog.conn().connTry(dbLog.var("url"), dbLog.var("dbUser"));%>
|
||||
conn_<%=cid%> = java.sql.DriverManager.getConnection(url_<%=cid %>,dbUser_<%=cid%>,dbPwd_<%=cid%>);
|
||||
<%dbLog.conn().connDone(dbLog.var("url"));%>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
|
||||
// END CONNECTION Code
|
||||
|
||||
<%
|
||||
if(!useExistingConnection) {
|
||||
%>
|
||||
resourceMap.put("conn_<%=cid%>", conn_<%=cid%>);
|
||||
conn_<%=cid%>.setAutoCommit(true);
|
||||
<%
|
||||
}
|
||||
dbLog.commit().logAutoCommit("conn_"+cid+".getAutoCommit()");
|
||||
%>
|
||||
if(dbschema_<%=cid%> == null || dbschema_<%=cid%>.trim().length() == 0) {
|
||||
ext_tableName_<%=cid%> = <%=table%> + "_" + randomIdentifier_<%=cid%>;
|
||||
} else {
|
||||
ext_tableName_<%=cid%> = dbschema_<%=cid%> + "].[" + <%=table%> + "_" + randomIdentifier_<%=cid%>;
|
||||
}
|
||||
|
||||
if(dbschema_<%=cid%> == null || dbschema_<%=cid%>.trim().length() == 0) {
|
||||
tableName_<%=cid%> = <%=table%>;
|
||||
} else {
|
||||
tableName_<%=cid%> = dbschema_<%=cid%> + "].[" + <%=table%>;
|
||||
}
|
||||
<%
|
||||
if(isEnabledExtTableOptions){
|
||||
%>
|
||||
String externalTableRejectOptions_<%=cid%> = "REJECT_TYPE = <%=rejectType%>" + ",REJECT_VALUE = " + <%=rejectValue%>;
|
||||
<%
|
||||
if("Percentage".equals(rejectType)){
|
||||
%>
|
||||
externalTableRejectOptions_<%=cid%> += ",REJECT_SAMPLE_VALUE = " + <%=rejectSampleValue%>;
|
||||
<%
|
||||
}
|
||||
}
|
||||
|
||||
if(("DROP_CREATE").equals(tableAction) || ("CREATE").equals(tableAction) || ("CREATE_IF_NOT_EXISTS").equals(tableAction) || ("DROP_IF_EXISTS_AND_CREATE").equals(tableAction)) {
|
||||
|
||||
// DW Table Options
|
||||
@@ -335,7 +153,177 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
<%
|
||||
}
|
||||
// DW Table Partition END
|
||||
}
|
||||
%>
|
||||
String azureAccountName_<%=cid%> = <%=accountName%>;
|
||||
<%
|
||||
List<IMetadataColumn> columnList = getColumnList(node);
|
||||
List<Column> stmtStructure = null;
|
||||
Manager manager = null;
|
||||
boolean isDynamic = false;
|
||||
List<IMetadataTable> metadatas = node.getMetadataList();
|
||||
if ((metadatas!=null)&&(metadatas.size()>0)) {
|
||||
IMetadataTable metadata = metadatas.get(0);
|
||||
|
||||
}
|
||||
if(columnList != null && columnList.size() > 0) {
|
||||
stmtStructure = getManager(dbmsId, cid).createColumnList(columnList, false, null, null);
|
||||
}
|
||||
|
||||
%>
|
||||
|
||||
//BEGIN CONNECTION Code
|
||||
java.sql.Connection conn_<%=cid%> = null;
|
||||
<%
|
||||
boolean useExistingConnection = "true".equals(ElementParameterParser.getValue(node,"__USE_EXISTING_CONNECTION__"));
|
||||
%>
|
||||
String dbUser_<%=cid %> = null;
|
||||
<%
|
||||
if(useExistingConnection) {
|
||||
String connection = ElementParameterParser.getValue(node,"__CONNECTION__");
|
||||
String conn = "conn_" + connection;
|
||||
String schema = "dbschema_" + connection;
|
||||
%>
|
||||
dbschema_<%=cid%> = (String)globalMap.get("<%=schema%>");
|
||||
conn_<%=cid%> = (java.sql.Connection)globalMap.get("<%=conn%>");
|
||||
<%
|
||||
} else {
|
||||
%>
|
||||
dbschema_<%=cid%> = <%=dbschema%>;
|
||||
String driverClass_<%=cid%> = "com.microsoft.sqlserver.jdbc.SQLServerDriver";
|
||||
<%dbLog.conn().logJDBCDriver(dbLog.var("driverClass"));%>
|
||||
java.lang.Class.forName(driverClass_<%=cid%>);
|
||||
String port_<%=cid%> = <%=dbport%>;
|
||||
String dbname_<%=cid%> = <%=dbname%> ;
|
||||
String url_<%=cid %> = "jdbc:sqlserver://" + <%=dbhost%> ;
|
||||
if (!"".equals(port_<%=cid%>)) {
|
||||
url_<%=cid %> += ":" + <%=dbport%>;
|
||||
}
|
||||
if (!"".equals(dbname_<%=cid%>)) {
|
||||
url_<%=cid%> += ";database=" + <%=dbname%>;
|
||||
}
|
||||
|
||||
<%
|
||||
if (useActiveDirectoryAuth) {
|
||||
%>
|
||||
url_<%=cid%> += ";encrypt=true;trustServerCertificate=false;hostNameInCertificate=*.database.windows.net;Authentication=ActiveDirectoryPassword";
|
||||
<%
|
||||
}
|
||||
%>
|
||||
url_<%=cid%> += ";applicationName=Talend;" + <%=dbproperties%>;
|
||||
dbUser_<%=cid %> = <%=dbuser%>;
|
||||
|
||||
<%
|
||||
passwordFieldName = "__PASS__";
|
||||
%>
|
||||
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
|
||||
String dbPwd_<%=cid %> = decryptedPassword_<%=cid%>;
|
||||
<%dbLog.conn().connTry(dbLog.var("url"), dbLog.var("dbUser"));%>
|
||||
conn_<%=cid%> = java.sql.DriverManager.getConnection(url_<%=cid %>,dbUser_<%=cid%>,dbPwd_<%=cid%>);
|
||||
<%dbLog.conn().connDone(dbLog.var("url"));%>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
|
||||
// END CONNECTION Code
|
||||
|
||||
<%
|
||||
if(!useExistingConnection) {
|
||||
%>
|
||||
resourceMap.put("conn_<%=cid%>", conn_<%=cid%>);
|
||||
conn_<%=cid%>.setAutoCommit(true);
|
||||
<%
|
||||
}
|
||||
dbLog.commit().logAutoCommit("conn_"+cid+".getAutoCommit()");
|
||||
%>
|
||||
if(dbschema_<%=cid%> == null || dbschema_<%=cid%>.trim().length() == 0) {
|
||||
tableName_<%=cid%> = <%=table%>;
|
||||
} else {
|
||||
tableName_<%=cid%> = dbschema_<%=cid%> + "].[" + <%=table%>;
|
||||
}
|
||||
<%
|
||||
// PolyBase
|
||||
if(isPolyBase){
|
||||
// External Table Reject Options
|
||||
boolean isEnabledExtTableOptions = "true".equals(ElementParameterParser.getValue(node, "__EXT_TABLE_OPTIONS__"));
|
||||
String rejectType = ElementParameterParser.getValue(node,"__REJECT_TYPE__");
|
||||
String rejectValue = ElementParameterParser.getValue(node,"__REJECT_VALUE__");
|
||||
String rejectSampleValue = ElementParameterParser.getValue(node,"__REJECT_SAMPLE_VALUE__");
|
||||
|
||||
// External Table Reject Options END
|
||||
boolean dateFormat = "true".equals(ElementParameterParser.getValue(node,"__DATE_FORMAT__"));
|
||||
String fieldSeparator = ElementParameterParser.getValueWithUIFieldKey(node,"__FIELDSEPARATOR__","FIELDSEPARATOR");
|
||||
String loadFileFormat = ElementParameterParser.getValue(node,"__IMPORT_TYPE__");
|
||||
String datePattern = ElementParameterParser.getValue(node,"__DATE_PATTERN__");
|
||||
boolean useStringDelimiter = "true".equals(ElementParameterParser.getValue(node,"__USE_STRING_DELIMITER__"));
|
||||
String stringDelimiter = ElementParameterParser.getValueWithUIFieldKey(node,"__STRINGDELIMITER__","STRINGDELIMITER");
|
||||
boolean isTypeDefault = "true".equals(ElementParameterParser.getValue(node,"__USE_TYPE_DEFAULT__"));
|
||||
String serdeMethod = ElementParameterParser.getValue(node,"__SERDE_METHOD__");
|
||||
|
||||
String compressionType = null;
|
||||
if (isCompress) {
|
||||
if ("DELIMITED_TEXT".equals(loadFileFormat)) {
|
||||
compressionType = ElementParameterParser.getValue(node,"__COMPRESSION_TEXT__");
|
||||
} else if ("HIVE_RCFILE".equals(loadFileFormat)) {
|
||||
compressionType = ElementParameterParser.getValue(node,"__COMPRESSION_RC__");
|
||||
} else if ("HIVE_ORC".equals(loadFileFormat)) {
|
||||
compressionType = ElementParameterParser.getValue(node,"__COMPRESSION_ORC__");
|
||||
} else if ("PARQUET".equals(loadFileFormat)) {
|
||||
compressionType = ElementParameterParser.getValue(node,"__COMPRESSION_PARQUET__");
|
||||
}
|
||||
}
|
||||
String fileFormatType= null;
|
||||
if ("DELIMITED_TEXT".equals(loadFileFormat)) {
|
||||
fileFormatType = "DelimitedText";
|
||||
} else if ("HIVE_RCFILE".equals(loadFileFormat)) {
|
||||
fileFormatType = "RCFILE";
|
||||
} else if ("HIVE_ORC".equals(loadFileFormat)) {
|
||||
fileFormatType = "ORC";
|
||||
} else if ("PARQUET".equals(loadFileFormat)) {
|
||||
fileFormatType = "PARQUET";
|
||||
}
|
||||
String clientId = ElementParameterParser.getValue(node, "__CLIENT_ID__");
|
||||
String oauthEndpoint = ElementParameterParser.getValue(node, "__ENDPOINT__");
|
||||
%>
|
||||
final String OUT_DELIM_<%=cid %> = <%=fieldSeparator %>;
|
||||
String ext_tableName_<%=cid%> = null;
|
||||
String azureExtDataSrc_<%=cid%> = "talend_DataSource_" + randomIdentifier_<%=cid%>;
|
||||
String azureFileLoadType_<%=cid%> = "<%=loadFileFormat%>";
|
||||
|
||||
<%
|
||||
if ("ADLS".equals(storageType)) {
|
||||
%>
|
||||
String clientId_<%=cid%> = <%=clientId%>;
|
||||
String oauthEndpoint_<%=cid%> = <%=oauthEndpoint%>;
|
||||
String azureCredIdentity_<%=cid%> = clientId_<%=cid%> + "@" + oauthEndpoint_<%=cid%>;
|
||||
String azureCredName_<%=cid%> = "talend_ADLCredential_" + randomIdentifier_<%=cid%>;
|
||||
<%
|
||||
} else {//ADLS Gen2 & Blob Storage
|
||||
%>
|
||||
String azureCredIdentity_<%=cid%> = "talend";
|
||||
String azureCredName_<%=cid%> = "talend_AzureStorageCredential_" + randomIdentifier_<%=cid%>;
|
||||
String azureContainer_<%=cid%> = <%=container%>;
|
||||
<%
|
||||
}
|
||||
%>
|
||||
if(dbschema_<%=cid%> == null || dbschema_<%=cid%>.trim().length() == 0) {
|
||||
ext_tableName_<%=cid%> = <%=table%> + "_" + randomIdentifier_<%=cid%>;
|
||||
} else {
|
||||
ext_tableName_<%=cid%> = dbschema_<%=cid%> + "].[" + <%=table%> + "_" + randomIdentifier_<%=cid%>;
|
||||
}
|
||||
|
||||
<%
|
||||
if(isEnabledExtTableOptions){
|
||||
%>
|
||||
String externalTableRejectOptions_<%=cid%> = "REJECT_TYPE = <%=rejectType%>" + ",REJECT_VALUE = " + <%=rejectValue%>;
|
||||
<%
|
||||
if("Percentage".equals(rejectType)){
|
||||
%>
|
||||
externalTableRejectOptions_<%=cid%> += ",REJECT_SAMPLE_VALUE = " + <%=rejectSampleValue%>;
|
||||
<%
|
||||
}
|
||||
}
|
||||
|
||||
if(columnList != null && columnList.size()>0) {
|
||||
@@ -373,6 +361,11 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
if ("ADLS".equals(storageType)) {
|
||||
%>
|
||||
stmtCreateExtDataSource_<%=cid%>.execute("CREATE EXTERNAL DATA SOURCE " + azureExtDataSrc_<%=cid%> + " WITH (TYPE=HADOOP, LOCATION = 'adl://" + azureAccountName_<%=cid%> + ".azuredatalakestore.net', CREDENTIAL = " + azureCredName_<%=cid%> + ")");
|
||||
<%
|
||||
}else if ("ADLS_GEN2".equals(storageType)) {
|
||||
boolean enableSSL = "true".equals(ElementParameterParser.getValue(node,"__ENABLE_SSL__"));
|
||||
%>
|
||||
stmtCreateExtDataSource_<%=cid%>.execute("CREATE EXTERNAL DATA SOURCE " + azureExtDataSrc_<%=cid%> + " WITH (TYPE=HADOOP, LOCATION = 'abfs<%=(enableSSL?"s":"")%>://" + azureContainer_<%=cid%> + "@" + azureAccountName_<%=cid%> + ".dfs.core.windows.net', CREDENTIAL = " + azureCredName_<%=cid%> + ")");
|
||||
<%
|
||||
} else {
|
||||
%>
|
||||
@@ -786,6 +779,423 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
<%
|
||||
}
|
||||
}
|
||||
}else{
|
||||
String authMethod = ElementParameterParser.getValue(node,"__AUTH_METHOD__");
|
||||
String sasToken = ElementParameterParser.getValue(node,"__SAS_TOKEN__");
|
||||
String endpointSuffix = ElementParameterParser.getValue(node,"__ENDPOINT_SUFFIX__");
|
||||
List<Map<String,String>> externalPaths = (List<Map<String,String>>)ElementParameterParser.getObjectValue(node, "__EXTERNAL_LOCATIONS__");
|
||||
boolean specifyFieldsMapping = "true".equals(ElementParameterParser.getValue(node, "__SPECIFY_FIELDS_MAPPING__"));
|
||||
List<Map<String,String>> fieldsMapping = (List<Map<String,String>>)ElementParameterParser.getObjectValue(node, "__COLUMN_MAP_FIELD__");
|
||||
String fileType = ElementParameterParser.getValue(node,"__FILE_TYPE__");
|
||||
String firstRow = ElementParameterParser.getValue(node,"__FIRST_ROW__");
|
||||
if(firstRow==null || firstRow.isEmpty()){
|
||||
firstRow = "1";
|
||||
}
|
||||
// csv format
|
||||
String fieldQuote = ElementParameterParser.getValue(node,"__FIELD_QUOTE__");
|
||||
if(fieldQuote==null || fieldQuote.isEmpty()){
|
||||
fieldQuote = "\"\"";
|
||||
}
|
||||
String fieldTerminator = ElementParameterParser.getValue(node,"__FIELD_TERMINATOR__");
|
||||
if(fieldTerminator==null || fieldTerminator.isEmpty()){
|
||||
fieldTerminator = "\"\"";
|
||||
}
|
||||
String rowTerminator = ElementParameterParser.getValue(node,"__ROW_TERMINATOR__");
|
||||
if(rowTerminator==null || rowTerminator.isEmpty()){
|
||||
rowTerminator = "\"\"";
|
||||
}
|
||||
String copyCsvDateFormat = ElementParameterParser.getValue(node,"__COPY_CSV_DATE_FORMAT__");
|
||||
String encoding = ElementParameterParser.getValue(node,"__ENCODING__");
|
||||
// csv end
|
||||
boolean identityInsert = "true".equals(ElementParameterParser.getValue(node,"__IDENTITY_INSERTE__"));
|
||||
String maxErrors = ElementParameterParser.getValue(node,"__MAX_ERRORS__");
|
||||
if(maxErrors==null || maxErrors.isEmpty()){
|
||||
maxErrors = "0";
|
||||
}
|
||||
String errorFile = ElementParameterParser.getValue(node,"__ERROR_FILE__");
|
||||
if(errorFile==null || errorFile.isEmpty()){
|
||||
errorFile = "\"\"";
|
||||
}
|
||||
String compressionType = null;
|
||||
if (isCompress) {
|
||||
if ("CSV".equals(fileType)) { //TODO recheck
|
||||
//compressionType = ElementParameterParser.getValue(node,"__COMPRESSION_TEXT__");
|
||||
compressionType = "GZIP";
|
||||
} else if ("ORC".equals(fileType)) {
|
||||
compressionType = ElementParameterParser.getValue(node,"__COMPRESSION_ORC__");
|
||||
} else if ("PARQUET".equals(fileType)) {
|
||||
compressionType = ElementParameterParser.getValue(node,"__COMPRESSION_PARQUET__");
|
||||
}
|
||||
}
|
||||
if("SAS".equals(authMethod)){
|
||||
%>
|
||||
String azureCredIdentity_<%=cid%> = "Shared Access Signature";
|
||||
<%
|
||||
}else if("KEY".equals(authMethod)){
|
||||
%>
|
||||
String azureCredIdentity_<%=cid%> = "Storage Account Key";
|
||||
<%
|
||||
}else if("AAD".equals(authMethod)){
|
||||
%>
|
||||
// CREDENTIAL is not required for AAD
|
||||
<%
|
||||
}
|
||||
if ("CSV".equals(fileType)) {
|
||||
%>
|
||||
|
||||
String fieldQuote_<%=cid%> = <%=fieldQuote%>;
|
||||
String fieldTerminator_<%=cid%> = <%=fieldTerminator%>;
|
||||
String rowTerminator_<%=cid%> = <%=rowTerminator%>;
|
||||
String errorFile_<%=cid%> = <%=errorFile%>;
|
||||
<%
|
||||
}
|
||||
%>
|
||||
Integer firstRow_<%=cid%> = <%=firstRow%>;
|
||||
Integer maxErrors_<%=cid%> = <%=maxErrors%>;
|
||||
|
||||
<%
|
||||
manager = getManager(dbmsId, cid);
|
||||
String ending="";
|
||||
if(!"CSV".equals(fileType)){
|
||||
// stores the file type and compression method for the external data
|
||||
%>
|
||||
boolean extFileFormatCreated_<%=cid%> = false;
|
||||
StringBuilder cmdExtFileFormat_<%=cid%> = new StringBuilder();
|
||||
java.sql.Statement stmtCreateExtFileFormat_<%=cid%> = conn_<%=cid%>.createStatement();
|
||||
cmdExtFileFormat_<%=cid%>.append("CREATE EXTERNAL FILE FORMAT ").append(azureExtFileFormat_<%=cid%>).append(" WITH (FORMAT_TYPE = <%=fileType%>");
|
||||
<%
|
||||
if (isCompress && compressionType != null){
|
||||
%>
|
||||
cmdExtFileFormat_<%=cid%>.append(", DATA_COMPRESSION = '<%=compressionType%>'");
|
||||
<%
|
||||
}
|
||||
%>
|
||||
cmdExtFileFormat_<%=cid%>.append(")");
|
||||
stmtCreateExtFileFormat_<%=cid%>.execute(cmdExtFileFormat_<%=cid%>.toString());
|
||||
stmtCreateExtFileFormat_<%=cid%>.close();
|
||||
extFileFormatCreated_<%=cid%> = true;
|
||||
<%
|
||||
if(isLog4jEnabled) {
|
||||
%>
|
||||
log.info("<%=cid%> - Created External File Format: " + azureExtFileFormat_<%=cid%> + " successfully.");
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
// CREATE DW TABLE AND / OR INSERT INTO DW TABLE
|
||||
try{
|
||||
<%
|
||||
if(!("NONE").equals(tableAction)) {
|
||||
if(("DROP_CREATE").equals(tableAction) || ("CREATE").equals(tableAction) || ("CREATE_IF_NOT_EXISTS").equals(tableAction) || ("DROP_IF_EXISTS_AND_CREATE").equals(tableAction)) {
|
||||
if(columnList == null || columnList.size()<= 0) {
|
||||
%>
|
||||
if(true){
|
||||
throw new RuntimeException("Can't create table with empty schema!");
|
||||
}
|
||||
<%
|
||||
}
|
||||
}
|
||||
if(("DROP_CREATE").equals(tableAction)) {
|
||||
%>
|
||||
java.sql.Statement stmtDrop_<%=cid%> = conn_<%=cid%>.createStatement();
|
||||
<%dbLog.table().dropTry(dbLog.var("tableName"));%>
|
||||
stmtDrop_<%=cid%>.execute("DROP TABLE [" + tableName_<%=cid%> + "]");
|
||||
<%dbLog.table().dropDone(dbLog.var("tableName"));%>
|
||||
stmtDrop_<%=cid%>.close();
|
||||
<%
|
||||
if(columnList != null && columnList.size()>0) {
|
||||
%>
|
||||
java.sql.Statement stmtCreate_<%=cid%> = conn_<%=cid%>.createStatement();
|
||||
<%dbLog.table().createTry(dbLog.var("tableName"));%>
|
||||
stmtCreate_<%=cid%>.execute("<%=manager.getCreateTableSQL(stmtStructure)%>) WITH (" + dwTableOptions_<%=cid%> + dwDistributionOptions_<%=cid%> + dwPartition_<%=cid%> + ")");
|
||||
<%dbLog.table().createDone(dbLog.var("tableName"));%>
|
||||
stmtCreate_<%=cid%>.close();
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<%
|
||||
|
||||
} else if(("CREATE").equals(tableAction)) {
|
||||
if(columnList != null && columnList.size()>0) {
|
||||
%>
|
||||
java.sql.Statement stmtCreate_<%=cid%> = conn_<%=cid%>.createStatement();
|
||||
<%dbLog.table().createTry(dbLog.var("tableName"));%>
|
||||
stmtCreate_<%=cid%>.execute("<%=manager.getCreateTableSQL(stmtStructure)%>) WITH (" + dwTableOptions_<%=cid%> + dwDistributionOptions_<%=cid%> + dwPartition_<%=cid%> + ")");
|
||||
<%dbLog.table().createDone(dbLog.var("tableName"));%>
|
||||
stmtCreate_<%=cid%>.close();
|
||||
<%
|
||||
}
|
||||
} else if(("CREATE_IF_NOT_EXISTS").equals(tableAction) || ("DROP_IF_EXISTS_AND_CREATE").equals(tableAction)) {
|
||||
boolean tableNameCaseSensitive=false;
|
||||
%>
|
||||
//check if table exists
|
||||
java.sql.Statement isExistStmt_<%=cid%> = conn_<%=cid%>.createStatement();
|
||||
boolean whetherExist_<%=cid%> = false;
|
||||
try {
|
||||
isExistStmt_<%=cid%>.execute("SELECT TOP 1 1 FROM [" + tableName_<%=cid%> + "]" );
|
||||
whetherExist_<%=cid%> = true;
|
||||
} catch (java.lang.Exception e){
|
||||
whetherExist_<%=cid%> = false;
|
||||
}
|
||||
isExistStmt_<%=cid%>.close();
|
||||
<%
|
||||
if(("CREATE_IF_NOT_EXISTS").equals(tableAction)) {
|
||||
if(columnList != null && columnList.size()>0) {
|
||||
%>
|
||||
if(!whetherExist_<%=cid%>) {
|
||||
java.sql.Statement stmtCreate_<%=cid%> = conn_<%=cid%>.createStatement();
|
||||
<%dbLog.table().createTry(dbLog.var("tableName"));%>
|
||||
stmtCreate_<%=cid%>.execute("<%=manager.getCreateTableSQL(stmtStructure)%>) WITH (" + dwTableOptions_<%=cid%> + dwDistributionOptions_<%=cid%> + dwPartition_<%=cid%> + ")");
|
||||
<%dbLog.table().createDone(dbLog.var("tableName"));%>
|
||||
stmtCreate_<%=cid%>.close();
|
||||
}
|
||||
<%
|
||||
}
|
||||
} else {
|
||||
%>
|
||||
if(whetherExist_<%=cid%>) {
|
||||
java.sql.Statement stmtDrop_<%=cid%> = conn_<%=cid%>.createStatement();
|
||||
<%dbLog.table().dropTry(dbLog.var("tableName"));%>
|
||||
stmtDrop_<%=cid%>.execute("DROP TABLE [" + tableName_<%=cid%> + "]");
|
||||
<%dbLog.table().dropDone(dbLog.var("tableName"));%>
|
||||
stmtDrop_<%=cid%>.close();
|
||||
}
|
||||
<%
|
||||
if(columnList != null && columnList.size()>0) {
|
||||
%>
|
||||
java.sql.Statement stmtCreate_<%=cid%> = conn_<%=cid%>.createStatement();
|
||||
<%dbLog.table().createTry(dbLog.var("tableName"));%>
|
||||
stmtCreate_<%=cid%>.execute("<%=manager.getCreateTableSQL(stmtStructure)%>) WITH (" + dwTableOptions_<%=cid%> + dwDistributionOptions_<%=cid%> + dwPartition_<%=cid%> + ")");
|
||||
<%dbLog.table().createDone(dbLog.var("tableName"));%>
|
||||
stmtCreate_<%=cid%>.close();
|
||||
<%
|
||||
}
|
||||
}
|
||||
} else if(("CLEAR").equals(tableAction)) {
|
||||
%>
|
||||
java.sql.Statement stmtClear_<%=cid%> = conn_<%=cid%>.createStatement();
|
||||
<%dbLog.table().clearTry(dbLog.var("tableName"));%>
|
||||
stmtClear_<%=cid%>.executeUpdate("<%=manager.getDeleteTableSQL()%>");
|
||||
<%dbLog.table().clearDone(dbLog.var("tableName"));%>
|
||||
stmtClear_<%=cid%>.close();
|
||||
<%
|
||||
} else if(("TRUNCATE").equals(tableAction)) {
|
||||
%>
|
||||
java.sql.Statement stmtTruncCount_<%=cid%> = conn_<%=cid%>.createStatement();
|
||||
java.sql.ResultSet rsTruncCount_<%=cid%> = stmtTruncCount_<%=cid%>.executeQuery("<%=manager.getSelectionSQL()%>");
|
||||
int rsTruncCountNumber_<%=cid%> = 0;
|
||||
if(rsTruncCount_<%=cid%>.next()) {
|
||||
rsTruncCountNumber_<%=cid%> = rsTruncCount_<%=cid%>.getInt(1);
|
||||
}
|
||||
rsTruncCount_<%=cid%>.close();
|
||||
stmtTruncCount_<%=cid%>.close();
|
||||
java.sql.Statement stmtTrunc_<%=cid%> = conn_<%=cid%>.createStatement();
|
||||
<%dbLog.table().truncateTry(dbLog.var("tableName"));%>
|
||||
stmtTrunc_<%=cid%>.executeUpdate("<%=manager.getTruncateTableSQL()%>");
|
||||
<%dbLog.table().truncateDone(dbLog.var("tableName"));%>
|
||||
<%
|
||||
if(isLog4jEnabled) {
|
||||
%>
|
||||
log.info("<%=cid%> - Number of Rows Truncated : " + rsTruncCountNumber_<%=cid%> + ".");
|
||||
<%
|
||||
}
|
||||
%>
|
||||
stmtTrunc_<%=cid%>.close();
|
||||
<%
|
||||
|
||||
}
|
||||
}
|
||||
%>
|
||||
StringBuilder copySQL_<%=cid%> = new StringBuilder();
|
||||
copySQL_<%=cid%>.append("COPY INTO [" + tableName_<%=cid%> + "] ");
|
||||
<%
|
||||
if(specifyFieldsMapping){
|
||||
if(columnList != null && columnList.size()>0) {
|
||||
%>
|
||||
copySQL_<%=cid%>.append("(");
|
||||
<%
|
||||
for(int columnIndex = 0;columnIndex<columnList.size();columnIndex++){
|
||||
IMetadataColumn column = columnList.get(columnIndex);
|
||||
String fieldIndex = fieldsMapping.get(columnIndex).get("FIELD_INDEX");
|
||||
if(columnIndex != 0){
|
||||
%>
|
||||
copySQL_<%=cid%>.append(",");
|
||||
<%
|
||||
}
|
||||
%>
|
||||
copySQL_<%=cid%>.append("<%=column.getOriginalDbColumnName() %>");
|
||||
// TODO support default value
|
||||
<%
|
||||
if(fieldIndex != null && !fieldIndex.isEmpty()){
|
||||
%>
|
||||
copySQL_<%=cid%>.append(" "+<%=fieldIndex%>);
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
copySQL_<%=cid%>.append(")");
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
copySQL_<%=cid%>.append("");
|
||||
//external localtion
|
||||
copySQL_<%=cid%>.append("FROM ");
|
||||
<%
|
||||
int pathSize=externalPaths.size();
|
||||
if(pathSize > 0){
|
||||
for(int pathIndex = 0;pathIndex<pathSize;pathIndex++){
|
||||
Map<String, String> externalPathMap = externalPaths.get(pathIndex);
|
||||
String externalPath = externalPathMap.get("EXTERNAL_LOCATION");
|
||||
if(pathIndex != 0){
|
||||
%>
|
||||
copySQL_<%=cid%>.append(",");
|
||||
<%
|
||||
}
|
||||
%>
|
||||
copySQL_<%=cid%>.append("'https://"+<%=accountName %>+"."+<%=endpointSuffix %>+"/"+<%=container %>+"/"+<%=externalPath%>+"'");
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
copySQL_<%=cid%>.append(" WITH ( ");
|
||||
<%
|
||||
if("CSV".equals(fileType)){
|
||||
%>
|
||||
copySQL_<%=cid%>.append("FILE_TYPE = 'CSV' ");
|
||||
<%
|
||||
}else{
|
||||
%>
|
||||
copySQL_<%=cid%>.append("FILE_FORMAT = "+azureExtFileFormat_<%=cid%>+" ");
|
||||
<%
|
||||
}
|
||||
if("KEY".equals(authMethod)){
|
||||
%>
|
||||
copySQL_<%=cid%>.append(",CREDENTIAL=(IDENTITY= '"+azureCredIdentity_<%=cid%>+"', SECRET='"+azureAccessKey_<%=cid%>+"')");
|
||||
<%
|
||||
}
|
||||
if("SAS".equals(authMethod)){
|
||||
%>
|
||||
copySQL_<%=cid%>.append(",CREDENTIAL=(IDENTITY= '"+azureCredIdentity_<%=cid%>+"', SECRET='"+<%=sasToken%>+"')");
|
||||
<%
|
||||
}
|
||||
if("CSV".equals(fileType)){
|
||||
%>
|
||||
if(fieldQuote_<%=cid%>!=null && !fieldQuote_<%=cid%>.isEmpty()){
|
||||
copySQL_<%=cid%>.append(",FIELDQUOTE = '"+ fieldQuote_<%=cid%> +"' ");
|
||||
}
|
||||
if(fieldTerminator_<%=cid%>!=null && !fieldTerminator_<%=cid%>.isEmpty()){
|
||||
copySQL_<%=cid%>.append(",FIELDTERMINATOR = '"+ fieldTerminator_<%=cid%> +"' ");
|
||||
}
|
||||
if(rowTerminator_<%=cid%>!=null && !rowTerminator_<%=cid%>.isEmpty()){
|
||||
copySQL_<%=cid%>.append(",ROWTERMINATOR = '"+ rowTerminator_<%=cid%> +"' ");
|
||||
}
|
||||
if(firstRow_<%=cid%>!=null && firstRow_<%=cid%> > 1){
|
||||
copySQL_<%=cid%>.append(",FIRSTROW = '"+ firstRow_<%=cid%> +"' ");
|
||||
}
|
||||
<%
|
||||
if(!"SESSION_DATEFORMAT".equals(copyCsvDateFormat)){
|
||||
%>
|
||||
copySQL_<%=cid%>.append(",DATEFORMAT = '"+ <%=copyCsvDateFormat%> +"' ");
|
||||
<%
|
||||
}
|
||||
%>
|
||||
|
||||
copySQL_<%=cid%>.append(",ENCODING = '"+ <%=encoding%> +"' ");
|
||||
<%
|
||||
if(!"KEY".equals(authMethod)){
|
||||
%>
|
||||
if(errorFile_<%=cid%>!=null && !errorFile_<%=cid%>.isEmpty()){
|
||||
copySQL_<%=cid%>.append(",ERRORFILE = '"+ errorFile_<%=cid%> +"' ");
|
||||
}
|
||||
<%
|
||||
}
|
||||
if(isCompress){
|
||||
%>
|
||||
copySQL_<%=cid%>.append(",COMPRESSION = '<%=compressionType%>' ");
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
if(maxErrors_<%=cid%>!=null && maxErrors_<%=cid%> > 0){
|
||||
copySQL_<%=cid%>.append(",MAXERRORS = '"+ maxErrors_<%=cid%> +"' ");
|
||||
}
|
||||
copySQL_<%=cid%>.append(",IDENTITY_INSERT = '<%=identityInsert?"ON":"OFF" %>'");
|
||||
String label_<%=cid%> = "COPY: ["+tableName_<%=cid%>+"] UniqueID: "+randomIdentifier_<%=cid%>;
|
||||
copySQL_<%=cid%>.append(") OPTION (LABEL = '"+label_<%=cid%>+"')");
|
||||
|
||||
java.sql.Statement stmt_Copy<%=cid%> = conn_<%=cid%>.createStatement();
|
||||
<%
|
||||
|
||||
if(isLog4jEnabled) {
|
||||
%>
|
||||
log.info("<%=cid%> - Starting COPY into table : [" + tableName_<%=cid%> + "].");
|
||||
<%
|
||||
}
|
||||
%>
|
||||
stmt_Copy<%=cid%>.executeUpdate(copySQL_<%=cid%>.toString());
|
||||
stmt_Copy<%=cid%>.close();
|
||||
|
||||
java.sql.Statement monitor_<%=cid%> = conn_<%=cid%>.createStatement();
|
||||
String monitorSql_<%=cid %>="SELECT r.command,sum(bytes_processed) AS bytes_processed,sum(rows_processed) AS rows_processed from sys.dm_pdw_exec_requests r JOIN sys.dm_pdw_dms_workers w ON r.[request_id] = w.request_id WHERE [label] = '"+label_<%=cid%>+"' and session_id = session_id() and type = 'WRITER' GROUP BY r.command ";
|
||||
java.sql.ResultSet result_<%=cid %> = monitor_<%=cid%>.executeQuery(monitorSql_<%=cid %>);
|
||||
int insertedCount_<%=cid%> = 0;
|
||||
if(result_<%=cid %>!=null){
|
||||
while(result_<%=cid %>.next()){
|
||||
insertedCount_<%=cid%> = result_<%=cid %>.getInt(3);
|
||||
<%
|
||||
if(isLog4jEnabled) {
|
||||
%>
|
||||
log.info("<%=cid%> - Copy command : " + result_<%=cid %>.getString(1) );
|
||||
log.info("<%=cid%> - Bytes processed : " + result_<%=cid %>.getLong(2) );
|
||||
log.info("<%=cid%> - Row processed : " + insertedCount_<%=cid%> );
|
||||
<%
|
||||
}
|
||||
%>
|
||||
}
|
||||
}
|
||||
monitor_<%=cid%>.close();
|
||||
globalMap.put("<%=cid%>_NB_LINE_INSERTED",insertedCount_<%=cid%>);
|
||||
|
||||
<%
|
||||
if(isLog4jEnabled) {
|
||||
%>
|
||||
log.info("<%=cid%> - Copy into table : [" + tableName_<%=cid%> + "] completed successfully.");
|
||||
<%
|
||||
}
|
||||
%>
|
||||
} catch (java.sql.SQLException e_<%=cid%>) {
|
||||
<%
|
||||
if(isLog4jEnabled) {
|
||||
%>
|
||||
log.error("<%=cid%> - " + e_<%=cid%>.getMessage());
|
||||
<%
|
||||
}
|
||||
%>
|
||||
throw e_<%=cid%>;
|
||||
}finally{
|
||||
<%
|
||||
if(!"CSV".equals(fileType)){
|
||||
%>
|
||||
if(extFileFormatCreated_<%=cid%>){
|
||||
java.sql.Statement stmtDropExtFileFormat_<%=cid%> = conn_<%=cid%>.createStatement();
|
||||
stmtDropExtFileFormat_<%=cid%>.execute("DROP EXTERNAL FILE FORMAT [" + azureExtFileFormat_<%=cid%> + "]");
|
||||
stmtDropExtFileFormat_<%=cid%>.close();
|
||||
<%
|
||||
if(isLog4jEnabled) {
|
||||
%>
|
||||
log.info("<%=cid%> - Dropped External File Format : [" + azureExtFileFormat_<%=cid%> + "] successfully.");
|
||||
<%
|
||||
}
|
||||
%>
|
||||
}
|
||||
<%
|
||||
}
|
||||
%>
|
||||
}
|
||||
|
||||
<%
|
||||
}
|
||||
|
||||
if(!useExistingConnection) {
|
||||
%>
|
||||
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
@@ -6,8 +6,8 @@
|
||||
</HEADER>
|
||||
|
||||
<FAMILIES>
|
||||
<FAMILY>Databases/DB Specifics/Azure/SQL Data Warehouse</FAMILY>
|
||||
<FAMILY>Cloud/Azure/SQL Data Warehouse</FAMILY>
|
||||
<FAMILY>Databases/DB Specifics/Azure/Synapse Analytics</FAMILY>
|
||||
<FAMILY>Cloud/Azure/Synapse Analytics</FAMILY>
|
||||
</FAMILIES>
|
||||
|
||||
<DOCUMENTATION>
|
||||
@@ -32,7 +32,7 @@
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="CONNECTION" FIELD="COMPONENT_LIST" REQUIRED="true" FILTER="tSQLDWHConnection" NUM_ROW="2" SHOW_IF="USE_EXISTING_CONNECTION == 'true'" DYNAMIC_SETTINGS="true" GROUP="DB_CONFIG" />
|
||||
<PARAMETER NAME="CONNECTION" FIELD="COMPONENT_LIST" REQUIRED="true" FILTER="tAzureSynapseConnection" NUM_ROW="2" SHOW_IF="USE_EXISTING_CONNECTION == 'true'" DYNAMIC_SETTINGS="true" GROUP="DB_CONFIG" />
|
||||
|
||||
<PARAMETER NAME="DRIVER" FIELD="CLOSED_LIST" NUM_ROW="25" REPOSITORY_VALUE="DRIVER" SHOW_IF="USE_EXISTING_CONNECTION == 'false'" GROUP="DB_CONFIG">
|
||||
<ITEMS DEFAULT="MSSQL_PROP">
|
||||
@@ -92,42 +92,72 @@
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="LOAD_METHOD" FIELD="CLOSED_LIST" REQUIRED="true" NUM_ROW="90">
|
||||
<ITEMS DEFAULT="COPY">
|
||||
<ITEM NAME="POLYBASE" VALUE="POLYBASE" />
|
||||
<ITEM NAME="COPY" VALUE="COPY"/>
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="AZURE_STORAGE" FIELD="CLOSED_LIST" REQUIRED="true" NUM_ROW="100" GROUP="AZURE_CONNECTION">
|
||||
<ITEMS DEFAULT="BLOB">
|
||||
<ITEM NAME="BLOB" VALUE="BLOB" />
|
||||
<ITEM NAME="ADLS" VALUE="ADLS"/>
|
||||
<ITEM NAME="ADLS" VALUE="ADLS" SHOW_IF="LOAD_METHOD == 'POLYBASE'"/>
|
||||
<ITEM NAME="ADLS_GEN2" VALUE="ADLS_GEN2"/>
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
|
||||
<PARAMETER NAME="AUTH_METHOD" FIELD="CLOSED_LIST" REQUIRED_IF="LOAD_METHOD == 'COPY'" NUM_ROW="105" SHOW_IF="LOAD_METHOD == 'COPY'" GROUP="AZURE_CONNECTION">
|
||||
<ITEMS DEFAULT="SAS">
|
||||
<ITEM NAME="SAS" VALUE="SAS" />
|
||||
<ITEM NAME="KEY" VALUE="KEY"/>
|
||||
<ITEM NAME="AAD" VALUE="AAD" SHOW_IF="(isShow[ACTIVE_DIR_AUTH] AND (ACTIVE_DIR_AUTH == 'true')) OR ((USE_EXISTING_CONNECTION == 'true') AND (#LINK@NODE.CONNECTION.ACTIVE_DIR_AUTH != 'true'))"/>
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="ACCOUNT_NAME" FIELD="TEXT" NUM_ROW="110" REQUIRED="true" GROUP="AZURE_CONNECTION">
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="SECRET_KEY" FIELD="PASSWORD" NUM_ROW="110" REQUIRED="true" GROUP="AZURE_CONNECTION" SHOW_IF="AZURE_STORAGE == 'BLOB'">
|
||||
<PARAMETER NAME="SECRET_KEY" FIELD="PASSWORD" NUM_ROW="110" REQUIRED="true" GROUP="AZURE_CONNECTION" SHOW_IF="(!isShow[AUTH_METHOD] AND ((AZURE_STORAGE == 'BLOB') OR (AZURE_STORAGE == 'ADLS_GEN2'))) OR (isShow[AUTH_METHOD] AND (AUTH_METHOD == 'KEY'))">
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="CONTAINER" FIELD="TEXT" NUM_ROW="120" GROUP="AZURE_CONNECTION" REQUIRED="true" SHOW_IF="AZURE_STORAGE == 'BLOB'">
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="PRINCIPAL_KEY" FIELD="PASSWORD" NUM_ROW="110" REQUIRED="true" GROUP="AZURE_CONNECTION" SHOW_IF="AZURE_STORAGE == 'ADLS'">
|
||||
<PARAMETER NAME="SAS_TOKEN" FIELD="TEXT" NUM_ROW="110" REQUIRED="true" GROUP="AZURE_CONNECTION" SHOW_IF="(isShow[AUTH_METHOD] AND (AUTH_METHOD == 'SAS'))">
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="CLIENT_ID" FIELD="TEXT" NUM_ROW="130" GROUP="AZURE_CONNECTION" REQUIRED="true" SHOW_IF="AZURE_STORAGE == 'ADLS'">
|
||||
<PARAMETER NAME="ENDPOINT_SUFFIX" FIELD="TEXT" NUM_ROW="115" GROUP="AZURE_CONNECTION" REQUIRED="true" SHOW_IF="LOAD_METHOD == 'COPY'">
|
||||
<DEFAULT IF="(LOAD_METHOD == 'COPY') AND (AZURE_STORAGE == 'ADLS_GEN2')">"dfs.core.windows.net"</DEFAULT>
|
||||
<DEFAULT IF="(LOAD_METHOD == 'COPY') AND (AZURE_STORAGE == 'BLOB')">"blob.core.windows.net"</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="CONTAINER" FIELD="TEXT" NUM_ROW="120" GROUP="AZURE_CONNECTION" REQUIRED="true" SHOW_IF="(AZURE_STORAGE == 'BLOB') OR (AZURE_STORAGE == 'ADLS_GEN2')">
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="ENDPOINT" FIELD="TEXT" NUM_ROW="135" GROUP="AZURE_CONNECTION" REQUIRED="true" SHOW_IF="AZURE_STORAGE == 'ADLS'">
|
||||
<PARAMETER NAME="PRINCIPAL_KEY" FIELD="PASSWORD" NUM_ROW="110" REQUIRED="true" GROUP="AZURE_CONNECTION" SHOW_IF="(LOAD_METHOD == 'POLYBASE') AND (AZURE_STORAGE == 'ADLS')">
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="CLIENT_ID" FIELD="TEXT" NUM_ROW="130" GROUP="AZURE_CONNECTION" REQUIRED="true" SHOW_IF="(LOAD_METHOD == 'POLYBASE') AND (AZURE_STORAGE == 'ADLS')">
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="AZURE_LOCATION" FIELD="TEXT" NUM_ROW="140" GROUP="AZURE_CONNECTION" REQUIRED="true">
|
||||
<PARAMETER NAME="ENDPOINT" FIELD="TEXT" NUM_ROW="135" GROUP="AZURE_CONNECTION" REQUIRED="true" SHOW_IF="(LOAD_METHOD == 'POLYBASE') AND (AZURE_STORAGE == 'ADLS')">
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="AZURE_LOCATION" FIELD="TEXT" NUM_ROW="140" SHOW_IF="LOAD_METHOD == 'POLYBASE'" GROUP="AZURE_CONNECTION" REQUIRED_IF="LOAD_METHOD == 'POLYBASE'">
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="EXTERNAL_LOCATIONS" FIELD="TABLE" NUM_ROW="145" REQUIRED="true" SHOW_IF="LOAD_METHOD == 'COPY'" GROUP="AZURE_CONNECTION" REQUIRED_IF="LOAD_METHOD == 'COPY'">
|
||||
<ITEMS>
|
||||
<ITEM NAME="EXTERNAL_LOCATION" VALUE=""/>
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="MAPPING" FIELD="MAPPING_TYPE" NUM_ROW="150" SHOW="false" >
|
||||
<DEFAULT>id_MSSQL</DEFAULT>
|
||||
</PARAMETER>
|
||||
@@ -136,7 +166,16 @@
|
||||
|
||||
<ADVANCED_PARAMETERS>
|
||||
|
||||
<PARAMETER NAME="IMPORT_TYPE" FIELD="CLOSED_LIST" NUM_ROW="1" REQUIRED="true" GROUP="LOAD_DETAILS">
|
||||
<PARAMETER NAME="ENABLE_SSL" FIELD="CHECK" NUM_ROW="1" GROUP="AZURE_CONNECTION" SHOW_IF="(LOAD_METHOD == 'POLYBASE') AND (AZURE_STORAGE == 'ADLS_GEN2')">
|
||||
<DEFAULT>true</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="ACTIVE_DIR_AUTH" FIELD="CHECK" NUM_ROW="2" SHOW_IF="USE_EXISTING_CONNECTION=='false'">
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<!-- POLYBASE -->
|
||||
<PARAMETER NAME="IMPORT_TYPE" FIELD="CLOSED_LIST" NUM_ROW="3" REQUIRED="true" SHOW_IF="(LOAD_METHOD == 'POLYBASE')" GROUP="LOAD_DETAILS">
|
||||
<ITEMS DEFAULT="DELIMITED_TEXT">
|
||||
<ITEM NAME="DELIMITED_TEXT" VALUE="DELIMITED_TEXT" />
|
||||
<ITEM NAME="HIVE_RCFILE" VALUE="HIVE_RCFILE" />
|
||||
@@ -144,85 +183,152 @@
|
||||
<ITEM NAME="PARQUET" VALUE="PARQUET" />
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="FIELDSEPARATOR" GROUP="LOAD_DETAILS" FIELD="TEXT" NUM_ROW="5" REPOSITORY_VALUE="FIELD_SEPARATOR" SHOW_IF="IMPORT_TYPE=='DELIMITED_TEXT'">
|
||||
|
||||
<PARAMETER NAME="FIELDSEPARATOR" GROUP="LOAD_DETAILS" FIELD="TEXT" NUM_ROW="5" REPOSITORY_VALUE="FIELD_SEPARATOR" SHOW_IF="(LOAD_METHOD == 'POLYBASE') AND (IMPORT_TYPE=='DELIMITED_TEXT')">
|
||||
<DEFAULT>";"</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="USE_STRING_DELIMITER" FIELD="CHECK" NUM_ROW="10" GROUP="LOAD_DETAILS" SHOW_IF="IMPORT_TYPE=='DELIMITED_TEXT'">
|
||||
<PARAMETER NAME="USE_STRING_DELIMITER" FIELD="CHECK" NUM_ROW="10" GROUP="LOAD_DETAILS" SHOW_IF="(LOAD_METHOD == 'POLYBASE') AND (IMPORT_TYPE=='DELIMITED_TEXT')">
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="STRINGDELIMITER" GROUP="LOAD_DETAILS" FIELD="TEXT" NUM_ROW="10" REPOSITORY_VALUE="STRING_DELIMITER" SHOW_IF="(IMPORT_TYPE=='DELIMITED_TEXT' AND USE_STRING_DELIMITER == 'true')">
|
||||
<PARAMETER NAME="STRINGDELIMITER" GROUP="LOAD_DETAILS" FIELD="TEXT" NUM_ROW="10" REPOSITORY_VALUE="STRING_DELIMITER" SHOW_IF="isShow[USE_STRING_DELIMITER] AND (USE_STRING_DELIMITER == 'true')">
|
||||
<DEFAULT>"\""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="DATE_FORMAT" FIELD="CHECK" NUM_ROW="15" GROUP="LOAD_DETAILS" SHOW_IF="IMPORT_TYPE=='DELIMITED_TEXT'">
|
||||
<PARAMETER NAME="DATE_FORMAT" FIELD="CHECK" NUM_ROW="15" GROUP="LOAD_DETAILS" SHOW_IF="(LOAD_METHOD == 'POLYBASE') AND (IMPORT_TYPE=='DELIMITED_TEXT')">
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="DATE_PATTERN" GROUP="LOAD_DETAILS" FIELD="TEXT" NUM_ROW="15" SHOW_IF="(IMPORT_TYPE=='DELIMITED_TEXT' AND DATE_FORMAT == 'true')">
|
||||
<PARAMETER NAME="DATE_PATTERN" GROUP="LOAD_DETAILS" FIELD="TEXT" NUM_ROW="15" SHOW_IF="isShow[(DATE_FORMAT] AND (DATE_FORMAT == 'true')">
|
||||
<DEFAULT>"yyyy-MM-dd"</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="USE_TYPE_DEFAULT" FIELD="CHECK" NUM_ROW="20" GROUP="LOAD_DETAILS" SHOW_IF="IMPORT_TYPE=='DELIMITED_TEXT'">
|
||||
<PARAMETER NAME="USE_TYPE_DEFAULT" FIELD="CHECK" NUM_ROW="20" GROUP="LOAD_DETAILS" SHOW_IF="(LOAD_METHOD == 'POLYBASE') AND (IMPORT_TYPE=='DELIMITED_TEXT')">
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<!-- COPY -->
|
||||
<PARAMETER NAME="FILE_TYPE" FIELD="CLOSED_LIST" NUM_ROW="3" REQUIRED="true" SHOW_IF="(LOAD_METHOD == 'COPY')" GROUP="LOAD_DETAILS">
|
||||
<ITEMS DEFAULT="CSV">
|
||||
<ITEM NAME="CSV" VALUE="CSV" />
|
||||
<ITEM NAME="ORC" VALUE="ORC" />
|
||||
<ITEM NAME="PARQUET" VALUE="PARQUET" />
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="SPECIFY_FIELDS_MAPPING" FIELD="CHECK" NUM_ROW="4" SHOW_IF="(LOAD_METHOD == 'COPY')" GROUP="LOAD_DETAILS">
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
<PARAMETER NAME="COLUMN_MAP_FIELD" FIELD="TABLE" NUM_ROW="5" REQUIRED="false" SHOW_IF="(LOAD_METHOD == 'COPY') AND (SPECIFY_FIELDS_MAPPING == 'true')" GROUP="LOAD_DETAILS">>
|
||||
<ITEMS BASED_ON_SCHEMA="true">
|
||||
<ITEM NAME="FIELD_INDEX" VALUE=""/>
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="FIRST_ROW" GROUP="LOAD_DETAILS" FIELD="TEXT" NUM_ROW="6" SHOW_IF="(LOAD_METHOD == 'COPY') AND (FILE_TYPE=='CSV')">
|
||||
<DEFAULT>1</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="FIELD_QUOTE" GROUP="LOAD_DETAILS" FIELD="TEXT" NUM_ROW="7" SHOW_IF="(LOAD_METHOD == 'COPY') AND (FILE_TYPE=='CSV')">
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="FIELD_TERMINATOR" GROUP="LOAD_DETAILS" FIELD="TEXT" NUM_ROW="8" SHOW_IF="(LOAD_METHOD == 'COPY') AND (FILE_TYPE=='CSV')">
|
||||
<DEFAULT>","</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="ROW_TERMINATOR" GROUP="LOAD_DETAILS" FIELD="TEXT" NUM_ROW="10" SHOW_IF="(LOAD_METHOD == 'COPY') AND (FILE_TYPE=='CSV')">
|
||||
<DEFAULT>"\n"</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="COPY_CSV_DATE_FORMAT" GROUP="LOAD_DETAILS" FIELD="CLOSED_LIST" NUM_ROW="12" SHOW_IF="(LOAD_METHOD == 'COPY') AND (FILE_TYPE=='CSV')">
|
||||
<ITEMS DEFAULT="SESSION_DATEFORMAT">
|
||||
<ITEM NAME="SESSION_DATEFORMAT" VALUE="SESSION_DATEFORMAT" />
|
||||
<ITEM NAME="MDY" VALUE=""mdy"" />
|
||||
<ITEM NAME="DMY" VALUE=""dmy"" />
|
||||
<ITEM NAME="YMD" VALUE=""ymd"" />
|
||||
<ITEM NAME="YDM" VALUE=""ydm"" />
|
||||
<ITEM NAME="MYD" VALUE=""myd"" />
|
||||
<ITEM NAME="DYM" VALUE=""dym"" />
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="ENCODING" GROUP="LOAD_DETAILS" FIELD="CLOSED_LIST" NUM_ROW="14" SHOW_IF="(LOAD_METHOD == 'COPY') AND (FILE_TYPE=='CSV')">
|
||||
<ITEMS DEFAULT="UTF8">
|
||||
<ITEM NAME="UTF8" VALUE=""UTF8"" />
|
||||
<ITEM NAME="UTF16" VALUE=""UTF16"" />
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="IDENTITY_INSERT" GROUP="LOAD_DETAILS" FIELD="CHECK" NUM_ROW="16" SHOW_IF="(LOAD_METHOD == 'COPY')">
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="MAX_ERRORS" GROUP="LOAD_DETAILS" FIELD="TEXT" NUM_ROW="18" SHOW_IF="(LOAD_METHOD == 'COPY')">
|
||||
<DEFAULT>0</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="ERROR_FILE" GROUP="LOAD_DETAILS" FIELD="TEXT" NUM_ROW="20" SHOW_IF="(LOAD_METHOD == 'COPY') AND (AUTH_METHOD != 'KEY') AND (FILE_TYPE=='CSV')">
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<!-- COPY end -->
|
||||
|
||||
<PARAMETER NAME="COMPRESS" FIELD="CHECK" NUM_ROW="25" REQUIRED="true" GROUP="LOAD_DETAILS">
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="COMPRESSION_TEXT" FIELD="CLOSED_LIST" NUM_ROW="25" GROUP="LOAD_DETAILS" SHOW_IF="COMPRESS=='true' AND (IMPORT_TYPE == 'DELIMITED_TEXT')">
|
||||
<PARAMETER NAME="COMPRESSION_TEXT" FIELD="CLOSED_LIST" NUM_ROW="25" GROUP="LOAD_DETAILS" SHOW_IF="(COMPRESS=='true') AND (((LOAD_METHOD == 'POLYBASE') AND (IMPORT_TYPE == 'DELIMITED_TEXT')) OR ((LOAD_METHOD == 'COPY') AND (FILE_TYPE == 'CSV')))">
|
||||
<ITEMS DEFAULT="DEFAULT">
|
||||
<ITEM NAME="DEFAULT" VALUE="org.apache.hadoop.io.compress.DefaultCodec"/>
|
||||
<ITEM NAME="DEFAULT" VALUE="org.apache.hadoop.io.compress.DefaultCodec" SHOW_IF="LOAD_METHOD == 'POLYBASE'"/>
|
||||
<ITEM NAME="GZIP" VALUE="org.apache.hadoop.io.compress.GzipCodec"/>
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="COMPRESSION_RC" FIELD="CLOSED_LIST" NUM_ROW="25" GROUP="LOAD_DETAILS" SHOW_IF="COMPRESS=='true' AND (IMPORT_TYPE == 'HIVE_RCFILE')">
|
||||
<PARAMETER NAME="COMPRESSION_RC" FIELD="CLOSED_LIST" NUM_ROW="25" GROUP="LOAD_DETAILS" SHOW_IF="(LOAD_METHOD == 'POLYBASE') AND (COMPRESS=='true') AND (IMPORT_TYPE == 'HIVE_RCFILE')">
|
||||
<ITEMS DEFAULT="DEFAULT">
|
||||
<ITEM NAME="DEFAULT" VALUE="org.apache.hadoop.io.compress.DefaultCodec"/>
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="SERDE_METHOD" FIELD="CLOSED_LIST" NUM_ROW="23" GROUP="LOAD_DETAILS" SHOW_IF="IMPORT_TYPE == 'HIVE_RCFILE'">
|
||||
<PARAMETER NAME="SERDE_METHOD" FIELD="CLOSED_LIST" NUM_ROW="23" GROUP="LOAD_DETAILS" SHOW_IF="(LOAD_METHOD == 'POLYBASE') AND (IMPORT_TYPE == 'HIVE_RCFILE')">
|
||||
<ITEMS DEFAULT="LAZY">
|
||||
<ITEM NAME="LAZY" VALUE="org.apache.hadoop.hive.serde2.columnar.LazyBinaryColumnarSerDe"/>
|
||||
<ITEM NAME="COLUMNAR" VALUE="org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe"/>
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="COMPRESSION_ORC" FIELD="CLOSED_LIST" NUM_ROW="25" GROUP="LOAD_DETAILS" SHOW_IF="COMPRESS=='true' AND (IMPORT_TYPE == 'HIVE_ORC')">
|
||||
<PARAMETER NAME="COMPRESSION_ORC" FIELD="CLOSED_LIST" NUM_ROW="25" GROUP="LOAD_DETAILS" SHOW_IF="(COMPRESS=='true') AND (((LOAD_METHOD == 'POLYBASE') AND (IMPORT_TYPE == 'HIVE_ORC')) OR ((LOAD_METHOD == 'COPY') AND (FILE_TYPE == 'ORC')))">>
|
||||
<ITEMS DEFAULT="DEFAULT">
|
||||
<ITEM NAME="DEFAULT" VALUE="org.apache.hadoop.io.compress.DefaultCodec"/>
|
||||
<ITEM NAME="SNAPPY" VALUE="org.apache.hadoop.io.compress.SnappyCodec"/>
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="COMPRESSION_PARQUET" FIELD="CLOSED_LIST" NUM_ROW="25" GROUP="LOAD_DETAILS" SHOW_IF="COMPRESS=='true' AND (IMPORT_TYPE == 'PARQUET')">
|
||||
<PARAMETER NAME="COMPRESSION_PARQUET" FIELD="CLOSED_LIST" NUM_ROW="25" GROUP="LOAD_DETAILS" SHOW_IF="(COMPRESS=='true') AND (((LOAD_METHOD == 'POLYBASE') AND (IMPORT_TYPE == 'PARQUET')) OR ((LOAD_METHOD == 'COPY') AND (FILE_TYPE == 'PARQUET')))">>
|
||||
<ITEMS DEFAULT="GZIP">
|
||||
<ITEM NAME="GZIP" VALUE="org.apache.hadoop.io.compress.GzipCodec"/>
|
||||
<ITEM NAME="SNAPPY" VALUE="org.apache.hadoop.io.compress.SnappyCodec"/>
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="EXT_TABLE_OPTIONS" FIELD="CHECK" NUM_ROW="30" REPOSITORY_VALUE="EXT_TABLE_OPTIONS">
|
||||
<PARAMETER NAME="EXT_TABLE_OPTIONS" FIELD="CHECK" NUM_ROW="30" REPOSITORY_VALUE="EXT_TABLE_OPTIONS" SHOW_IF="(LOAD_METHOD == 'POLYBASE')">
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="REJECT_TYPE" FIELD="CLOSED_LIST" NUM_ROW="35" REQUIRED="true" SHOW_IF="(EXT_TABLE_OPTIONS == 'true')">
|
||||
<PARAMETER NAME="REJECT_TYPE" FIELD="CLOSED_LIST" NUM_ROW="35" REQUIRED="true" SHOW_IF="(LOAD_METHOD == 'POLYBASE') AND (EXT_TABLE_OPTIONS == 'true')">
|
||||
<ITEMS DEFAULT="Value">
|
||||
<ITEM NAME="Value" VALUE="Value" />
|
||||
<ITEM NAME="Percentage" VALUE="Percentage"/>
|
||||
</ITEMS>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="REJECT_VALUE" FIELD="TEXT" NUM_ROW="35" REQUIRED="true" SHOW_IF="(EXT_TABLE_OPTIONS == 'true')">
|
||||
<PARAMETER NAME="REJECT_VALUE" FIELD="TEXT" NUM_ROW="35" REQUIRED="true" SHOW_IF="(LOAD_METHOD == 'POLYBASE') AND (EXT_TABLE_OPTIONS == 'true')">
|
||||
<DEFAULT>0</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="REJECT_SAMPLE_VALUE" FIELD="TEXT" NUM_ROW="35" REQUIRED="true" SHOW_IF="(EXT_TABLE_OPTIONS == 'true') AND (REJECT_TYPE == 'Percentage')">
|
||||
<PARAMETER NAME="REJECT_SAMPLE_VALUE" FIELD="TEXT" NUM_ROW="35" REQUIRED="true" SHOW_IF="(LOAD_METHOD == 'POLYBASE') AND (EXT_TABLE_OPTIONS == 'true') AND (REJECT_TYPE == 'Percentage')">
|
||||
<DEFAULT>0</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
@@ -238,7 +344,7 @@
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="TABLE_OPTION" FIELD="CLOSED_LIST" NUM_ROW="45" GROUP="DW_TABLE_PROPERTIES" REQUIRED="true" SHOW_IF="(TABLE_ACTION == 'DROP_CREATE') OR (TABLE_ACTION == 'DROP_IF_EXISTS_AND_CREATE') OR (TABLE_ACTION == 'CREATE') OR (TABLE_ACTION == 'CREATE_IF_NOT_EXISTS')">
|
||||
<PARAMETER NAME="TABLE_OPTION" FIELD="CLOSED_LIST" NUM_ROW="45" GROUP="DW_TABLE_PROPERTIES" REQUIRED="true" SHOW_IF="(TABLE_ACTION == 'DROP_CREATE') OR (TABLE_ACTION == 'DROP_IF_EXISTS_AND_CREATE') OR (TABLE_ACTION == 'CREATE') OR (TABLE_ACTION == 'CREATE_IF_NOT_EXISTS'))">
|
||||
<ITEMS DEFAULT="CLUSTERED_COLUMNSTORE_INDEX">
|
||||
<ITEM NAME="CLUSTERED_COLUMNSTORE_INDEX" VALUE="CLUSTERED_COLUMNSTORE_INDEX" />
|
||||
<ITEM NAME="HEAP" VALUE="HEAP"/>
|
||||
@@ -250,7 +356,7 @@
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="PARTITION" FIELD="CHECK" NUM_ROW="47" GROUP="DW_TABLE_PROPERTIES" REPOSITORY_VALUE="PARTITION" SHOW_IF="(TABLE_ACTION == 'DROP_CREATE') OR (TABLE_ACTION == 'DROP_IF_EXISTS_AND_CREATE') OR (TABLE_ACTION == 'CREATE') OR (TABLE_ACTION == 'CREATE_IF_NOT_EXISTS')">
|
||||
<PARAMETER NAME="PARTITION" FIELD="CHECK" NUM_ROW="47" GROUP="DW_TABLE_PROPERTIES" REPOSITORY_VALUE="PARTITION" SHOW_IF="(TABLE_ACTION == 'DROP_CREATE') OR (TABLE_ACTION == 'DROP_IF_EXISTS_AND_CREATE') OR (TABLE_ACTION == 'CREATE') OR (TABLE_ACTION == 'CREATE_IF_NOT_EXISTS'))">
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
@@ -275,6 +381,14 @@
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="Driver-mssql-jdbc" MODULE="mssql-jdbc.jar" MVN="mvn:org.talend.libraries/mssql-jdbc/6.0.0" REQUIRED_IF="DRIVER=='MSSQL_PROP'" />
|
||||
<IMPORT NAME="adal4j" MODULE="adal4j-1.6.5.jar" MVN="mvn:com.microsoft.azure/adal4j/1.6.5" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="commons-lang3" MODULE="commons-lang3-3.10.jar" MVN="mvn:org.apache.commons/commons-lang3/3.10" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="commons-codec" MODULE="commons-codec-1.14.jar" MVN="mvn:commons-codec/commons-codec/1.14" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="gson" MODULE="gson-2.8.6.jar" MVN="mvn:com.google.code.gson/gson/2.8.6" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="oauth2-oidc-sdk" MODULE="oauth2-oidc-sdk-6.5.jar" MVN="mvn:com.nimbusds/oauth2-oidc-sdk/6.5" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="json-smart" MODULE="json-smart-2.3.jar" MVN="mvn:net.minidev/json-smart/2.3" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="nimbus-jose-jwt" MODULE="nimbus-jose-jwt-8.11.jar" MVN="mvn:com.nimbusds/nimbus-jose-jwt/8.11" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="javax.mail" MODULE="javax.mail-1.6.2.jar" MVN="mvn:com.sun.mail/javax.mail/1.6.2" REQUIRED_IF="(ACTIVE_DIR_AUTH == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
ACCOUNT_NAME.NAME=Account Name
|
||||
AZURE_CONNECTION.NAME=Azure Storage Connection
|
||||
AZURE_LOCATION.NAME=Azure Storage Location
|
||||
AZURE_STORAGE.ITEM.ADLS=Data Lake Store
|
||||
AZURE_STORAGE.ITEM.ADLS=Data Lake Storage Gen1
|
||||
AZURE_STORAGE.ITEM.ADLS_GEN2=Data Lake Storage Gen2
|
||||
AZURE_STORAGE.ITEM.BLOB=Blob Storage
|
||||
AZURE_STORAGE.NAME=Azure Storage
|
||||
CLIENT_ID.NAME=Client Id
|
||||
@@ -35,12 +36,13 @@ DISTRIBUTION.NAME=Distribution Option
|
||||
DISTRIBUTION_COLUMN_NAME.NAME=Distribution Column Name
|
||||
DRIVER.NAME=JDBC Provider
|
||||
DRIVER.ITEM.MSSQL_PROP=Microsoft
|
||||
DW_TABLE_PROPERTIES.NAME=Data Warehouse Table Properties
|
||||
DW_TABLE_PROPERTIES.NAME=Synapse Analytics table properties
|
||||
ENABLE_SSL.NAME=Secure transfer required
|
||||
ENDPOINT.NAME=OAuth 2.0 token endpoint
|
||||
EXT_TABLE_OPTIONS.NAME=Data import reject options
|
||||
FIELDSEPARATOR.NAME=Field separator
|
||||
FILENAME.NAME=Filepath at local
|
||||
HELP=org.talend.help.tSQLDWHBulkExec
|
||||
HELP=org.talend.help.tAzureSynapseBulkExec
|
||||
HOST.NAME=Host
|
||||
IMPORT_TYPE.ITEM.DELIMITED_TEXT=Delimited Text
|
||||
IMPORT_TYPE.ITEM.HIVE_ORC=Hive ORC
|
||||
@@ -49,7 +51,7 @@ IMPORT_TYPE.ITEM.PARQUET=Parquet
|
||||
IMPORT_TYPE.NAME=File format
|
||||
INDEX_COLUMNS.NAME=Index column(s)
|
||||
LOAD_DETAILS.NAME=Load Parameters
|
||||
LONG_NAME=Load data into Azure Data Warehouse with PolyBase
|
||||
LONG_NAME=Load data into Azure Synapse Analytics with PolyBase
|
||||
MAPPING.NAME=Mapping
|
||||
NB_LINE_INSERTED.NAME=Number of lines inserted
|
||||
PARTITION.NAME=Partition
|
||||
@@ -100,4 +102,45 @@ USE_EXISTING_CONNECTION.NAME=Use an existing connection
|
||||
USE_STRING_DELIMITER.NAME=Enclosed by
|
||||
USE_TYPE_DEFAULT.ITEM.FALSE=False
|
||||
USE_TYPE_DEFAULT.ITEM.TRUE=True
|
||||
USE_TYPE_DEFAULT.NAME=Use type default
|
||||
USE_TYPE_DEFAULT.NAME=Use type default
|
||||
|
||||
ACTIVE_DIR_AUTH.NAME=Authenticate using Azure Active Directory
|
||||
|
||||
LOAD_METHOD.NAME=Load method
|
||||
LOAD_METHOD.ITEM.POLYBASE=PolyBase
|
||||
LOAD_METHOD.ITEM.COPY=Copy
|
||||
|
||||
AUTH_METHOD.NAME=Authentication method
|
||||
AUTH_METHOD.ITEM.SAS=Shared Access Signatures
|
||||
AUTH_METHOD.ITEM.KEY=Storage account key
|
||||
AUTH_METHOD.ITEM.AAD=Azure Active Directory
|
||||
SAS_TOKEN.NAME=SAS token
|
||||
ENDPOINT_SUFFIX.NAME=Endpoint suffix
|
||||
EXTERNAL_LOCATIONS.NAME=External paths
|
||||
EXTERNAL_LOCATIONS.ITEM.EXTERNAL_LOCATION=Path
|
||||
SPECIFY_FIELDS_MAPPING.NAME=Specify map to source data fields
|
||||
COLUMN_MAP_FIELD.NAME=
|
||||
COLUMN_MAP_FIELD.ITEM.FIELD_INDEX=Source field index
|
||||
FILE_TYPE.NAME=File type
|
||||
FILE_TYPE.ITEM.CSV=CSV
|
||||
FILE_TYPE.ITEM.ORC=ORC
|
||||
FILE_TYPE.ITEM.PARQUET=PARQUET
|
||||
FIRST_ROW.NAME=First row
|
||||
FIELD_QUOTE.NAME=Field quote
|
||||
FIELD_TERMINATOR.NAME=Field terminator
|
||||
ROW_TERMINATOR.NAME=Row terminator
|
||||
COPY_CSV_DATE_FORMAT.NAME=Date format
|
||||
COPY_CSV_DATE_FORMAT.ITEM.SESSION_DATEFORMAT=Session date format
|
||||
COPY_CSV_DATE_FORMAT.ITEM.MDY=mdy
|
||||
COPY_CSV_DATE_FORMAT.ITEM.DMY=dmy
|
||||
COPY_CSV_DATE_FORMAT.ITEM.YMD=ymd
|
||||
COPY_CSV_DATE_FORMAT.ITEM.YDM=ydm
|
||||
COPY_CSV_DATE_FORMAT.ITEM.MYD=myd
|
||||
COPY_CSV_DATE_FORMAT.ITEM.DYM=dym
|
||||
ENCODING.NAME=Encoding
|
||||
ENCODING.ITEM.UTF8=UTF8
|
||||
ENCODING.ITEM.UTF16=UTF16
|
||||
IDENTITY_INSERT.NAME=Identity insert
|
||||
MAX_ERRORS.NAME=Max errors
|
||||
ERROR_FILE.NAME=Error file location
|
||||
|
||||
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
@@ -15,8 +15,8 @@
|
||||
</HEADER>
|
||||
|
||||
<FAMILIES>
|
||||
<FAMILY>Databases/DB Specifics/Azure/SQL Data Warehouse</FAMILY>
|
||||
<FAMILY>Cloud/Azure/SQL Data Warehouse</FAMILY>
|
||||
<FAMILY>Databases/DB Specifics/Azure/Synapse Analytics</FAMILY>
|
||||
<FAMILY>Cloud/Azure/Synapse Analytics</FAMILY>
|
||||
</FAMILIES>
|
||||
|
||||
<DOCUMENTATION>
|
||||
@@ -37,7 +37,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
REQUIRED="true" FILTER="tSQLDWHConnection"
|
||||
REQUIRED="true" FILTER="tAzureSynapseConnection"
|
||||
NUM_ROW="10"
|
||||
DYNAMIC_SETTINGS="true"
|
||||
/>
|
||||
@@ -1,3 +1,3 @@
|
||||
HELP=org.talend.help.tSQLDWHClose
|
||||
HELP=org.talend.help.tAzureSynapseClose
|
||||
LONG_NAME=Close a selected MSSql connection.
|
||||
CONNECTION.NAME=Component List
|
||||
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
@@ -16,8 +16,8 @@
|
||||
</HEADER>
|
||||
|
||||
<FAMILIES>
|
||||
<FAMILY>Databases/DB Specifics/Azure/SQL Data Warehouse</FAMILY>
|
||||
<FAMILY>Cloud/Azure/SQL Data Warehouse</FAMILY>
|
||||
<FAMILY>Databases/DB Specifics/Azure/Synapse Analytics</FAMILY>
|
||||
<FAMILY>Cloud/Azure/Synapse Analytics</FAMILY>
|
||||
</FAMILIES>
|
||||
|
||||
<DOCUMENTATION>
|
||||
@@ -38,7 +38,7 @@
|
||||
<PARAMETER
|
||||
NAME="CONNECTION"
|
||||
FIELD="COMPONENT_LIST"
|
||||
REQUIRED="true" FILTER="tSQLDWHConnection"
|
||||
REQUIRED="true" FILTER="tAzureSynapseConnection"
|
||||
NUM_ROW="10"
|
||||
DYNAMIC_SETTINGS="true"
|
||||
/>
|
||||
@@ -1,6 +1,6 @@
|
||||
#Created by JInto - www.guh-software.de
|
||||
#Wed May 23 11:26:21 CST 2007
|
||||
HELP=org.talend.help.tSQLDWHCommit
|
||||
HELP=org.talend.help.tAzureSynapseCommit
|
||||
LONG_NAME=Commits all transactions not already commited in a selected MSSql connection
|
||||
CLOSE.NAME=Close Connection
|
||||
CONNECTION.NAME=Component List
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user