Compare commits

...

134 Commits

Author SHA1 Message Date
Oleksii Nimych
82aef70d78 fix(TDI-44400): update google-cloud-bigquery 2020-07-10 19:32:50 +03:00
Roman
18a18ce336 feat(TDI-38246): add new auth type to Google Storage family (#4839)
* feat(TDI-38246): add new auth type to tGSConnection

* feat(TDI-38246): add auth to UI | add dependencies

* feat(TDI-38246): add new auth type to tGSBucketCreate

* feat(TDI-38246): add new auth type to tGSBucketDelete | small fixes

* feat(TDI-38246): add new auth type to tGSBucketExist

* feat(TDI-38246): add new auth type to tGSBucketList

* feat(TDI-38246): remove projectId from tGSBucketList

* feat(TDI-38246): add new auth type to tGSClose

* feat(TDI-38246): add filemap generation for blob

* feat(TDI-38246): add new auth type to tGSPut

* feat(TDI-38246): add new auth type to tGSDelete

* feat(TDI-38246): add new auth type to tGSList

* feat(TDI-38246): add new auth type to tGSGet

* feat(TDI-38246): add new auth type to tGSCopy

* feat(TDI-38246): remove projectID for service account auth type

* feat(TDI-38246): rename component properties

* feat(TDI-38246): extend locations for bucket creation

* feat(TDI-38246): remove dual locations

* feat(TDI-38246): change default auth type

* feat(TDI-38246): add migration task

* feat(TDI-38246): remove unused var

* feat(TDI-38246): improve migration task

* feat(TDI-38246): clean code

* feat(TDI-38246): correct showing some params when use exist connection

* feat(TDI-38246): mark all HMAC keys as deprecated

* feat(TDI-38246): avoid blob directories
2020-07-10 18:32:09 +03:00
kjwang
51d66a086e Fix: TUP-27545 Update context var name for jdbc drivers can not be updated to job automatically. (#4883)
* Fix: TUP-27545 Update context var name for jdbc drivers can not be
updated to job automatically.
https://jira.talendforge.org/browse/TUP-27545
2020-07-10 14:13:09 +08:00
Roman
93735786d2 feat(TDI-37016): Add dynamic support for tVerticaBulkExec (#4484) (#4884) 2020-07-09 15:32:05 +03:00
clesaec
006b9c00b9 fix(TDI-44455) : log dependencies for studio-integration module (#4874) 2020-07-09 11:28:25 +02:00
jiezhang-tlnd
4790a880e1 feat(TUP-27680)Can't use the database "MAPPING" parameter to decide the component UI if show (#4879)
* feat(TUP-27680)Can't use the database "MAPPING" parameter to decide the
component UI if show
https://jira.talendforge.org/browse/TUP-27680

* feat(TUP-27680)Can't use the database "MAPPING" parameter to decide the
component UI if show

* feat(TUP-27680)add junits
2020-07-09 17:14:06 +08:00
jiezhang-tlnd
a96fdec0a7 add junit caused by TDI-44284 (#4906) 2020-07-09 14:49:09 +08:00
hcyi
bde9640722 fix(TUP-27352):Traces enabled by default when using Memory Run (#4770) 2020-07-08 09:46:28 +08:00
Dmytro Grygorenko
a93372f60e fix(TDI-44355): Add contributor's real name. (#4891) 2020-07-07 13:13:16 +03:00
pyzhou
d1559451e4 feat(TDI-44284):Rename old tEXAxxx connectors in tExasolxxx (#4842)
* feat(TDI-44284):Rename old tEXAxxx connectors in tExasolxxx

* reformat and change filter

* reformat

* migration task

* change name

* change filter to tExasolConnection

* fix db unify

* fix(TDI-44284):rename EXA

* debug

* debug2

* debug3
2020-07-07 16:05:16 +08:00
vdrokov
6abc8d737d fix(TESB-29489): Compile error occurred in code if the route version is different with the routelet version (#4830) 2020-07-03 09:56:31 +03:00
hzhao-talendbj
69c9182794 Hengzhao/backport73/tup 27070 (#4786)
* Tup-27070

* TUP-27070  fix cross join cases (#4772)
2020-07-03 09:43:02 +08:00
jiezhang-tlnd
dc62c40afe fix(TUP-27588)tCreateTable data types mapping in the schema editor is (#4820) (#4864)
always Mysql after dragging and dropping from database Metadata
https://jira.talendforge.org/browse/TUP-27588
2020-07-02 17:28:13 +08:00
pyzhou
f7952374e4 Pyzhou/tdi 43899 jdbcscdelt type0 (#4835)
* feat(TDI-43899):tJDBCSCDELT type0

* mysql insert type0

* fix log

* snowflake type 0

* mssql type0

* exasol type 0

* postgres type0

* fix bug for exasol

* oracle type 0

* correct typo

* fix bug of oracle

* type correction
2020-07-02 16:46:43 +08:00
Jane Ding
de3f85fc35 Hwang/tup 26059 (#4436) (#4876)
* bugfix(TUP-26059):tELTPostgresqlMap lost its "DB Type" column for which
the value should be "BPCHAR"

Co-authored-by: hwang-talend <hwang@talend.com>
2020-07-02 14:48:09 +08:00
chmyga
e62819fd76 fix(TDI-44384): set csv options (#4821)
Co-authored-by: Dmytro Chmyga <dmytro.chmyga@synapse.com>
2020-07-02 08:57:04 +03:00
Dmytro Grygorenko
adca838561 fix(TDI-44412): Implemented optional component fail when no files found by mask. (#4858) 2020-06-30 14:16:09 +03:00
clesaec
e87cfa18a1 Clesaec/tcomp 1733 log4j pb (#4867)
* fix(TCOMP-1733) log dep pb
2020-06-29 18:03:22 +02:00
clesaec
961e39ef3b Clesaec/tdi 44320 active if form 7.3 (#4851)
* fix(TDI-44320) : change page creation method
2020-06-26 16:27:37 +02:00
OleksiiNimych
205d575bab feat(TDI-44039): internal_ip_only for tGoogleDataprocManage (#4763) 2020-06-25 12:04:53 +03:00
mbasiuk-talend
15a25708b6 Mbasiuk/tdi 44165 add null marker field (#4768)
* fix(TDI-44165): add checkbox and text property

* fix(TDI-44165): fix indentation

* fix(TDI-44165): fix indentation v2

* fix(TDI-44165): update nullMarke

* fix(TDI-44165): add null marker customization for BigqueryOB
2020-06-24 19:35:26 +03:00
Richard Lecomte
4468d89b0e TDI-44342 : Ignore microseconds in BigQuery datetime (#4798)
* TDI-44342 : Ignore microseconds in BigQuery datetime

* TDI-44342 : Ignore microseconds in BigQuery datetime

Fixed for BigQuerySQLRow component
2020-06-24 14:13:28 +02:00
OleksiiNimych
3a25678438 fix(TDI-44378): add correct generation of create table sql for Sybase (#4815) 2020-06-24 12:58:18 +03:00
Jane Ding
115ddb1b05 fix(TUP-27517):Implicit Context is not working with the Field Separator (#4832)
* fix(TUP-27517):Implicit Context is not working with the Field Separator
as ~~#*#~~
https://jira.talendforge.org/browse/TUP-27517

* fix(TUP-27517):Implicit Context is not working with the Field Separator
as ~~#*#~~
https://jira.talendforge.org/browse/TUP-27517

* fix(TUP-27517):Implicit Context is not working with the Field Separator
as ~~#*#~~
https://jira.talendforge.org/browse/TUP-27517
2020-06-24 14:30:20 +08:00
Chao MENG
e6a755129f fix(TUP-27497): [7.3.1] tPreJob with tHDFSConnection with kerberized (#4850)
fix(TUP-27497): [7.3.1] tPreJob with tHDFSConnection with kerberized cluster fails with simple authentication error
https://jira.talendforge.org/browse/TUP-27497
2020-06-23 18:28:10 +08:00
Chao MENG
1938ecc8af fix(TUP-27497): [7.3.1] tPreJob with tHDFSConnection with kerberized cluster fails with simple authentication error (#4805)
* fix(TUP-27497): [7.3.1] tPreJob with tHDFSConnection with kerberized
cluster fails with simple authentication error
https://jira.talendforge.org/browse/TUP-27497

* fix(TUP-27497): [7.3.1] tPreJob with tHDFSConnection with kerberized
cluster fails with simple authentication error
https://jira.talendforge.org/browse/TUP-27497
2020-06-23 09:33:29 +08:00
Dmytro Sylaiev
b15d901b27 Dsylaiev/tdi 44109 reintegrate feature for 7.3 (#4834)
* feat(TDI-44109): Regain use ftps library for FTP mode (#4737)

* feat(TDI-44109): Use ftps library for FTP mode

* fix(TDI-44109): fix compile error

* fix(TDI-44109): Fix compile error with the tFTPFileList

* feat(TDI-44109): Use ftps library for FTP mode

* Fix compile error for ftp protocol

* Fix log information for ftp protocol

* Fix compile error for sftp in tFTPDelete component

Co-authored-by: Dmytro Chmyga <dmytro.chmyga@synapse.com>

* fix(TDI-44109): Apply ZhaoJin's fix for FTPGet and Put

* fix(TDI-44109): Fix "move dir" pb on tFTPDelete

Co-authored-by: Dmytro Chmyga <dmytro.chmyga@synapse.com>
2020-06-22 11:51:31 +03:00
Dmytro Grygorenko
7f92ad83a1 fix(TDI-44355): Backport to 'maintenance/7.3' branch (#4844) 2020-06-22 11:23:07 +03:00
Jean-Philippe HAUTIN
66b0cf243b fix(TBD-10799): HDI4.0: DI tHiveConnection does not show any fields (#4838) 2020-06-18 12:17:16 +02:00
AlixMetivier
e8ec4d0337 fix(TBD-10454): fix hadoop conf in context with TMC (#4833) 2020-06-18 08:52:06 +02:00
Dmytro Sylaiev
1e30a7ea90 feat(TDI-44109): Revert Use ftps library for FTP mode (#4737)
This reverts commit c484ce75b4.
2020-06-17 10:47:18 +03:00
wang wei
debbd1107f fix(TDI-44380): Imported JDBC job has compile error : extra quotes around table name(#4810) 2020-06-16 13:18:14 +08:00
Jane Ding
35d279a32a fix(TUP-27509):[bug] testcase listed everytime when click "Detect and… (#4797)
* fix(TUP-27509):[bug] testcase listed everytime when click "Detect and (#4796)

update all jobs"
https://jira.talendforge.org/browse/TUP-27509

* Fix: TUP-27513 [Bug] Studio update job context variable name, the
testcase will add another context variable as built-in mode
https://jira.talendforge.org/browse/TUP-27513

Co-authored-by: kjwang-talend <kjwang@talend.com>
2020-06-12 15:58:05 +08:00
Roman
6416c9c9bb Revert "feat(TDI-37016): Add dynamic support for tVerticaBulkExec (#4484)" (#4803)
This reverts commit cc6a1bc1da.
2020-06-11 15:17:31 +03:00
Jean-Philippe HAUTIN
e03637981c fix(TBD-10661): HDI4.0: set output format to tsv in beeline (#4790) 2020-06-10 21:57:26 +02:00
chmyga
52c5ef7dfa Dchmyga/tdi 44281 fix missing log4j lib t set proxy (#4794)
* fix(TDI-44281): NoClassDefFound for tSetProxy

* Use slf4j instead of log4j in talend-proxy lib

* fix(TDI-44281): NoClassDefFound for tSetProxy

* Update talend-proxy lib version in components

* fix(TDI-44281): NoClassDefFound for tSetProxy

* Update talend-proxy lib for download during build process

Co-authored-by: Dmytro Chmyga <dmytro.chmyga@synapse.com>
2020-06-10 15:20:16 +03:00
Laurent BOURGEOIS
31b3974f81 fix(TBD-10285):Add contains predicate to expressions (#4613) (#4795) 2020-06-10 12:50:26 +02:00
wang wei
0507e76d5e fix(TDI-44172): Observability: Create new "component execution" event and emit it frequently (#4765) 2020-06-10 16:36:30 +08:00
Dmytro Sylaiev
c484ce75b4 feat(TDI-44109): Use ftps library for FTP mode (#4737)
* feat(TDI-44109): Use ftps library for FTP mode

* fix(TDI-44109): fix compile error

* fix(TDI-44109): Fix compile error with the tFTPFileList

* feat(TDI-44109): Use ftps library for FTP mode

* Fix compile error for ftp protocol

* Fix log information for ftp protocol

* Fix compile error for sftp in tFTPDelete component

Co-authored-by: Dmytro Chmyga <dmytro.chmyga@synapse.com>
2020-06-10 09:56:07 +03:00
Zhiwei Xue
212c74ebb4 fix(TUP-27315):Patch installation issues for zero install CI (#4782)
* fix(TUP-27315):Patch installation issues for zero install CI

* fix(TUP-27315): re-deploy tacokit jars before server start.

* Revert "fix(TUP-27315):Patch installation issues for zero install CI"

This reverts commit 0005265955.

* fix(TUP-27315): log errors when copy car dependencies failed rather than
block the process

* fix(TUP-27315): log errors when copy car dependencies failed rather than
block the process
2020-06-10 09:31:38 +08:00
Roman
489125e931 fix(TDI-44128): Update axis2 dependency CVE (#4684) 2020-06-09 12:46:58 +03:00
Sizhao Liu
c0b2bae68e feat(TUP-27160): searchable connectors (for 7.3) (#4778)
* feat(TUP-27157): searchable stitch connectors

* fix the item selection issue in palette + load latest UTM params + i18n

* add category for stitch connectors + exclude overlapping connectors

* add timeout for resource loading
2020-06-08 10:59:03 +08:00
pyzhou
1f6dd38d99 fix(TDI-44196):Jdbc use origin name for dynamic (#4779) 2020-06-05 17:47:51 +08:00
chmyga
954a123f66 fix(TDI-44247): tBigQueryInput illegal operation (#4722)
* Get location from jobreference for OAuth 2.0 authentication mode

Co-authored-by: Dmytro Chmyga <dmytro.chmyga@synapse.com>
2020-06-05 11:22:17 +03:00
vyu-talend
a40d2a2379 Vyu/tdi 44214 change default driver in mssql (#4724)
* feat(TDI-44214):Change default driver to Microsoft official

* feat(tdi-44214):add migration task.

* feat(TDI-44214):modify the plugin.xml file.

* feat(TDI-44214):add tdq components in migration task

* feat(TDI-44214):change migration task.
2020-06-05 10:58:22 +08:00
jiezhang-tlnd
e20d0e57b5 feat(TUP-27259)Change default driver to Microsoft official for MSSql in Metadata (#4736)
* feat(TUP-27259)Change default driver to Microsoft official for MSSql in
Metadata
https://jira.talendforge.org/browse/TUP-27259

* Update plugin.xml

* feat(TUP-27259)Change default driver to Microsoft official for MSSql in
Metadata
https://jira.talendforge.org/browse/TUP-27259

* feat(TUP-27259)Change default driver to Microsoft official for MSSql in
Metadata
2020-06-05 09:22:09 +08:00
pyzhou
e14e19e306 feat(TDI-44216):Redshift partner tracker (#4747)
* feat(TDI-44216):Redshift partner tracker

* add tRedshiftUnload

fix bug

* add tracker for tCreateTable
2020-06-04 17:16:57 +08:00
bhe-talendbj
94534daf40 fix(TUP-27053): backport (#4766) 2020-06-04 11:21:04 +08:00
OleksiiNimych
16e8c9a4fd fix(TDI-44115): remove xmlrpc_3.1.2 from studio (#4753) 2020-06-03 17:55:12 +03:00
OleksiiNimych
59f80736a2 fix(TDI-44115): update xmlrpc-client version (#4711) 2020-06-03 17:54:21 +03:00
OleksiiNimych
511c3ccbd0 fix(TDI-44104): update xmlrpc-common version (#4703) 2020-06-03 17:53:34 +03:00
undx
dbf67ed4bb fix(TDI-44174): Component manager is not thread safe
- this fixes the case when run as independent job is checked and the
  m2.repository automatically defaults to user's m2 in exported job.
- issue on singleton will be fix by component-runtime upgrade.
2020-06-03 09:57:11 +02:00
Emmanuel GALLOIS
29a09a75bc fix(TDI-44174): Component manager is not thread safe (#4714)
* fix(TDI-44174): Component manager is not thread safe

- this fixes the case when run as independent job is checked and the
  m2.repository automatically defaults to user's m2 in exported job.
- issue on singleton will be fix by component-runtime upgrade.

(cherry picked from commit 09386aa841)
2020-06-03 09:53:56 +02:00
Dmytro Grygorenko
a73c156a6a fix(TDI-30505): Backport fix from "master" (#4761) 2020-06-01 16:02:30 +03:00
bhe-talendbj
790fe2ccb4 fix(TUP-27053): fix junit test case (#4676) (#4762) 2020-06-01 17:42:12 +08:00
hcyi
b507ddda61 fix(TUP-26683): Inputs label in documentation not the same as (#4641) (#4749)
FlowDiagram
2020-06-01 11:23:08 +08:00
OleksiiNimych
6512df89ad fix(TDI-44169): update xmlrpc-client version (#4710) 2020-05-29 14:53:22 +03:00
OleksiiNimych
a5043f56e8 fix(TDI-44105): update xmlrpc-common version (#4699) 2020-05-29 14:52:49 +03:00
Dmytro Grygorenko
c8ef5195f8 fix(TDI-44269): Set Outline ERROR_MESSAGE values. (#4743) 2020-05-29 14:02:27 +03:00
Chao MENG
2c2bb17695 feat(TUP-26569): merge known conflicts automatically (#4757)
https://jira.talendforge.org/browse/TUP-26569
2020-05-29 10:59:30 +08:00
kjwang
95400d2a90 Kjwang/feat tup 26288 enhance context b73 (#4746)
Fix TUP-26288 Enhance context propagation over reference project
https://jira.talendforge.org/browse/TUP-26288
2020-05-27 17:11:10 +08:00
wang wei
39cf036547 fix(TDI-43833): tDBBulkExec bug when using PostGress driver (#4701) 2020-05-27 14:21:56 +08:00
Zhiwei Xue
2a39dcaab8 fix(TUP-27262): fix regression from tuj of wrong param location. 2020-05-27 12:43:25 +08:00
Zhiwei Xue
34e490dd0f fix(TUP-27199): revert previous fix and remove wrapping space for
condition.
2020-05-26 11:09:58 +08:00
hwang-talend
d1f7dea73c Hwang/tup 27199 (#4692) (#4695)
Hwang/tup 27199  bugfix(TUP-27199):DB version of sybase isn't hide for other database
on
tCreateTable
2020-05-25 10:40:05 +08:00
Zhiwei Xue
c767870d82 fix(TUP-27262): tAzureAdlsGen2Output component fails with class not
found error
2020-05-22 21:42:38 +08:00
Roman
cc6a1bc1da feat(TDI-37016): Add dynamic support for tVerticaBulkExec (#4484) 2020-05-21 10:20:22 +03:00
wang wei
fee90cdd2f fix(TDI-44066): Illegal argument exception in tsapbapi name field (#4668) 2020-05-21 11:12:46 +08:00
Roman
b8e0a55fb7 fix(TDI-43812): filemask not supported by tFTPRename (#4680) 2020-05-20 15:57:07 +03:00
hzhao-talendbj
447e26d05c Hengzhao/backport73/tup 26476 (#4709)
* hengzhao backport73 tup-36467

* Tup-26476 fix missing filterKind issue (#4609)
2020-05-20 20:04:45 +08:00
Mike Yan
8a24135a74 feat(TESB-24998): Interpret context variable at endpoint for Data Services and Routes (#4708)
* feat(TESB-24998): Add context bean for tRESTReuest

* fix(TESB-24998): Fix runtime running error with quotes in url header
2020-05-20 17:41:15 +08:00
hcyi
316f2f7e96 fix(TUP-26924):tELTXXX: link name won't be updated after updating (#4697)
"default table name" in tELTInput.
2020-05-20 14:32:16 +08:00
Christophe Le Saec
9693179a6e Merge branch 'maintenance/7.3' of https://github.com/Talend/tdi-studio-se into maintenance/7.3 2020-05-19 11:18:41 +02:00
Christophe Le Saec
567abbf3d4 fix(TDI-44191) : change module for tfilecopy 2020-05-19 11:17:05 +02:00
SunChaoqun
9a3617679d TESB-27806:Expose Talend Microservices Metrics in a monitoring system like Prometheus(#4700) 2020-05-19 10:54:42 +08:00
jzhao
215cf5fe8d feat(TDI-44179):support copy command in Azure synapse bulk load (#4681)
* feat(TDI-44179):support copy command in Azure synapse bulk load



* fix(TDI-44179):create table options



* fix(TDI-44179):add column to source field mapping



* fix(TDI-44179):change some parameter to list



* fix(TDI-44179):change default load method and add migrationtask



* fix(TDI-44179):only show "error file location" for csv file format



* fix(TDI-44179):fix some issue



* hide error file location for shared access key

* support context for field index

* correct sas token field
2020-05-18 18:45:06 +08:00
AlixMetivier
21be67d243 fix(TBD-10454): with TMC strip timestamp to get hadoop conf (#4679) (#4689) 2020-05-14 15:36:20 +02:00
Zhiwei Xue
717623b206 fix(TUP-26961):When save/delete a test case, it might break the poms/CI (#4656) 2020-05-14 10:16:24 +08:00
hcyi
ea13d1115d fix(TUP-27000):Talend Salesforce Einstein connector Repository (#4671)
connection issue in Talend 7.3
2020-05-14 10:06:25 +08:00
jzhao
af52c4df65 feat(TDI-43719):Enhance Azure SQL data warehouse (#4492)
* feat(TDI-43719):rename tSQLDWHXXX component to tAzureSynapseXXX

* feat(TDI-43719):rename the reference

* feat(TDI-43719):support adls gen2 in tAzureSynapseBulkExec

* feat(TDI-43719):add migration task

* feat(TDI-43719):change the family name

* change the family name and i18n which include DWH
2020-05-13 18:22:47 +08:00
wang wei
e934d2112c fix(TDI-44159): Data viewer on tSybaseInput get error in context model with sybase 16 anywhere database(#4661) 2020-05-13 14:42:53 +08:00
Richard Lecomte
385843d3be TDI-43935 : MsSQLRow NString type for prepared statement (#4651) 2020-05-12 13:11:01 +02:00
Dmytro Sylaiev
aae6ad44b5 Dsylaiev/tdi 39575 active directory for mssql (#4584)
* feat(TDI-39575): Add AD auth support for AzureSynapse

* feat(TDI-39575): Add AD Auth support for MsSQL components

* feat(TDI-39575): Provide AD feature for tCreateTable
2020-05-12 13:21:50 +03:00
undx
a5e1f73458 fix(TCOMP-1681): fix Windows path case 2020-05-12 10:31:40 +02:00
vyu-talend
47cebcbddf Vyu/tdi 43756 fix bug in sqsclient (#4648)
* feat(TDI-43756):extends STS AssumeRole fields.

* feat(TDI-43756):extends AssumeRole fields(v2).

* feat(TDI-43756):set Session duration not required.

* feat(TDI-43756):

* feat(TDI-43756):extends fields for SQS

* feat(TDI-43756):fix the mistakes.

* feat(TDI-43756):extends fields for tAmazonEMRXXX,tAamzonRedshiftManage.

* feat(TDI-43756):optimize code.

* feat(TDI-43756):retrieve changes on S3connection.xml

* feat(TDI-43756):fix duplicated variables.

* feat(TDI-43756):fix same error

* feat(TDI-43756):optimize codes.

* feat(TDI-43756):use default region(US_WEST_2) for sts.

* feat(TDI-43756):change default to US-EAST-1.

* feat(TDI-43756):fix bug in SQSClient.

* feat(TDI-43756):fix bug in CredentialsProvider.
2020-05-12 16:09:38 +08:00
Jane Ding
0efcfa2983 bugfix(TUP-26958):Test case: possible to remove input / output node (#4633) (#4674)
bugfix(TUP-26958):Test case: possible to remove input / output node

Co-authored-by: hwang-talend <hwang@talend.com>
2020-05-12 09:25:57 +08:00
vyu-talend
76b0a7a979 Fix(TDI-43770):upgrade httpcore,httpclient,commons-logging,codec
Conflicts:
	main/plugins/org.talend.designer.components.localprovider/components/tRedshiftConnection/tRedshiftConnection_java.xml
	main/plugins/org.talend.designer.components.localprovider/components/tRedshiftInput/tRedshiftInput_java.xml
	main/plugins/org.talend.designer.components.localprovider/components/tRedshiftOutput/tRedshiftOutput_java.xml
	main/plugins/org.talend.designer.components.localprovider/components/tRedshiftRow/tRedshiftRow_java.xml
	main/plugins/org.talend.designer.components.localprovider/components/tRedshiftUnload/tRedshiftUnload_java.xml
2020-05-11 17:11:58 +08:00
vyu-talend
045d5df5df feat(TDI-43754): upgrade AWS SDK. (#4520)
Conflicts:
	main/plugins/org.talend.designer.components.localprovider/components/tRedshiftConnection/tRedshiftConnection_java.xml
	main/plugins/org.talend.designer.components.localprovider/components/tRedshiftInput/tRedshiftInput_java.xml
	main/plugins/org.talend.designer.components.localprovider/components/tRedshiftOutput/tRedshiftOutput_java.xml
	main/plugins/org.talend.designer.components.localprovider/components/tRedshiftRow/tRedshiftRow_java.xml
	main/plugins/org.talend.designer.components.localprovider/components/tRedshiftUnload/tRedshiftUnload_java.xml
2020-05-11 17:11:49 +08:00
vyu-talend
453ca6e25a feat(TDI-43756):extends STS AssumeRole fields for S3. (#4547)
* feat(TDI-43756):extends STS AssumeRole fields.

* feat(TDI-43756):extends AssumeRole fields(v2).

* feat(TDI-43756):set Session duration not required.

* feat(TDI-43756):

* feat(TDI-43756):extends fields for SQS

* feat(TDI-43756):fix the mistakes.

* feat(TDI-43756):extends fields for tAmazonEMRXXX,tAamzonRedshiftManage.

* feat(TDI-43756):optimize code.

* feat(TDI-43756):retrieve changes on S3connection.xml

* feat(TDI-43756):fix duplicated variables.

* feat(TDI-43756):fix same error

* feat(TDI-43756):optimize codes.

* feat(TDI-43756):use default region(US_WEST_2) for sts.

* feat(TDI-43756):change default to US-EAST-1.
2020-05-11 17:11:40 +08:00
Zhiwei Xue
844d9e6c29 chore(TUP-26710):update version (#4672)
* chore(TUP-26710):update version

* Set version to 7.3.1 PATCH

* chore(TUP-26710):update version for feature.xml

Co-authored-by: Jenkins Continuous Build server <jenkins@tal-rd02.talend.lan>
2020-05-11 17:03:29 +08:00
hzhao-talendbj
9d218fbecf bugfix(TUP-26186):Use of the operators =, <=, <, >=, >, <> instead of (#4639) (#4664)
* bugfix(TUP-26186):Use of the operators =, <=, <, >=, >, <> instead of
EQ, LE, LT, GE, GT, NE

* bugfix(TUP-26186):Use of the operators =, <=, <, >=, >, <> instead of
EQ, LE, LT, GE, GT, NE

* bugfix(TUP-26186):Use of the operators =, <=, <, >=, >, <> instead of
EQ, LE, LT, GE, GT, NE

Co-authored-by: hwang-talend <hwang@talend.com>
2020-05-09 09:56:00 +08:00
Jane Ding
2e2c5f810d feat(TUP-16546)Prompt users for new password in Studio Connection when (#4508) (#4657)
* feat(TUP-16546)Prompt users for new password in Studio Connection when
AD/LDAP credentials change in TAC
https://jira.talendforge.org/browse/TUP-16546

* feat(TUP-16546)Prompt users for new password in Studio Connection when
AD/LDAP credentials change in TAC
https://jira.talendforge.org/browse/TUP-16546

* feat(TUP-16546)Prompt users for new password in Studio Connection when
AD/LDAP credentials change in TAC
https://jira.talendforge.org/browse/TUP-16546

* feat(TUP-16546)Prompt users for new password in Studio Connection when
AD/LDAP credentials change in TAC
https://jira.talendforge.org/browse/TUP-16546

* feat(TUP-16546)Prompt users for new password in Studio Connection when
AD or LDAP credentials change in TAC
https://jira.talendforge.org/browse/TUP-16546

* feat(TUP-16546)Prompt users for new password in Studio Connection when
AD/LDAP credentials change in TAC
https://jira.talendforge.org/browse/TUP-16546

* feat(TUP-16546)Prompt users for new password in Studio Connection when
AD/LDAP credentials change in TAC
https://jira.talendforge.org/browse/TUP-16546

* feat(TUP-16546):Prompt users for new password in Studio Connection when
AD or LDAP credentials change in TAC
https://jira.talendforge.org/browse/TUP-16546

* feat(TUP-16546):Prompt users for new password in Studio Connection when
AD/LDAP credentials change in TAC
https://jira.talendforge.org/browse/TUP-16546
2020-05-06 00:10:34 +08:00
Jane Ding
9c25ce552b fix(TUP-26639):Talend Cloud studio Issue -Changes to Context Parameter (#4653) (#4658)
Names is not reflected on the Connection for Snowflake
https://jira.talendforge.org/browse/TUP-26639
2020-05-04 19:14:19 +08:00
pyzhou
a42b25c9bb fix(TDI-44130):move log to finally (#4652) 2020-04-30 17:31:26 +08:00
Jane Ding
7d6e7e1c85 fix(TUP-26639):Talend Cloud studio Issues - Group context and (#4634) (#4646)
* fix(TUP-26639):Talend Cloud studio Issues - Group context and
connections
https://jira.talendforge.org/browse/TUP-26639

* fix(TUP-26639):Talend Cloud studio Issues - Group context and
connections
https://jira.talendforge.org/browse/TUP-26639
2020-04-27 23:21:04 +08:00
Zhiwei Xue
cfabaf818a fix(TUP-26809):Job zip should not contain jars from testcase only (#4635) 2020-04-27 18:05:09 +08:00
undx
e2f426e39f feat(TCOMP-1681): Make ESB Studio job export TaCoKit compliant
- OSGi assembly templates
- TaCoKit Studio part
- OSGi resources
2020-04-24 17:26:33 +02:00
pyzhou
ba1bf20653 fix(TDI-44051):add the real value to the db name (#4621)
* fix(TDI-44051):add the real value to the db name

* set dbName as name when db column is null

* workaround

* change back name
2020-04-24 11:24:14 +08:00
sbovsunovskyi
063db841c0 fix(TDI-44070): Unable to execute the job, receiving "Failed to gener… (#4625)
* fix(TDI-44070): Unable to execute the job, receiving "Failed to generate code." when using tAmazonRedshiftManage component.

* fix(TDI-44070): Unable to execute the job, receiving "Failed to generate code." when using tAmazonRedshiftManage component.

(cherry picked from commit 0fecec9635)
2020-04-21 16:36:37 +03:00
OleksiiNimych
a6640f95a9 fix(TDI-43995): Support listing any path and file (#4611)
* fix(TDI-43995): Support listing any path and file

* fix(TDI-43995): Updated Apache Commons Lang library and added diamond operator

* fix(TDI-43995): Remove Apache Commons Lang library
2020-04-16 10:49:20 +03:00
hzhao-talendbj
d01f8a7da9 TUP-26388 fix missing DB context value (#4614) (#4619)
* TUP-26388 fix missing DB context value

* fix missing db value issue

* remove useless isTcompv0
2020-04-15 09:51:20 +08:00
Zhiwei Xue
f8e9e01e31 fix(TUP-26728):Missing spark dependencies when using test cases (#4602) 2020-04-09 16:05:15 +08:00
hzhao-talendbj
94ff584488 TUP-26388 fix SQL script's syntax issue (#4603) (#4604)
* TUP-26388  fix SQL script's syntax issue

* TUP-26388  fix SQL script's syntax issue
2020-04-09 10:09:47 +08:00
OleksiiNimych
1db094edd3 fix(TDI-43795): Hide Single Insert Query action and mark it deprecated (#4588) 2020-04-07 22:48:48 +03:00
hzhao-talendbj
8b9fe33a86 fix(TUP-26388)Amazon Redshift Driver class not working with Implicit (#4585) (#4594)
* fix(TUP-26388)Amazon Redshift Driver class not working with Implicit
Context

* fix(TUP-26388)Amazon Redshift Driver class not working with Implicit
Context
2020-04-07 15:42:30 +08:00
Zhiwei Xue
4782321f64 fix(TUP-26482):[Studio] Studio is very slow to build the job(the (#4546)
performance issue)
2020-04-03 12:49:38 +08:00
Zhiwei Xue
12b61b8d5f fix(TUP-26233):[7.0.1] Sometimes , the ZIP file created by a commandline (#4569)
PublishJob is not correct, missing item files.
2020-03-31 18:27:42 +08:00
wang wei
8b26ef7e15 fix(TDI-43918): fix the risk of drop table if exception appear (#4572) 2020-03-30 17:48:04 +08:00
wang wei
8ac9327375 fix(TDI-43895): Teradata metadata not populating the fields properly in components(#4570) 2020-03-29 20:01:08 +08:00
hcyi
9f4810e59e fix(TUP-26580):DI job with Big Data components fail when using the (#4564)
custom hadoop conf file location feature.
2020-03-27 11:10:53 +08:00
jiezhang-tlnd
0f89caccfb fix(TUP-25963)Spark jobs - LOG4J_RUN_LEVEL not available in item (#4562)
https://jira.talendforge.org/browse/TUP-25963
2020-03-27 11:01:12 +08:00
hzhao-talendbj
c16c8f71f8 fix column names are same (#4551) (#4567) 2020-03-26 19:22:48 +08:00
clesaec
7ab0f2015a fix(TDI-43785) - big query repeated value managed (#4557) 2020-03-25 09:29:57 +01:00
Jane Ding
af43cd8973 fix(TUP-26576):Warning pops up cannot connect to the user libraries (#4553) (#4554)
artifact repository set in administrator
https://jira.talendforge.org/browse/TUP-26576
2020-03-25 09:21:16 +08:00
Dmytro Sylaiev
4169210118 Dsylaiev/tdi 43810 add ignore service attr checkbox for xml (#4539)
* fix(TDI-43810): Fix for xml component

* fix(TDI-43810): Do not ignore service attr when checkbox is hidden

* fix(TDI-43810): Use hashset instead of arraylist

* fix(TDI-43810): Minor refactoring
2020-03-24 12:32:47 +02:00
Jane Ding
3d185eeb95 fix(TUP-26231)Relative path not working in Talend v721 (#4530) (#4550)
* fix(TUP-26231)Relative path not working in Talend v721
https://jira.talendforge.org/browse/TUP-26231

* fix(TUP-26231)Relative path not working in Talend v721
https://jira.talendforge.org/browse/TUP-26231

* fix(TUP-26231)Relative path not working in Talend v721
https://jira.talendforge.org/browse/TUP-26231

* fix(TUP-26231):Relative path not working in Talend v721
https://jira.talendforge.org/browse/TUP-26231
2020-03-24 17:44:49 +08:00
Richard Lecomte
85a8f83baa TDI-43764 : MsSQL NVARCHAR (#4518)
* TDI-43764 : MsSQL NVARCHAR

Use setNString method for NVARCHAR and NCHAR columns only for MS driver

* TDI-43764 : MsSQL NVARCHAR

Use setNString method for NTEXT columns only for MS driver
2020-03-23 09:32:41 +01:00
Richard Lecomte
d3faad612e TDI-43764 : MsSQL NVARCHAR (#4491)
* TDI-43764 : MsSQL NVARCHAR

Use setNString method for NVARCHAR and NCHAR columns

* TDI-43764 : MsSQL NVARCHAR

Use setNString method for NVARCHAR and NCHAR columns
2020-03-23 09:32:32 +01:00
SunChaoqun
059c211971 TESB-28130:Duplicate dependencies in POM.xml for routes lead to compile issues(#4534) 2020-03-18 11:29:44 +08:00
Dmytro Sylaiev
ce028761e5 Dsylaiev/tdi 43605 fix using existing connection with rest tcompv0 (#4463)
* fix(TDi-43605): Fix adding tcompv0 components into tRest globalMap copy (#4367)

* fix(TDi-43605): Fix adding tcompv0 components into tRest globalMap copy

* fix(TDI-43605): Add referenced connection into globalMap copy for marketo

* fix(TDI-43605): Fix getting snowflake connection for plenty javajet components
2020-03-10 16:22:12 +02:00
wang wei
8c2a503063 fix(TDI-43619): Null Value Treated as <TALEND_NULL> in Subjob (#4488)
* fix(TDI-43619): Null Value Treated as <TALEND_NULL> in Subjob

* fix(TDI-43619): fix for all types to avoid the parse warn log or message
when null

* fix the compiler issue for password field
2020-03-10 16:19:18 +08:00
kjwang
ca7263b7a1 fix(TUP-26189): [7.2.1] snowflake metadata connection with proxy failure (#4498) (#4503)
https://jira.talendforge.org/browse/TUP-26189
2020-03-05 14:49:20 +08:00
Zhiwei Xue
04d41a8421 fix(TUP-26132):Cannot build a job by CI (maven) after updating multiple (#4442)
job versions
2020-03-05 14:37:40 +08:00
Zhiwei Xue
d35506dce1 fix(TUP-26213):Compilation issue after migration to v7.2 (#4478) 2020-03-05 09:54:09 +08:00
kjwang
5e05ca8947 Kjwang/fix tup 26264 t elt map generated query has extra symbols (#4489) (#4500)
* Fix TUP-26264 tELTMap generated query has extra symbols generated when
more input mapping in component
https://jira.talendforge.org/browse/TUP-26264

* Fix TUP-26264 tELTMap generated query has extra symbols generated when
more input mapping in component
https://jira.talendforge.org/browse/TUP-26264
2020-03-04 11:58:55 +08:00
vyu-talend
51f8af8aed Fix(TDI-43704):update mail jar. 2020-03-03 14:28:27 +08:00
Jenkins Continuous Build server
360f1a2612 Set version to 7.3.2 SNAPSHOT 2020-02-28 13:00:24 +01:00
Irene Wang
4f668f6a46 Update NOTICE.txt to 2020 2020-02-19 12:45:17 +01:00
jiezhang-tlnd
f75fed8fd8 Jzhang/bugfix/tup 26192 patch731 (#4462)
* fix(TUP-26192)supply choice of log4j1 / 2

* fix(TUP-26192)

* fix tos

* fix tos
2020-02-18 22:06:42 +08:00
hcyi
812ac5399d fix(TUP-25229):revert the fix of "Use this Component" (#4460) 2020-02-18 17:53:55 +08:00
AlixMetivier
d917b791d0 remove useless migration task (#4452) (#4453) 2020-02-18 10:28:58 +01:00
Mike Yan
9bc4abb02d fix(TESB-28247): consumer job is missing feature.xml by CI (#4451)
* fix(TESB-28247): consumer job is missing feature.xml by CI

* fix(TESB-28247): consumer job is missing feature.xml by CI
2020-02-18 14:28:12 +08:00
Mike Yan
3daedf72de fix(TESB-28240): Use final name for osgi bundle build pom (#4449) 2020-02-18 09:34:41 +08:00
Jenkins Continuous Build server
854ac0d1b1 Set version to 7.3.1 2020-02-14 13:38:41 +01:00
900 changed files with 23073 additions and 12349 deletions

1
.gitignore vendored
View File

@@ -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

View File

@@ -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)

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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);
}
<%

View File

@@ -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);
}
<%

View File

@@ -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));

View File

@@ -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());
}

View File

@@ -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() %>");

View File

@@ -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>

View File

@@ -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());

View File

@@ -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;
}

View File

@@ -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$

View File

@@ -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>

View File

@@ -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>

View File

@@ -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;
}
}

View File

@@ -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());
}
}

View File

@@ -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>

View File

@@ -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);
}

View File

@@ -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;
}
}

View File

@@ -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;

View File

@@ -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>

View File

@@ -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;

View File

@@ -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>

View File

@@ -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);

View File

@@ -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);
}
}
}

View File

@@ -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")));
}
}

View File

@@ -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());
}
}

View File

@@ -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>

View File

@@ -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)) {
%>

View File

@@ -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)) {

View File

@@ -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="&quot;us-gov-west-1&quot;" />
<ITEM NAME="US_EAST_1" VALUE="&quot;us-east-1&quot;" />
<ITEM NAME="US_WEST_1" VALUE="&quot;us-west-1&quot;" />
<ITEM NAME="US_WEST_2" VALUE="&quot;us-west-2&quot;" />
<ITEM NAME="US_EAST_2" VALUE="&quot;us-east-2&quot;" />
<ITEM NAME="SA_EAST_1" VALUE="&quot;sa-east-1&quot;" />
<ITEM NAME="EU_WEST_1" VALUE="&quot;eu-west-1&quot;" />
<ITEM NAME="EU_CENTRAL_1" VALUE="&quot;eu-central-1&quot;" />
<ITEM NAME="EU_WEST_2" VALUE="&quot;eu-west-2&quot;" />
<ITEM NAME="EU_WEST_3" VALUE="&quot;eu-west-3&quot;" />
<ITEM NAME="EU_NORTH_1" VALUE="&quot;eu-north-1&quot;" />
<ITEM NAME="CN_NORTH_1" VALUE="&quot;cn-north-1&quot;" />
<ITEM NAME="CN_NORTHWEST_1" VALUE="&quot;cn-northwest-1&quot;" />
<ITEM NAME="AP_EAST_1" VALUE="&quot;ap-east-1&quot;" />
<ITEM NAME="AP_SOUTHEAST_1" VALUE="&quot;ap-southeast-1&quot;" />
<ITEM NAME="AP_SOUTHEAST_2" VALUE="&quot;ap-southeast-2&quot;" />
<ITEM NAME="AP_NORTHEAST_1" VALUE="&quot;ap-northeast-1&quot;" />
<ITEM NAME="AP_NORTHEAST_2" VALUE="&quot;ap-northeast-2&quot;" />
<ITEM NAME="AP_SOUTH_1" VALUE="&quot;ap-south-1&quot;" />
<ITEM NAME="CA_CENTRAL_1" VALUE="&quot;ca-central-1&quot;" />
</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>

View File

@@ -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)

View File

@@ -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="&quot;us-gov-west-1&quot;" />
<ITEM NAME="US_EAST_1" VALUE="&quot;us-east-1&quot;" />
<ITEM NAME="US_WEST_1" VALUE="&quot;us-west-1&quot;" />
<ITEM NAME="US_WEST_2" VALUE="&quot;us-west-2&quot;" />
<ITEM NAME="US_EAST_2" VALUE="&quot;us-east-2&quot;" />
<ITEM NAME="SA_EAST_1" VALUE="&quot;sa-east-1&quot;" />
<ITEM NAME="EU_WEST_1" VALUE="&quot;eu-west-1&quot;" />
<ITEM NAME="EU_CENTRAL_1" VALUE="&quot;eu-central-1&quot;" />
<ITEM NAME="EU_WEST_2" VALUE="&quot;eu-west-2&quot;" />
<ITEM NAME="EU_WEST_3" VALUE="&quot;eu-west-3&quot;" />
<ITEM NAME="EU_NORTH_1" VALUE="&quot;eu-north-1&quot;" />
<ITEM NAME="CN_NORTH_1" VALUE="&quot;cn-north-1&quot;" />
<ITEM NAME="CN_NORTHWEST_1" VALUE="&quot;cn-northwest-1&quot;" />
<ITEM NAME="AP_EAST_1" VALUE="&quot;ap-east-1&quot;" />
<ITEM NAME="AP_SOUTHEAST_1" VALUE="&quot;ap-southeast-1&quot;" />
<ITEM NAME="AP_SOUTHEAST_2" VALUE="&quot;ap-southeast-2&quot;" />
<ITEM NAME="AP_NORTHEAST_1" VALUE="&quot;ap-northeast-1&quot;" />
<ITEM NAME="AP_NORTHEAST_2" VALUE="&quot;ap-northeast-2&quot;" />
<ITEM NAME="AP_SOUTH_1" VALUE="&quot;ap-south-1&quot;" />
<ITEM NAME="CA_CENTRAL_1" VALUE="&quot;ca-central-1&quot;" />
</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>

View File

@@ -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

View File

@@ -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="&quot;us-gov-west-1&quot;" />
<ITEM NAME="US_EAST_1" VALUE="&quot;us-east-1&quot;" />
<ITEM NAME="US_WEST_1" VALUE="&quot;us-west-1&quot;" />
<ITEM NAME="US_WEST_2" VALUE="&quot;us-west-2&quot;" />
<ITEM NAME="US_EAST_2" VALUE="&quot;us-east-2&quot;" />
<ITEM NAME="SA_EAST_1" VALUE="&quot;sa-east-1&quot;" />
<ITEM NAME="EU_WEST_1" VALUE="&quot;eu-west-1&quot;" />
<ITEM NAME="EU_CENTRAL_1" VALUE="&quot;eu-central-1&quot;" />
<ITEM NAME="EU_WEST_2" VALUE="&quot;eu-west-2&quot;" />
<ITEM NAME="EU_WEST_3" VALUE="&quot;eu-west-3&quot;" />
<ITEM NAME="EU_NORTH_1" VALUE="&quot;eu-north-1&quot;" />
<ITEM NAME="CN_NORTH_1" VALUE="&quot;cn-north-1&quot;" />
<ITEM NAME="CN_NORTHWEST_1" VALUE="&quot;cn-northwest-1&quot;" />
<ITEM NAME="AP_EAST_1" VALUE="&quot;ap-east-1&quot;" />
<ITEM NAME="AP_SOUTHEAST_1" VALUE="&quot;ap-southeast-1&quot;" />
<ITEM NAME="AP_SOUTHEAST_2" VALUE="&quot;ap-southeast-2&quot;" />
<ITEM NAME="AP_NORTHEAST_1" VALUE="&quot;ap-northeast-1&quot;" />
<ITEM NAME="AP_NORTHEAST_2" VALUE="&quot;ap-northeast-2&quot;" />
<ITEM NAME="AP_SOUTH_1" VALUE="&quot;ap-south-1&quot;" />
<ITEM NAME="CA_CENTRAL_1" VALUE="&quot;ca-central-1&quot;" />
</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>

View File

@@ -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)

View File

@@ -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))
{
%>

View File

@@ -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;

View File

@@ -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) {%>

View File

@@ -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="&quot;us-gov-west-1&quot;" />
<ITEM NAME="US_EAST_1" VALUE="&quot;us-east-1&quot;" />
<ITEM NAME="US_WEST_1" VALUE="&quot;us-west-1&quot;" />
<ITEM NAME="US_WEST_2" VALUE="&quot;us-west-2&quot;" />
<ITEM NAME="US_EAST_2" VALUE="&quot;us-east-2&quot;" />
<ITEM NAME="SA_EAST_1" VALUE="&quot;sa-east-1&quot;" />
<ITEM NAME="EU_WEST_1" VALUE="&quot;eu-west-1&quot;" />
<ITEM NAME="EU_CENTRAL_1" VALUE="&quot;eu-central-1&quot;" />
<ITEM NAME="EU_WEST_2" VALUE="&quot;eu-west-2&quot;" />
<ITEM NAME="EU_WEST_3" VALUE="&quot;eu-west-3&quot;" />
<ITEM NAME="EU_NORTH_1" VALUE="&quot;eu-north-1&quot;" />
<ITEM NAME="CN_NORTH_1" VALUE="&quot;cn-north-1&quot;" />
<ITEM NAME="CN_NORTHWEST_1" VALUE="&quot;cn-northwest-1&quot;" />
<ITEM NAME="AP_EAST_1" VALUE="&quot;ap-east-1&quot;" />
<ITEM NAME="AP_SOUTHEAST_1" VALUE="&quot;ap-southeast-1&quot;" />
<ITEM NAME="AP_SOUTHEAST_2" VALUE="&quot;ap-southeast-2&quot;" />
<ITEM NAME="AP_NORTHEAST_1" VALUE="&quot;ap-northeast-1&quot;" />
<ITEM NAME="AP_NORTHEAST_2" VALUE="&quot;ap-northeast-2&quot;" />
<ITEM NAME="AP_SOUTH_1" VALUE="&quot;ap-south-1&quot;" />
<ITEM NAME="CA_CENTRAL_1" VALUE="&quot;ca-central-1&quot;" />
</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>

View File

@@ -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)

View File

@@ -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) {
%>

View File

@@ -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="&quot;mdy&quot;" />
<ITEM NAME="DMY" VALUE="&quot;dmy&quot;" />
<ITEM NAME="YMD" VALUE="&quot;ymd&quot;" />
<ITEM NAME="YDM" VALUE="&quot;ydm&quot;" />
<ITEM NAME="MYD" VALUE="&quot;myd&quot;" />
<ITEM NAME="DYM" VALUE="&quot;dym&quot;" />
</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="&quot;UTF8&quot;" />
<ITEM NAME="UTF16" VALUE="&quot;UTF16&quot;" />
</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>

View File

@@ -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

View File

@@ -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"
/>

View File

@@ -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

View File

@@ -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"
/>

View File

@@ -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