Compare commits

...

173 Commits

Author SHA1 Message Date
s.bovsunovskyi
c981e68725 patch(TPS-3928): [7.2.1] Exceptions thrown by tDotNETRow crash the JVM (TDI-43929) 2020-04-17 11:45:23 +03:00
s.bovsunovskyi
c465e337e1 patch(TPS-3928): [7.2.1] Exceptions thrown by tDotNETRow crash the JVM (TDI-43929) 2020-04-17 08:00:31 +03:00
s.bovsunovskyi
2f21627cc6 patch(TPS-3928): [7.2.1] Exceptions thrown by tDotNETRow crash the JVM (TDI-43929) 2020-04-17 07:57:12 +03:00
s.bovsunovskyi
f8c9ce00ba patch(TPS-3928): [7.2.1] Exceptions thrown by tDotNETRow crash the JVM (TDI-43929) 2020-04-16 17:21:53 +03:00
s.bovsunovskyi
05c00a1152 patch(TPS-3928): [7.2.1] Exceptions thrown by tDotNETRow crash the JVM (TDI-43929) 2020-04-14 17:33:03 +03:00
hzhao-talendbj
16fcf7d1c9 TUP-26388 fix SQL script's syntax issue (#4603) (#4605)
* TUP-26388  fix SQL script's syntax issue

* TUP-26388  fix SQL script's syntax issue
2020-04-09 10:10:13 +08:00
slushatel
42c51a8624 feat(TDI-42473): change janet-java version to 1.2 (#3829)
* feat(TDI-42473): change janet-java version to 1.2

* feat(TDI-42473): change janet-java version to 1.2

(cherry picked from commit c9c865871b)
2020-04-08 13:33:56 +03:00
hzhao-talendbj
7c625d9201 fix(TUP-26388)Amazon Redshift Driver class not working with Implicit (#4585) (#4595)
* 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:43:00 +08:00
Zhiwei Xue
39042a308b fix(TUP-26482):[Studio] Studio is very slow to build the job(the (#4546)
performance issue)
2020-04-03 12:53:52 +08:00
Zhiwei Xue
65f229036c 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:32:56 +08:00
wang wei
26b45c6f3e fix(TDI-43918): fix the risk of drop table if exception appear (#4572) 2020-03-30 17:49:40 +08:00
Dmytro Sylaiev
dc14b124c8 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:44:08 +02:00
Jane Ding
a7ae3334f8 fix(TUP-26231)Relative path not working in Talend v721 (#4530) (#4549)
* 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

Conflicts:
	main/plugins/org.talend.designer.core/src/main/java/org/talend/designer/core/runprocess/Processor.java
	main/plugins/org.talend.designer.core/src/main/java/org/talend/designer/core/ui/editor/dependencies/util/ResourceDependenciesUtil.java
2020-03-24 17:44:43 +08:00
hzhao-talendbj
e21710c699 fix column names are same (#4551) (#4552) 2020-03-24 16:43:02 +08:00
Richard Lecomte
7ac71ac864 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:31:14 +01:00
Richard Lecomte
fd37124ecd 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:30:56 +01:00
SunChaoqun
8cefa89ecd TESB-28130:Duplicate dependencies in POM.xml for routes lead to compile issues(#4535) 2020-03-18 11:30:08 +08:00
hwang-talend
56120b75bb bugfix(TUP-24728):Date and Time is not displaying when the Preferred (#4000) (#4531)
* bugfix(TUP-24728):Date and Time is not displaying when the Preferred
Language is French

* bugfix(TUP-24728):Date and Time is not displaying when the Preferred
Language is French

* bugfix(TUP-24728):Date and Time is not displaying when the Preferred
Language is French

* bugfix(TUP-24728):Date and Time is not displaying when the Preferred
Language is French
2020-03-16 11:25:57 +08:00
Dmytro Sylaiev
aafe501e22 Dsylaiev/tdi 43617 backport to 72 (#4519)
* Revert "fix(TDi-43605): Fix adding tcompv0 components into tRest globalMap copy (#4367)" (#4444)

This reverts commit d0ec3601d2.

* fix(tdi-43605) fix using existing connection with rest tcompv0

Co-authored-by: Ivan Gonchar <gonchar-ivan@users.noreply.github.com>
2020-03-10 18:50:28 +02:00
wang wei
5f14941414 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 17:27:19 +08:00
Dmytro Grygorenko
d2ff4a74ac Set logger level in org.talend.designer.codegen (#4502) 2020-03-05 15:29:38 +02:00
kjwang
aed787a905 fix(TUP-26189): [7.2.1] snowflake metadata connection with proxy failure (#4505)
fix(TUP-26189): [7.2.1] snowflake metadata connection with proxy failure
https://jira.talendforge.org/browse/TUP-26189
2020-03-05 18:24:40 +08:00
Zhiwei Xue
c5dfff2320 fix(TUP-26132):Cannot build a job by CI (maven) after updating multiple (#4442)
job versions
2020-03-05 14:43:42 +08:00
Zhiwei Xue
6e6d11bf5a fix(TUP-26213):Compilation issue after migration to v7.2 (#4478) 2020-03-05 09:59:08 +08:00
kjwang
3eaf12697f Kjwang/fix tup 26264 t elt map generated query has extra symbols (#4489) (#4499)
* 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

Conflicts:
	test/plugins/org.talend.designer.dbmap.test/src/org/talend/designer/dbmap/language/generation/DbGenerationManagerTest.java
2020-03-04 11:59:06 +08:00
Dmytro Grygorenko
ca4b013c76 Dgrygorenko/tdi 43480 (#4493)
* Partially implemented https://jira.talendforge.org/browse/TDI-33262 to remove logback

* Removed Log4j2 dependencies.

* Version number adjusted.
2020-02-28 12:09:06 +02:00
vyu-talend
754b49bf37 Fix(TDI-43704):update mail jar. 2020-02-27 11:55:03 +08:00
Jane Ding
7804c32c0c fix(TUP-25820)TMC: error show in error log when logon TMC project (#4318)
https://jira.talendforge.org/browse/TUP-25820
2020-02-20 09:20:03 +08:00
wang wei
1ea3d2e8c8 fix(TDI-43670): tSSH component hangs if Command takes time to complete (#4423) 2020-02-18 18:08:04 +08:00
kjwang
d34ed648a7 kjwang/Fix TUP-25777 Interger values are read as string after applying (#4440) (#4441)
kjwang/Fix TUP-25777 Interger values are read as string after applying  TPS-3637 (Fix failed tuj)
https://jira.talendforge.org/browse/TUP-25777
2020-02-17 18:03:26 +08:00
bhe-talendbj
ec4847911c bugfix(TUP-25409) Improve building speed of CI builder (#4253)
* bugfix(TUP-25409) Generate source code for main job only

* bugfix(TUP-25409) Resolve comments
2020-02-17 16:28:03 +08:00
Dmytro Sylaiev
5dfc5caeaa 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
2020-02-11 12:47:27 +02:00
kjwang
d08835d811 Fix: TUP-25943 tELTMap generated query has extra symbols generated (#4415) (#4424)
* Fix: TUP-25943 tELTMap generated query has extra symbols generated
https://jira.talendforge.org/browse/TUP-25943
2020-02-11 09:27:59 +08:00
ypiel
e8d6bff08d fix(TDI-43610) : jsonutil keep decimal if any
* fix(TDI-43610) : jsonutil keep decimal even if 0

* fix(TDI-43610) : jsonutil bump version to 2.4.5-talend

* fix(TDI-43610) : bump to json-lib-talend 2.4.5

* fix(TDI-43610) : bump to json-lib-talend 2.4.5

* fix(TDI-43610) : jsonutil keep decimal even if 0
2020-02-10 11:39:54 +01:00
kjwang
e6bcd0b81a Kjwang/fix tup 25777 interger values are read as string (#4403) (#4421)
* Fix TUP-25777 Integer values are read as string after applying TPS-3637
https://jira.talendforge.org/browse/TUP-25777
2020-02-10 17:34:37 +08:00
ypiel
58243b216a Revert "fix(TDI-43610) : jsonutil keep decimal if any"
This reverts commit 5cfa7b3b98.
2020-02-10 09:27:33 +01:00
ypiel
5cfa7b3b98 fix(TDI-43610) : jsonutil keep decimal if any
* fix(TDI-43610) : jsonutil keep decimal even if 0

* fix(TDI-43610) : jsonutil bump version to 2.4.5-talend

* fix(TDI-43610) : bump to json-lib-talend 2.4.5

* fix(TDI-43610) : bump to json-lib-talend 2.4.5

* fix(TDI-43610) : jsonutil keep decimal even if 0
2020-02-10 08:24:23 +01:00
hwang-talend
1d1f782cd0 Hwang/tup 25278 72 0121 (#4361)
* bugfix(TUP-25278):Issues about delete columns in tELTMap with alias

* bugfix(TUP-25278):Issues about delete columns in tELTMap with alias
2020-02-06 11:28:38 +08:00
hzhao-talendbj
e3e9c9b401 backpot72(TUP-25951)Syncing of project and pom files doesnt happen (#4393)
* backpot72(TUP-25951)Syncing of project and pom files doesnt happen
initally

* backport72(TUP-25951)Syncing of project and pom files doesnt happen
initally

* remove synchronized
2020-02-06 09:34:56 +08:00
sbovsunovskyi
08266054c0 fix(TDI-43602): Log4j object(log) in tJava will not show any result after tRedshiftClose (#4362)
(cherry picked from commit 2a6d86c39a)
2020-01-29 10:52:19 +02:00
apoltavtsev
4d944f0910 fix(TESB-27583): Maven nature is added to child Job for OSGI build 2020-01-28 09:14:33 +01:00
hcyi
c001e4245e fix(TUP-25649):ERROR when Job in MDM project calling Job in Reference DI (#4331) (#4355)
project:import routines.DataQuality cannot be resolved.
2020-01-21 15:13:03 +08:00
Chao MENG
c7c5c410db feat(TUP-25226): Make the hadoop conf jar path a contextualizable parameter in the Hadoop conf wizard (#4203) (#4347)
* feat(TUP-25226): Make the hadoop conf jar path a contextualizable
parameter in the Hadoop conf wizard

https://jira.talendforge.org/browse/TUP-25226

* fix(TUP-25585): [BUG]Data viewer failed for HDFS

https://jira.talendforge.org/browse/TUP-25585

* feat(TUP-25226): Make the hadoop conf jar path a contextualizable
parameter in the Hadoop conf wizard

https://jira.talendforge.org/browse/TUP-25226

* feat(TUP-25226): Make the hadoop conf jar path a contextualizable
parameter in the Hadoop conf wizard

https://jira.talendforge.org/browse/TUP-25226

* feat(TUP-25226): Make the hadoop conf jar path a contextualizable
parameter in the Hadoop conf wizard

https://jira.talendforge.org/browse/TUP-25226

* Revert "feat(TUP-25226): Make the hadoop conf jar path a contextualizable parameter in the Hadoop conf wizard"

This reverts commit b04d1bdca4.

* Revert "feat(TUP-25226): Make the hadoop conf jar path a contextualizable parameter in the Hadoop conf wizard"

This reverts commit 0fd1ce627b.

* Revert "feat(TUP-25226): Make the hadoop conf jar path a contextualizable parameter in the Hadoop conf wizard"

This reverts commit 434c102f8c.
2020-01-20 09:58:09 +08:00
vyu-talend
8712fc8845 Vyu/tdi 43446 fix compilation error for tmap (#4291)
* Fix(TDI-43446):fix compilation error.

* Fix(TDI-43446):fix issues.

* Fix(TDI-43446):fix a bug written by myself.

* Fix(TDI-43446):fix an issue.

* Fix(TDI-43446):fix the exception problem.

* Fix(TDI-43446):fix issue.
2020-01-13 16:01:11 +08:00
hwang-talend
268697b578 bugfix(TUP-25278):Issues about delete columns in tELTMap with alias (#4308)
bugfix(TUP-25278):Issues about delete columns in tELTMap with alias
2020-01-13 11:16:16 +08:00
hwang-talend
aa4bfa79f7 bugfix(TUP-25278):Issues about delete columns in tELTMap with alias (#4282)
* bugfix(TUP-25278):Issues about delete columns in tELTMap with alias
2020-01-03 17:50:26 +08:00
hzhao-talendbj
ca527877e2 bugfix(TUP-25035)Implicit tContextLoad feature (with selection from (#4268) (#4275)
file) uses a hardcoded encoding of ISO-8859-15
2019-12-30 10:34:02 +08:00
vyu-talend
4c4e091b14 Fix(TDI-43467):Backport to 7.2.2. 2019-12-26 11:02:10 +08:00
hwang-talend
1d40c1d03f bugfix(TUP-22500):jars already existed on nexus still try to upload (#4154)
* bugfix(TUP-22500):jars already existed on nexus still try to upload
again
2019-12-23 10:18:38 +08:00
wwang-talend
d32e660ed5 fix(TDI-43396): Compile error for S3 and tFileFetch TUJs when log4j is not enabled at default 2019-12-19 11:44:34 +08:00
Chao MENG
62e6776a9d fix(TUP-24148): tNetsuiteInput throws cast error when switching from use (#4036) (#4246)
fix(TUP-24148): tNetsuiteInput throws cast error when switching from use tNetsuiteConnection to use this component
https://jira.talendforge.org/browse/TUP-24148
2019-12-18 14:49:21 +08:00
Mike Yan
0fd6e2a5ae fix(TESB-27266):Exclude tdm-lib-di from REST DS, but keep package info (#4232) 2019-12-13 14:20:19 +08:00
bhe-talendbj
1dea872eca backport(TUP-25237) backport (#4217) 2019-12-12 15:26:40 +08:00
jiezhang-tlnd
dd3d7aab1e fix(TUP-25460)schema hardcoded in guess query in tDBInput component (#4206)
https://jira.talendforge.org/browse/TUP-25406
2019-12-09 14:22:40 +08:00
hcyi
39d9ecb7ae fix(TUP-25218):tELTXXXMap: Output table : Expression & Column set to (#4201)
blank on Mac OS X。
2019-12-09 11:06:57 +08:00
Roman
ffd480faf6 feat(TDI-42819): correct behavior whe use log file (#3862) 2019-12-05 14:29:26 +08:00
wwang-talend
d769a705f9 fix(TDI-43266): Studio returns exit code 0 when OutOfMemoryError in routine occurs 2019-12-05 09:35:29 +08:00
vyu-talend
b1e8227987 Fix(TDI-43264):ELTMSSql generate update sql. 2019-12-04 16:56:28 +08:00
wwang-talend
3729ca4734 fix(TDI-43091): Mysql8:SSLException when run job which contain ELT component 2019-12-04 10:20:08 +08:00
Dmytro Sylaiev
f1f0e3b3fa fix(TDI-41651): Add where clause support for update query (#4172) 2019-11-29 18:04:49 +02:00
Dmytro Sylaiev
751e157764 fix(TDI-41651): Provide possibility to specify alias for output table… (#3645)
* fix(TDI-41651): Provide possibility to specify alias for output table ELT

* Do the same fix as mssqlELT

* Small refactoring for query codeGen

* fix(TDI-41651): Fix issues

* Correct notion in javaxml file

* Rename cleanUp method

* Use stringUtils in alias for input table

* fix(TDI-41651): Add getters for inner class

* fix(TDI-41651): Add missing property in pom.xml

* fix(TDI-41651): Add missing i18n label

* fix(TDI-41651): Remove use alias for output field

* fix(TDI-41651): Fix conflicts
2019-11-29 18:04:28 +02:00
bhe-talendbj
d8d591f985 backport72(TUP-25257) Fix missing jobid for trunjob (#4186) 2019-11-29 18:10:33 +08:00
Chao MENG
0d52d35d65 fix(TUP-24749): [7.2.1] issue to download component jar via https proxy (#4167) (#4184)
fix(TUP-24749): [7.2.1] issue to download component jar via https proxy
https://jira.talendforge.org/browse/TUP-24749
2019-11-29 16:35:57 +08:00
kjwang
14bb82b680 bugfix(TUP-24937):Propagate changes in tELTInput schema to tELTMap (#4165) (#4180) 2019-11-29 10:52:55 +08:00
mbasiuk-talend
875273246b fix(TDI-43212): improve code generation for query string (#4149) 2019-11-26 12:10:47 +02:00
Jane Ding
9b7e750f26 fix(TUP-24732)Studio Code tab doesn't generate code/show errors in Job (#4169)
https://jira.talendforge.org/browse/TUP-24732
2019-11-26 11:39:23 +08:00
hzhao-talendbj
cfc470383e Hengzhao/bugfix/tup 25035 (#4157) (#4159)
* feat(TUP-25035)Implicit tContextLoad feature (with selection from file)
uses a hardcoded encoding of ISO-8859-15

* bugfix(TUP-25035)Implicit tContextLoad feature (with selection from
file) uses a hardcoded encoding of ISO-8859-15

* bugfix(TUP-25035)Implicit tContextLoad feature (with selection from
file) uses a hardcoded encoding of ISO-8859-15

* bugfix(TUP-25035)Implicit tContextLoad feature (with selection from
file) uses a hardcoded encoding of ISO-8859-15

* bugfix(TUP-25035)Implicit tContextLoad feature (with selection from
file) uses a hardcoded encoding of ISO-8859-15
2019-11-22 10:06:47 +08:00
AlixMetivier
90ed0e0146 cherry pick (#4158) 2019-11-21 09:35:30 +01:00
hcyi
8b09f8c12c fix(TUP-25099):NPE when using joblets from reference Projects. (#4132) (#4146) 2019-11-21 14:13:21 +08:00
wang wei
4e6719fea2 fix(TDI-39084): fail to get sap table parameter for tsapbapi and throw
NPE (#4062)

* fix(TDI-39084): fail to get sap table parameter for tsapbapi and throw
NPE

Conflicts:
	main/plugins/org.talend.repository/plugin.xml

* correct the version after merge origin/master

* fix migration

Conflicts:
	main/plugins/org.talend.repository/plugin.xml
2019-11-20 11:33:43 +08:00
AlixMetivier
a76b533335 added option to skip header with csv (#4147) 2019-11-18 11:55:20 +01:00
hcyi
4ce30defb8 fix(TUP-25218):tELTXXXMap: Output table : Expression & Column set to (#4143)
blank if you add a Column without Expression on Mac OS X.
2019-11-17 22:13:57 +08:00
hwang-talend
f297c329c9 bugfix(TUP-24884):Spark Joblets cannot be built within Parent DI job (#4124)
bugfix(TUP-24884):Spark Joblets cannot be built within Parent DI job
2019-11-15 17:21:11 +08:00
Roman
ac087dd899 feat(TDI-42766) Redshift SSO support with ping federate backport to 7.2 2019-11-13 10:19:36 +02:00
apoltavtsev
8d6aac4487 TESB-27110 Missing tSendMail dependencies are added 2019-11-08 10:27:57 +01:00
Jane Ding
f78773ba76 fix(TUP-24732) Studio Code tab doesn't generate code/show errors in Job (#4113)
https://jira.talendforge.org/browse/TUP-24732
2019-11-08 10:14:08 +08:00
hwang-talend
bff58f3865 bugfix(TUP-24884):Spark Joblets cannot be built within Parent DI job (#4101)
bugfix(TUP-24884):Spark Joblets cannot be built within Parent DI job
2019-11-07 10:16:23 +08:00
pyzhou
d60cbe30c9 fix(TDI-43105):tmap jdbc join timestamp (#4092) 2019-11-06 17:36:37 +08:00
clesaec
bfbf8d37cc TDI-42900 : usage of Thread.contextClassLoader (get/set) instead of S… (#3877)
* TDI-42900 : usage of Thread.contextClassLoader (get/set) instead of SystemClassLoader (with no cast, nor protected method call)
2019-11-05 11:08:44 +01:00
hcyi
17338305be fix(TUP-24885):tELTTeradataMap: Output table : Expression & Column set (#4048) (#4095)
to blank if you add a Column without Expression.
2019-11-05 15:26:22 +08:00
jiezhang-tlnd
99375c5886 fix(TUP-24786)Jobs are failing with the error "Cannot find or load the (#4077) (#4098)
main class" when imported the project export from 6.3 to 7.2
https://jira.talendforge.org/browse/TUP-24786
2019-11-04 15:01:55 +08:00
hwang-talend
e77b4a347c bugfix(TUP-24937):Propagate changes in tELTInput schema to tELTMap (#4087)
bugfix(TUP-24937):Propagate changes in tELTInput schema to tELTMap
2019-11-04 14:32:05 +08:00
hzhao-talendbj
069c169de5 fix(TUP-24613)routine section does not allow user to edit required (#4011) (#4091)
checkbox
2019-11-01 16:00:45 +08:00
SunChaoqun
339af1f06b TESB-27123:Context does not transmit to Job called by route in the (#4072)
second call in runtime
2019-10-28 21:49:55 +08:00
slushatel
c6d2e700a3 Sbovsunovskyi/tdi 43065 t dtd validator and utf8 (#4034)
* fix(TDI-43065): tDTDValidator fails with tDTDValidator_1 Invalid byte 2 of 3-byte UTF-8 sequence when XML file encoded in UTF-8 contains multi-bytes characters

* fix(TDI-43065): tDTDValidator fails with tDTDValidator_1 Invalid byte 2 of 3-byte UTF-8 sequence when XML file encoded in UTF-8 contains multi-bytes characters

* fix(TDI-43065): tDTDValidator fails with tDTDValidator_1 Invalid byte 2 of 3-byte UTF-8 sequence when XML file encoded in UTF-8 contains multi-bytes characters. Change default encoding to system's 'file.encoding'

(cherry picked from commit f77ff96de2)
2019-10-28 12:40:41 +02:00
kjwang
8efc0df5fa kjwang/Fix TUP-24748 CLONE - Modification in Context Variables is not (#4009) (#4047)
propagating to all jobs
https://jira.talendforge.org/browse/TUP-24748
2019-10-28 15:14:37 +08:00
Zhiwei Xue
0cf7abbc1b fix(TUP-24623):fix regression. 2019-10-28 10:11:35 +08:00
hwang-talend
1cca5a725f bugfix(TUP-24884):Spark Joblets cannot be built within Parent DI job (#4042)
bugfix(TUP-24884):Spark Joblets cannot be built within Parent DI job
2019-10-24 10:39:44 +08:00
Jane Ding
51c17366b3 fix(TUP-24540)java.lang.NoSuchMethodError: (#4053)
org.slf4j.spi.LocationAwareLogger.log
https://jira.talendforge.org/browse/TUP-24540
2019-10-22 16:16:40 +08:00
hcyi
2efd0a576b fix(TUP-24917):Upgrade tacokit to 1.1.14. (#4051) 2019-10-22 10:12:39 +08:00
Mike Yan
0d1feddcdc fix(TESB-27030): Exclude jms library when it is used from tRunJob (#4044)
* fix(TESB-27030): Avoid to add activemq-all lib in OSGi bundle

* fix(TESB-27030): Exclude jms library when it is used from tRunJob
2019-10-21 17:44:29 +08:00
hwang-talend
b63eda5b00 bugfix(TUP-24355):Default Context environment appended after migrating (#4037) (#4041)
bugfix(TUP-24355):Default Context environment appended after migrating
2019-10-18 18:13:25 +08:00
hzhao-talendbj
62076c3dde fix(TUP-24607)Not able to see the component error in the Studio Designer (#3968) (#4039)
* fix(TUP-24607)Not able to see the component error in the Studio Designer

* fix(TUP-24607)Not able to see the component error in the Studio Designer
2019-10-18 18:06:29 +08:00
Zhiwei Xue
be32d236ce fix(TUP-24623):Compilation error on the job with project references (#4010) 2019-10-18 17:48:11 +08:00
slushatel
784eddb637 fix(TDI-43010): [ADLSgen2] Short term solution for columns selector i… (#3979)
* fix(TDI-43010): [ADLSgen2] Short term solution for columns selector in Studio. Hide 'CSV schema'field
* fix(TDI-43010): [ADLSgen2] Short term solution for columns selector in Studio. Hide 'CSV schema'field. Refactoring
* fix(TDI-43010): [ADLSgen2] Short term solution for columns selector in Studio. Hide 'CSV schema'field. Add Output component check
(cherry picked from commit 47deaa8326)
2019-10-17 14:33:16 +02:00
hcyi
fceb75306c fix(TUP-24784):Build error with tRunJob on a spark job. (#4025) (#4029) 2019-10-16 17:12:32 +08:00
Jane Ding
18f58c3227 fix(TUP-24540)java.lang.NoSuchMethodError: (#4018) (#4023)
org.slf4j.spi.LocationAwareLogger.log
https://jira.talendforge.org/browse/TUP-24540
2019-10-15 09:37:40 +08:00
hwang-talend
be9e3c5f7b bugfix(TUP-24563):Specifying a custom MVN URI in a Bean still ends up (#4016)
bugfix(TUP-24563):Specifying a custom MVN URI in a Bean still ends up turning into a reference to the default 6.0.0-SNAPSHOT version
2019-10-14 16:52:44 +08:00
hwang-talend
1f22ba1d95 bugfix(TUP-24249):Added the column but not reflected to json metadata (#4006)
bugfix(TUP-24249):Added the column but not reflected to json metadata
2019-10-12 10:30:12 +08:00
pyzhou
ad128e1de4 fix(TDI-43020):S3 multipart upload minimun value. (#4003) 2019-10-11 16:35:47 +08:00
Maksym Basiuk
0255fe7ab2 fix(TDI-42834): upgrade to latest version 1.19 2019-10-10 15:10:57 +03:00
Jane Ding
a773b349c9 fix(TUP-24540)java.lang.NoSuchMethodError: (#3978) (#3997)
org.slf4j.spi.LocationAwareLogger.log
https://jira.talendforge.org/browse/TUP-24540
2019-10-09 19:28:46 +08:00
apoltavtsev
185223d211 TESB-26789 Bean called in routelet not found by main route 2019-10-09 09:52:44 +02:00
apoltavtsev
5ee921c424 TESB-26951 Dependencies from SubJob are added to manifest of ParentJob 2019-10-09 09:36:22 +02:00
Roman
31ef759a19 fix(TDI-42969): change logic to retrieve detailed filename (#3964) (#3995)
* fix(TDI-42969): change logic to retrieve detailed filename

* fix(TDI-42969): improve filenames processing with set
2019-10-09 09:03:58 +03:00
apoltavtsev
7d27951987 TESB-27081 SOAP Action missing while calling a SOAP WebService through tESBConsumer 2019-10-08 15:31:00 +02:00
Jane Ding
65de33bbe0 Jding/72/tup 22361 elt map bug in column expression while using context variable as a parameter (#3990)
* fix(TUP-22361)ELTMap bug in column expression while using context (#3938)

* fix(TUP-22361)ELTMap bug in column expression while using context
variable as a parameter
https://jira.talendforge.org/browse/TUP-22361

* fix(TUP-22361)ELTMap bug in column expression while using context
variable as a parameter
https://jira.talendforge.org/browse/TUP-22361

* fix(TUP-22361)ELTMap bug in column expression while using context
variable as a parameter
https://jira.talendforge.org/browse/TUP-22361

* fix(TUP-22361)ELTMap bug in column expression while using context
variable as a parameter
https://jira.talendforge.org/browse/TUP-22361

* fix(TUP-22361)ELTMap bug in column expression while using context
variable as a parameter
https://jira.talendforge.org/browse/TUP-22361
2019-10-08 15:30:13 +08:00
Maksym Basiuk
c7c49f64d3 fix(TDI-43025): apply fix for this issue in older studios 2019-10-01 14:25:48 +03:00
mbasiuk-talend
5c85ca8901 fix(TDI-42983): add missing parameter to method call (#3963) 2019-09-30 14:49:45 +03:00
Mike Yan
205ba4a34b fix(TESB-27046): Job run failed with pure DI license in studio (#3967) 2019-09-24 15:29:39 +08:00
hcyi
a56e6a9f87 fix(TUP-24084):Change the display of the new Couchbase component names. (#3934) (#3962) 2019-09-24 10:35:59 +08:00
wang wei
bd47c35822 fix(TDI-42187): Fix Double Checked Locking in GlobalResource (#3917)
* fix(TDI-42187): Fix Double Checked Locking in GlobalResource

* fix(TDI-42187): use more readable method

* fix(TDI-42187): use more readable method

* fix(TDI-42187): adjust the java compiler level in pom file to make the
java 8 style code works and now master use java 8, not promise java 7,
so it is ok
2019-09-23 17:45:45 +08:00
jiezhang-tlnd
18dfd7c0eb Jzhang/maintenance72/bugfix/tup 22646 path in textbox of to archive file is incomplete when building job (#3960)
* fix(TUP-22646)Path in Textbox of "To archive file" is incomplete when building job (#3931)

* fix(TUP-22646)Path in Textbox of "To archive file" is incomplete when
building job
https://jira.talendforge.org/browse/TUP-22646

* fix(TUP-22646)Path in Textbox of "To archive file" is incomplete when
building job
https://jira.talendforge.org/browse/TUP-22646

* fix(TUP-22646)Path in Textbox of "To archive file" is incomplete when (#3857)

building job
https://jira.talendforge.org/browse/TUP-22646
2019-09-23 14:45:12 +08:00
Zhiwei Xue
82b3293fa1 fix(TUP-24310):routines is duplicated in the reactor (#3909) 2019-09-23 14:22:38 +08:00
Mike Yan
1b063578fb fix(TESB-27030): Avoid to add activemq-all lib in OSGi bundle (#3956) 2019-09-23 12:46:02 +08:00
Laurent BOURGEOIS
288b8630b1 fix(TBD-9137) : tBigQueryInput does not support backtick in query 2019-09-20 12:12:23 +02:00
Roman
010e5ca7f7 fix(TDI-42034): update Redshift jar to 1.2.32.1056 (#3828) (#3950) 2019-09-20 07:47:28 +03:00
Dmytro Chmyga
87e4186271 fix(TDI-42549): tFileInputMail multipart body
* Fix multivalue body mail part processing
2019-09-19 10:53:12 +03:00
hwang-talend
0595e5008f Hwang/tup 24326 patch 72 (#3940)
* Revert "bugfix(TUP-24326):keyword "__TABLE__" not working for tJDBCxxxx
2019-09-19 15:20:25 +08:00
hcyi
093d44312b fix(TUP-23217):Install a wrong car will make all the car file installed (#3928) (#3935)
can not work.
2019-09-18 10:02:15 +08:00
hwang-talend
970e8b623f bugfix(TUP-24355):Default Context environment appended after migrating (#3927)
* bugfix(TUP-24355):Default Context environment appended after migrating
to 7.2.1
2019-09-17 10:25:39 +08:00
hwang-talend
f6bddbf553 bugfix(TUP-24311):jvm arguments not reflected on build job (#3873)
bugfix(TUP-24311):jvm arguments not reflected on build job
2019-09-17 10:13:22 +08:00
hzhao-talendbj
4a4c9ea1b1 feat(TUP-24028)Add Azure datacenter part of the studio connection (#3924) 2019-09-12 14:41:34 +08:00
hzhao-talendbj
a879db668b Hengzhao/backport72/tup 24028 add azure datacenter part of the studio connection (#3907)
* feat(TUP-24028)Add Azure datacenter part of the studio connection

* feat(TUP-24028)Add Azure datacenter part of the studio connection

* feat(TUP-24028)Add Azure datacenter part of the studio connection
2019-09-11 17:20:05 +08:00
Romain Manni-Bucau
d61cf31fc7 chore(monitoring/TUP-23824): Ensure monitoring feature can rely on system properties to configure the audit logger and does not hardcode a local file name+location+maxsize (#3699)
* Ensure monitoring feature can rely on system properties to configure the audit logger and does not hardcode a local file name+location+maxsize

* support system property monitoring even when no arg is passed to the main
2019-09-11 16:42:10 +08:00
hwang-talend
f1962c39a9 bugfix(TUP-24326):keyword "__TABLE__" not working for tJDBCxxxx (#3906)
bugfix(TUP-24326):keyword "__TABLE__" not working for tJDBCxxxx components
2019-09-11 10:08:34 +08:00
Denis Sergent
9230e47ee4 TESB-26772 Adds a way to externalise osgi-exclude.properties file (#3915)
This dev adds the opportunity to externalise osgi-exclude.properties
resource file from org.talend.repository bundle better than using the
one included in org.talend.repository budle jar file.
2019-09-09 18:23:08 +02:00
Roman
ed172de48d tWriteJSONField null values (Backport to 7.2) (#3911)
* fix(TDI-37801): tWriteJSONField null values (#3865)

* fix(TDI-37801): tWriteJSONField null values

* fix(TDI-37801): Handle nulls and empty strings correctly in json-lib

* fix(TDI-37801): Update json-lib version in components

* fix(TDI-37801): tWriteJSONField null values

* fix(TDI-37801): Fix import name

* fix(TDI-37801): remove space
2019-09-09 12:38:41 +03:00
hwang-talend
0f579c6e72 bugfix(TUP-24249):Added the column but not reflected to json metadata (#3900)
bugfix(TUP-24249):Added the column but not reflected to json metadata
2019-09-06 10:17:55 +08:00
clesaec
568088d394 Clesaec/tdi 42230 file copy patch (#3902)
* fix(TDI-42230) : utilisation de la classe standard java.nio.Files
2019-09-05 13:40:37 +02:00
wang wei
7e911f0b99 fix(TDI-42747): fix the issue for tjdbcinput with dynamic column and inside talend object type like for database type blob(#3783) 2019-09-05 11:30:15 +08:00
jiezhang-tlnd
16b2b9bf62 fix(TUP-24392)JDBCInput component not working as expected when values as provided using context (#3875) (#3880)
* fix(TUP-24392)JDBCInput component not working as expected when values as
provided using context
https://jira.talendforge.org/browse/TUP-24392

* fix(TUP-24392)JDBCInput component not working as expected when values as
provided using context
https://jira.talendforge.org/browse/TUP-24392
2019-09-03 14:47:27 +08:00
Zhiwei Xue
44aabcdecd fix(TUP-24323):_tdm folder is missing after build thmap job (#3885) 2019-09-03 10:18:46 +08:00
wang wei
839af2e2f8 fix(TDI-42522): avoid 65535 issue (#3636) (#3893) 2019-09-02 14:43:03 +08:00
Mike Yan
e89df33f76 fix(TESB-26174): Backport to 7.2 for tRunJob with tESBConsumer (#3890) 2019-08-30 15:24:53 +02:00
hwang-talend
a8c01d85da bugfix(TUP-24248):when edit the metadata, the display content is (#3879)
* bugfix(TUP-24248):when edit the metadata, the display content is
different as when created
2019-08-30 17:25:28 +08:00
slushatel
2420214bf6 fix(TDI-42789): tFilecopy not working as expected for xlsx format, wo… (#3834)
* fix(TDI-42789): tFilecopy not working as expected for xlsx format, workbook was not closed

* fix(TDI-42789): tFilecopy not working as expected for xlsx format, workbook was not closed

* fix(TDI-42789): tFilecopy not working as expected for xlsx format, workbook was not closed

* fix(TDI-42789): tFilecopy not working as expected for xlsx format, workbook was not closed
2019-08-27 13:22:26 +03:00
SunChaoqun
1c5404c12e TESB-26609:Building a route microservice docker with wrong host details (#3870)
doesn't throw any error.
2019-08-27 11:37:21 +08:00
hwang-talend
49cba020f9 bugfix(TUP-24249):Added the column but not reflected to json metadata (#3853)
bugfix(TUP-24249):Added the column but not reflected to json metadata
2019-08-27 10:39:54 +08:00
wang wei
396868b931 fix(TDI-42862): fix the ftps for java 11 (#3832)
* fix(TDI-42862): fix ftps for java 11

* fix(TDI-42862): remove the unnecessary urlpath
2019-08-26 11:33:18 +08:00
wang wei
4f429f6a98 fix(TDI-42737): [java 11] FTPS protocol for FTP components don`t work with linux and java 11 (#3764) 2019-08-26 11:32:35 +08:00
ypiel
218aa295f1 fix(TDI-42689) : Double precision within mongo
* fix(TDI-42689) : prefer BigDecimal for float&double

* fix(TDI-42689) : double precision is usually enough

* fix(TDI-42689) : Upgrade all to json-lib-2.4.2-talend
2019-08-22 14:25:25 +02:00
Jane Ding
c364565c33 fix(TUP-24129)Security vulnerabilities in Job building and contexts (#3851)
scripts in 7.1.1.
https://jira.talendforge.org/browse/TUP-24129
2019-08-22 09:31:18 +08:00
AlixMetivier
04fc9056b9 migration task for tmaprojaioutput component (#3847) 2019-08-21 14:47:46 +02:00
Jane Ding
507da793eb fix(TUP-24109)unable to test Expression Builder of tMap (#3849)
https://jira.talendforge.org/browse/TUP-24109
2019-08-21 11:09:12 +08:00
Jane Ding
9dfee4a013 Jding/72/tup 24109 unable to test expression builder (#3840)
* fix(TUP-24109)unable to test Expression Builder of tMap (#3799)

* fix(TUP-24109)unable to test Expression Builder of tMap
https://jira.talendforge.org/browse/TUP-24109

* fix(TUP-24109)unable to test Expression Builder of tMap
https://jira.talendforge.org/browse/TUP-24109

* fix(TUP-24109)unable to test Expression Builder of tMap (#3839)

https://jira.talendforge.org/browse/TUP-24109

Conflicts:
	pom.xml
2019-08-20 15:01:07 +08:00
jiezhang-tlnd
d8e2ccab3a fix(TUP-24159)XML metadata wizard showing inconsistent view on V711 (#3836)
comparing with V6 Studio
https://jira.talendforge.org/browse/TUP-24159
2019-08-20 10:25:10 +08:00
Zhiwei Xue
2b65a9840a fix(TUP-23637):7.x missing local_project for big data spark batch job (#3671) (#3823) 2019-08-16 18:53:44 +08:00
jzhao
894c21fe93 fix(TDI-42812):tRedshifBulkExec should hide access key and secret key when datasource is not S3(#3809) 2019-08-15 16:48:51 +08:00
pyzhou
b4a8746cac fix(TDI-42725):change the groupID for Exa jar (#3817) 2019-08-13 17:47:40 +08:00
jiezhang-tlnd
4cc9be4a2f fix(TUP-24159)XML metadata wizard showing inconsistent view on V711 (#3807) (#3808)
comparing with V6 Studio
https://jira.talendforge.org/browse/TUP-24159
2019-08-12 10:43:55 +08:00
Stéphane Bouchet
a3f4dc7557 TESB-26300: disable message dialog when checking build errors (#3654)
* TESB-23600 : do not open dialog anymore when checking errors

* TESB-23600 : refactor/cleanup
2019-08-09 15:23:14 +02:00
hzhao-talendbj
b2bd5439f1 fix(TUP-24034)tETLoutput schema getting changed to Built-in from (#3803)
repository when changes are made in the map
2019-08-08 20:01:21 +08:00
SunChaoqun
434ac24774 Docker_Support_for_Microservice_CI_Part_72 (#3769)
* TESB-24597:Docker Support for Microservice - CI Part

* TESB-24597:Docker Support for Microservice - CI Part

* TESB-24597:Docker Support for Microservice - CI Part

* TESB-24597:Docker Support for Microservice - CI Part (#3782)
2019-08-08 18:22:49 +08:00
hwang-talend
4d69eb252c bugfix(TUP-23967):Studio can't run jobs when path has spaces, Windows 10 (#3768) (#3789)
bugfix(TUP-23967):Studio can't run jobs when path has spaces, Windows 10
2019-08-06 18:43:06 +08:00
Chao MENG
caa3640ded Cmeng/bugfix/tup 23914 json wizard encoding (#3771) (#3777)
* fix(TUP-23914): JSON with accented characters is not being recognized
when creating a new JSON file in Metadata.
https://jira.talendforge.org/browse/TUP-23914
2019-08-06 15:50:23 +08:00
wang wei
6c067da155 fix(TDI-42687): Enable AWS ECS role for S3 component (#3770) 2019-08-06 10:18:28 +08:00
hwang-talend
c40dca2c00 bugfix(TUP-23894):Fix all failed junit for both java 8 and 11 #3761 (#3781)
bugfix(TUP-23894):Fix all failed junit for both java 8 and 11
2019-07-31 17:03:33 +08:00
wang wei
3de4dbb799 fix(TDI-42705): tSAPBwInput component gives compilation error (#3739) 2019-07-31 09:54:54 +08:00
apoltavtsev
a1151bcece TESB-24900 Undeploying a Data Service causes "Exception in opening zip file" error 2019-07-29 11:00:51 +03:00
Jane Ding
f3f89474fd fix(TUP-23789)Pom files are not generated sometimes for the jobs in (#3738) (#3754)
* fix(TUP-23789)Pom files are not generated sometimes for the jobs in
7.1.1
https://jira.talendforge.org/browse/TUP-23789

* fix(TUP-23789)Pom files are not generated sometimes for the jobs in
7.1.1
https://jira.talendforge.org/browse/TUP-23789
Add a junit.
2019-07-24 17:14:20 +08:00
hcyi
2fe67d5967 fix(TUP-23264):Studio can't find dependencies for tacokit components. (#3721)
* fix(TUP-23264):Studio can't find dependencies for tacokit components.

* fix(TUP-23264):add junits for Studio can't find dependencies for tacokit
components.
2019-07-23 12:03:02 +08:00
jiezhang-tlnd
d23c6228b7 fix(TUP-23588)For tCreateTable, the Database Type is always Mysql after dragging and dropping from database Metadata (#3714) (#3744)
* fix(TUP-23588)For tCreateTable, the Database Type is always Mysql after
dragging and dropping from database Metadata
https://jira.talendforge.org/browse/TUP-23588

* junit(TUP-23588)For tCreateTable, the Database Type is always Mysql
after dragging and dropping from database Metadata

* fix(TUP-23588)For tCreateTable, the Database Type is always Mysql after
dragging and dropping from database Metadata

* fix(TUP-23588)For tCreateTable, the Database Type is always Mysql after
dragging and dropping from database Metadata

* fix(TUP-23588)For tCreateTable, the Database Type is always Mysql after
dragging and dropping from database Metadata

* fix(TUP-23588)For tCreateTable, the Database Type is always Mysql after
dragging and dropping from database Metadata
2019-07-23 11:44:34 +08:00
pyzhou
4cb4692c9d fix(TDI-42674):Redshift missing jar for SSO (#3731)
* fix(TDI-42674):Redshift missing jar for SSO

* fix(TDI-42674):change mvn path

* fix(TDI-42674):change require to require_if
2019-07-22 17:25:21 +08:00
sponomarova
81b7b71d0f fix(TBD-8853): removed too small total timeout for service account (#3659) (#3736) 2019-07-19 12:58:04 +03:00
pyzhou
354a8b3cb9 fix(TDI-42572):upgrade EXAUtil version (#3719)
* fix(TDI-42572):upgrade EXAUtil version

* Change the mvn path
2019-07-19 15:06:33 +08:00
vyu-talend
66a15122e2 Fix(TDI-42572):Improvement for generating correct format to Exasol (#3677)
* Fix(TDI-42572):Improvement for generating correct format to Exasol

* Fix(TDI-42572):Using checkbox
2019-07-19 15:06:32 +08:00
Hanna Liashchuk
c2252e26e2 fix(TBD-8925): table won't be created unless createTable option is checked OAuth (#3686) (#3729) 2019-07-17 18:51:45 +03:00
wang wei
b62a5e2773 fix(TDI-42380): Migration issues in the Studio after migrating the jobs from 6.5 to 7.1(#3648) 2019-07-17 14:19:52 +08:00
kjwang-talend
d696e53d77 Fix TUP-23809 [Studio] changes in column order are not saved (no (#3708) (#3722)
propagate changes dialog)
https://jira.talendforge.org/browse/TUP-23809
2019-07-16 15:25:12 +08:00
slushatel
8417201494 feat(TDI-42570): stop process if parent thread has terminated, add log wrapper for tos studio (#3715)
(cherry picked from commit b4196f3ade)
2019-07-15 15:16:54 +03:00
zshen-talend
8097a8ea2e chor(TDQ-17069): remove unused code (#3658) 2019-07-15 15:50:59 +08:00
hcyi
357bde19c4 fix(TUP-23743):ERROR when Job in MDM project calling Job in Reference DI (#3709)
project:import routines.DataQuality cannot be resolved.
2019-07-15 11:40:17 +08:00
279 changed files with 9041 additions and 5995 deletions

64
PATCH_RELEASE_NOTE.md Normal file
View File

@@ -0,0 +1,64 @@
---
version: 7.2.1
module: https://talend.poolparty.biz/coretaxonomy/42
product:
- https://talend.poolparty.biz/coretaxonomy/23
---
# TPS-3928
| Info | Value |
| ---------------- | ---------------- |
| Patch Name | Patch\_20200418\_TPS-3928\_v1-7.2.1 |
| Release Date | 2020-04-18 |
| Target Version | Talend-Studio-20190620\_1446-V7.2.1 |
| Product affected | Talend Studio |
## Introduction
This is a self-contained patch.
**NOTE**: For information on how to obtain this patch, reach out to your Support contact at Talend.
## Fixed issues
This patch contains the following fixes:
- TPS-3928 [7.2.1] Exceptions thrown by tDotNETRow crash the JVM (TDI-43929)
## Prerequisites
Consider the following requirements for your system:
- Talend Studio 7.2.1 must be installed.
## Installation
### Manual installation
It needs manual installation because the file janet-win64.dll needs to be updated.
1) Unpack "plugins" folder from the archive into studio's root folder. So that the files
"tDotNETInstantiate\_java.xml", "tDotNETRow\_java.xml", "tMSAXInput\_java.xml", "tMSAXOutput\_java.xml", "tOleDbInput\_java.xml", "tOleDbOutput\_java.xml", "tOleDbRow\_java.xml"
will be replaced.
2) Find the local file "janet-win64.dll".
It should be in:
a) the folder where "java.library.path" variable points out
b) or in the %WINDIR%\System32 folder (e.g. "C:\Windows\System32")
Replace the file with one of the files either from "janet-dlls_35" or "janet-dlls_40" folder. The folders are in the patch's root.
Use "janet-dlls_35" for .NET 3.5 or "janet-dlls_40" for .NET 4.0 and higher.
## Uninstallation
Backup the Affected files list below. Uninstall the patch by restore the backup files.
## Affected files for this patch
The following files are installed by this patch:
- {Talend\_Studio\_path}/plugins/org.talend.designer.components.localprovider\_7.2.1.20190614\_0309/components/tDotNETInstantiate/tDotNETInstantiate\_java.xml
- {Talend\_Studio\_path}/plugins/org.talend.designer.components.localprovider\_7.2.1.20190614\_0309/components/tDotNETRow/tDotNETRow\_java.xml
- {Talend\_Studio\_path}/plugins/org.talend.designer.components.localprovider\_7.2.1.20190614\_0309/components/tMSAXInput/tMSAXInput\_java.xml
- {Talend\_Studio\_path}/plugins/org.talend.designer.components.localprovider\_7.2.1.20190614\_0309/components/tMSAXOutput/tMSAXOutput\_java.xml
- {Talend\_Studio\_path}/plugins/org.talend.designer.components.localprovider\_7.2.1.20190614\_0309/components/tOleDbInput/tOleDbInput\_java.xml
- {Talend\_Studio\_path}/plugins/org.talend.designer.components.localprovider\_7.2.1.20190614\_0309/components/tOleDbOutput/tOleDbOutput\_java.xml
- {Talend\_Studio\_path}/plugins/org.talend.designer.components.localprovider\_7.2.1.20190614\_0309/components/tOleDbRow/tOleDbRow\_java.xml
- janet-win64.dll (the file is in the place where java.library.path variable points out)

View File

@@ -59,90 +59,78 @@ if((codePart.equals(ECodePart.END))&&(stat || logstashCurrent)){
List<String> needToEndConnNames = new ArrayList<String>();
INode nextNode = node.getOutgoingConnections(EConnectionType.ITERATE).get(0).getTarget();
NodeUtil.fillConnectionsForStat(needToEndConnNames, nextNode);
if(!needToEndConnNames.isEmpty()) {
if(stat && logstashCurrent) {
%>
<%if(stat) {%>
runStat.updateStatAndLog(execStat,enableLogStash,iterateId,2,0<%for(String connName : needToEndConnNames){%>,"<%=connName%>"<%}%>);
<%
} else {
if(stat) {%>
if(execStat){
<%
for(String connName : needToEndConnNames){
%>
runStat.updateStatOnConnection("<%=connName%>"+iterateId,2, 0);
<%
}
%>
runStat.updateStatOnConnection(iterateId,2,0<%for(String connName : needToEndConnNames){%>,"<%=connName%>"<%}%>);
}
<%}%>
<%if(logstashCurrent) {//now only finish the log, not send, TODO%>
if(enableLogStash){
<%
for(String connName : needToEndConnNames){
%>
runStat.logStatOnConnection("<%=connName%>"+iterateId,2, 0);
<%
}
%>
runStat.log(iterateId,2,0<%for(String connName : needToEndConnNames){%>,"<%=connName%>"<%}%>);
}
<%
}
%>
<%
}
}
}
if(connSet.size()>0) {
if(stat && logstashCurrent && (connSet.size()==1)) {//the most common case, write this ugly logic for 65535 issue
for(IConnection con:connSet){
INode source = con.getSource();
String sourceNodeId = source.getUniqueName();
String sourceNodeComponent = source.getComponent().getName();
%>
<%if(stat) {%>
if(execStat){
if(resourceMap.get("inIterateVComp") == null || !((Boolean)resourceMap.get("inIterateVComp"))){
runStat.updateStatOnConnection("<%=con.getUniqueName()%>"+iterateId,2, 0);
}
}
<%}%>
<%if(logstashCurrent) {%>
if(enableLogStash){
if(resourceMap.get("inIterateVComp") == null || !((Boolean)resourceMap.get("inIterateVComp"))){
<%
for (INode jobStructureCatcher : jobCatcherNodes) {
%>
RunStat.StatBean talend_statebean = runStat.logStatOnConnection("<%=con.getUniqueName()%>"+iterateId,2, 0);
<%=jobStructureCatcher.getUniqueName() %>.addConnectionMessage(
"<%=sourceNodeId%>",
"<%=sourceNodeComponent%>",
false,
"<%="REJECT".equals(con.getConnectorName()) ? "reject" : "output"%>",
"<%=con.getUniqueName()%>",
talend_statebean.getNbLine(),
talend_statebean.getStartTime(),
talend_statebean.getEndTime()
);
<%=jobStructureCatcher.getUniqueName() %>.addConnectionMessage(
"<%=node.getUniqueName()%>",
"<%=node.getComponent().getName()%>",
true,
"input",
"<%=con.getUniqueName()%>",
talend_statebean.getNbLine(),
talend_statebean.getStartTime(),
talend_statebean.getEndTime()
);
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"%>")) {
<%=jobStructureCatcher.getDesignSubjobStartNode().getUniqueName() %>Process(globalMap);
}
<%
break;
}
}
} else {
if(stat){
%>
if(execStat){
runStat.updateStat(resourceMap,iterateId,2,0<%for(IConnection con : connSet){%>,"<%=con.getUniqueName()%>"<%}%>);
}
<%
}
if(logstashCurrent){
%>
if(enableLogStash) {
<%
for(IConnection con:connSet){
INode source = con.getSource();
String sourceNodeId = source.getUniqueName();
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"%>")) {
<%=jobStructureCatcher.getDesignSubjobStartNode().getUniqueName() %>Process(globalMap);
}
<%
break;
}
}
%>
}
}
<%}%>
<%
}
}
}
}
%>
<%

View File

@@ -146,84 +146,83 @@
boolean logstashCurrent = !cid.startsWith("tJobStructureCatcher") && !cid.startsWith("talend") && enableLogStash;
if ((codePart.equals(ECodePart.BEGIN))&&(stat || logstashCurrent)&&connSet.size()>0) {
for(IConnection con:connSet){
if(containsTPartitioner) {
%>
if(<%if(stat){%>execStat<%}%><%if(stat && logstashCurrent){%> || <%}%><%if(logstashCurrent){%>enableLogStash<%}%>) {
if(resourceMap.get("inIterateVComp") == null){
<%if(containsTPartitioner){%>
java.util.concurrent.ConcurrentHashMap<Object, Object> concurrentHashMap_<%=con.getUniqueName() %> = (java.util.concurrent.ConcurrentHashMap) globalMap.get("concurrentHashMap");
concurrentHashMap_<%=con.getUniqueName() %>.putIfAbsent("<%=con.getUniqueName() %>" + iterateLoop,new java.util.concurrent.atomic.AtomicInteger(0));
java.util.concurrent.atomic.AtomicInteger stats_<%=con.getUniqueName() %> = (java.util.concurrent.atomic.AtomicInteger) concurrentHashMap_<%=con.getUniqueName() %>.get("<%=con.getUniqueName() %>" + iterateLoop);
int step_<%=con.getUniqueName() %> = stats_<%=con.getUniqueName() %>.incrementAndGet()<=1?0:1;
<%if(stat) {%>
if(execStat) {
runStat.updateStatOnConnection("<%=con.getUniqueName() %>"+iterateId, step_<%=con.getUniqueName()%>, 0);
runStat.updateStatOnConnectionAndLog(resourceMap,globalMap,iterateLoop,iterateId,<%if(stat){%>execStat<%} else {%>false<%}%>,enableLogStash,0<%for(IConnection con : connSet){%>,"<%=con.getUniqueName()%>"<%}%>);
}
<%}%>
<%if(logstashCurrent) {%>
if(enableLogStash) {
runStat.logStatOnConnection("<%=con.getUniqueName()%>"+iterateId, step_<%=con.getUniqueName()%>, 0);
}
<%}%>
<%}else{%>
<%if(stat) {%>
if(execStat) {
runStat.updateStatOnConnection("<%=con.getUniqueName() %>"+iterateId, 0, 0);
}
<%}%>
<%if(logstashCurrent) {%>
if(enableLogStash) {
runStat.logStatOnConnection("<%=con.getUniqueName()%>"+iterateId, 0, 0);
}
<%}%>
<%}%>
}
}
<%
} else {
if(stat && logstashCurrent) {
%>
runStat.updateStatAndLog(execStat,enableLogStash,resourceMap,iterateId,0,0<%for(IConnection con : connSet){%>,"<%=con.getUniqueName()%>"<%}%>);
<%
} else {
if(stat) {
%>
if(execStat) {
runStat.updateStatOnConnection(resourceMap,iterateId,0,0<%for(IConnection con : connSet){%>,"<%=con.getUniqueName()%>"<%}%>);
}
<%
}
if(logstashCurrent) {
%>
if(enableLogStash) {
runStat.log(resourceMap,iterateId,0,0<%for(IConnection con : connSet){%>,"<%=con.getUniqueName()%>"<%}%>);
}
<%
}
}
}
}
if((codePart.equals(ECodePart.MAIN))&&(stat || logstashCurrent)&&connSet.size()>0){
for(IConnection con:connSet){
if(!node.getComponent().useMerge()) {
if(stat && logstashCurrent) {
%>
//<%=con.getUniqueName()%>
//<%=(String)codeGenArgument.getIncomingName()%>
<%if (!node.getComponent().useMerge()) {%>
<%if(stat) {%>
if(execStat){
runStat.updateStatOnConnection("<%=con.getUniqueName() %>"+iterateId,1, 1);
}
<%}%>
<%if(logstashCurrent) {%>
if(enableLogStash) {
runStat.logStatOnConnection("<%=con.getUniqueName() %>"+iterateId,1, 1);
}
<%}%>
runStat.updateStatAndLog(execStat,enableLogStash,iterateId,1,1<%for(IConnection con : connSet){%>,"<%=con.getUniqueName()%>"<%}%>);
<%
} else if(con.getUniqueName().equals((String)codeGenArgument.getIncomingName())){
} else {
if(stat) {
%>
<%if(stat) {%>
if(execStat){
runStat.updateStatOnConnection("<%=con.getUniqueName() %>"+iterateId,1, 1);
runStat.updateStatOnConnection(iterateId,1,1<%for(IConnection con : connSet){%>,"<%=con.getUniqueName()%>"<%}%>);
}
<%}%>
<%if(logstashCurrent) {%>
if(enableLogStash) {
runStat.logStatOnConnection("<%=con.getUniqueName() %>"+iterateId,1, 1);
}
<%}%>
<%}%>
<%
}
if(logstashCurrent) {
%>
if(enableLogStash) {
runStat.log(iterateId,1,1<%for(IConnection con : connSet){%>,"<%=con.getUniqueName()%>"<%}%>);
}
<%
}
}
} else {
for(IConnection connection:connSet){
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()%>"<%}}%>);
<%
} else {
if(stat) {%>
if(execStat){
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()%>"<%}}%>);
}
<%}
}
}
}
}
}
Set<IConnection> connSetForLog = new HashSet<IConnection>();
@@ -251,7 +250,7 @@
for (INode jobStructureCatcher : jobCatcherNodes) {
%>
if(enableLogStash) {
<%=jobStructureCatcher.getUniqueName() %>.addComponentMessage("<%=node.getUniqueName()%>", "<%=node.getComponent().getName()%>");
<%=jobStructureCatcher.getUniqueName() %>.addCM("<%=node.getUniqueName()%>", "<%=node.getComponent().getName()%>");
<%=jobStructureCatcher.getDesignSubjobStartNode().getUniqueName() %>Process(globalMap);
}
<%
@@ -266,46 +265,37 @@
List<String> needToStartConnNames = new ArrayList<String>();
INode nextNode = node.getOutgoingConnections(EConnectionType.ITERATE).get(0).getTarget();
NodeUtil.fillConnectionsForStat(needToStartConnNames, nextNode);
if(needToStartConnNames.isEmpty()) {
//do nothing
} else if(containsTPartitioner){
%>
if(<%if(stat){%>execStat<%}%><%if(stat && logstashCurrent){%> || <%}%><%if(logstashCurrent){%>enableLogStash<%}%>){
runStat.updateStatOnConnectionAndLog(globalMap,iterateLoop,iterateId,<%if(stat){%>execStat<%} else {%>false<%}%>,enableLogStash,0<%for(String connName : needToStartConnNames){%>,"<%=connName%>"<%}%>);
}
<%
for(String connName : needToStartConnNames){
} else {
if(stat && logstashCurrent) {
%>
runStat.updateStatAndLog(execStat,enableLogStash,iterateId,0,0<%for(String connName : needToStartConnNames){%>,"<%=connName%>"<%}%>);
<%
} else {
if(stat){
%>
<%if(containsTPartitioner){%>
java.util.concurrent.ConcurrentHashMap<Object, Object> concurrentHashMap_<%=connName%> = (java.util.concurrent.ConcurrentHashMap) globalMap.get("concurrentHashMap");
concurrentHashMap_<%=connName%>.putIfAbsent("<%=connName%>" + iterateLoop,new java.util.concurrent.atomic.AtomicInteger(0));
java.util.concurrent.atomic.AtomicInteger stats_<%=connName%> = (java.util.concurrent.atomic.AtomicInteger) concurrentHashMap_<%=connName%>.get("<%=connName%>" + iterateLoop);
int step_<%=connName %> = stats_<%=connName%>.incrementAndGet()<=1?0:1;
<%if(stat) {%>
if(execStat){
runStat.updateStatOnConnection("<%=connName%>"+iterateId, step_<%=connName%>, 0);
runStat.updateStatOnConnection(iterateId,0,0<%for(String connName : needToStartConnNames){%>,"<%=connName%>"<%}%>);
}
<%}%>
<%if(logstashCurrent) {%>
if(enableLogStash) {
runStat.logStatOnConnection("<%=connName%>"+iterateId, step_<%=connName%>, 0);
}
<%}%>
<%}else{%>
<%if(stat) {%>
if(execStat) {
runStat.updateStatOnConnection("<%=connName%>"+iterateId, 0, 0);
}
<%}%>
<%if(logstashCurrent) {%>
if(enableLogStash) {
runStat.logStatOnConnection("<%=connName%>"+iterateId, 0, 0);
}
<%}%>
<%}%>
<%
}
%>
<%if(logstashCurrent) {%>
if(enableLogStash){
runStat.log(iterateId,0,0<%for(String connName : needToStartConnNames){%>,"<%=connName%>"<%}%>);
}
<%
}
}
}
}else if(codePart.equals(ECodePart.MAIN)){
%>
resourceMap.put("inIterateVComp", true);

View File

@@ -106,6 +106,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) {
@@ -165,6 +180,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) {
@@ -445,6 +462,7 @@
lastStr = "";
}
}
enableLogStash = "true".equalsIgnoreCase(System.getProperty("monitoring"));
<%if(isLog4jEnabled){%>
if(!"".equals(log4jLevel)){
@@ -494,6 +512,12 @@
properties_<%=jobCatcherNode.getUniqueName()%>.setProperty("appender.file.maxbackup", "20");
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)));
org.apache.log4j.Logger.getLogger("audit").setLevel(org.apache.log4j.Level.DEBUG);
auditLogger_<%=jobCatcherNode.getUniqueName()%> = org.talend.job.audit.JobEventAuditLoggerFactory.createJobAuditLogger(properties_<%=jobCatcherNode.getUniqueName()%>);
}
<%
@@ -584,7 +608,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()%>");
@@ -602,13 +635,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()%>");
@@ -667,6 +694,10 @@
}
<%
}
%>
<%//{B1 block%>
}
<%
}
%>
} <%/*close last method*/%>
@@ -1440,12 +1471,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) { %>
@@ -1509,12 +1542,10 @@ if (execStat) {
}
} else if (arg.startsWith("--log4jLevel=")) {
log4jLevel = arg.substring(13);
} else if (arg.startsWith("--monitoring=")) {//for trunjob call
enableLogStash = "true".equalsIgnoreCase(arg.substring(13));
}
if(!enableLogStash) {
enableLogStash = "true".equalsIgnoreCase(System.getProperty("monitoring"));
} else if (arg.startsWith("--monitoring") && 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

@@ -71,15 +71,11 @@ if(hasInput){
}
boolean hasValidInput = inputConn!=null;
IMetadataTable metadata = null;
List<IMetadataTable> metadatas = node.getMetadataList();
boolean haveValidNodeMetadata = ((metadatas != null) && (metadatas.size() > 0) && (metadata = metadatas.get(0)) != null);
if (hasValidInput && haveValidNodeMetadata) {
if (hasValidInput) {
List<IMetadataColumn> input_columnList = inputConn.getMetadataTable().getListColumns();
if (input_columnList!=null && !input_columnList.isEmpty()) {
if(input_columnList == null) {
input_columnList = new ArrayList<IMetadataColumn>();
}
// add incoming (not present) columns to enforcer for this comps
if (cid.contains("tDataStewardship") || cid.contains("tMarkLogic")){
%>
@@ -209,6 +205,5 @@ if(hasInput){
<%
}
}
}
} // canStart
%>

View File

@@ -139,7 +139,7 @@ for (INode node : process.getNodesOfType("tRESTClient")) {
}
boolean talendEsbJobFactory = actAsProvider || !process.getNodesOfType("tRouteInput").isEmpty();
boolean talendEsbJob = talendEsbJobFactory || actAsConsumer || ProcessorUtilities.isEsbJob(process.getId(), process.getVersion());
boolean talendEsbJob = talendEsbJobFactory || actAsConsumer || ProcessorUtilities.isEsbJob(process);
boolean isLog4jEnabled = ("true").equals(ElementParameterParser.getValue(process, "__LOG4J_ACTIVATE__"));
@@ -290,6 +290,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)
{

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

@@ -94,7 +94,7 @@ public class JavaRoutineSynchronizer extends AbstractRoutineSynchronizer {
private void syncRoutineItems(Collection<RoutineItem> routineObjects, boolean forceUpdate) throws SystemException {
for (RoutineItem routineItem : routineObjects) {
syncRoutine(routineItem, true, true, forceUpdate);
syncRoutine(routineItem, true, forceUpdate);
}
syncSystemRoutine(ProjectManager.getInstance().getCurrentProject());
}

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,22 +837,20 @@ 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

@@ -2,7 +2,6 @@
<project name="org.talend.designer.components.libs" default="buildall" basedir=".">
<target name="buildall">
<ant antfile="filecopy/build.xml" target="process" inheritall="no" />
<ant antfile="talend_file_enhanced_20070724/build.xml" target="process" inheritall="no" />
<ant antfile="sugarCRMManagement/build.xml" target="process" inheritall="no" />
<ant antfile="TalendSAX/build.xml" target="process" inheritall="no" />

View File

@@ -41,7 +41,7 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>1.10</version>
<version>1.19</version>
</dependency>
</dependencies>
<build>

View File

@@ -1,9 +1,9 @@
<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>
<groupId>org.talend.libraries</groupId>
<groupId>org.talend.components.lib</groupId>
<artifactId>commons-net-ftps-proxy</artifactId>
<version>3.6.1-talend-20190128</version>
<version>3.6.1-talend-20190819</version>
<name>commons-net-talend</name>

View File

@@ -3,6 +3,7 @@ package org.talend.ftp;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.net.Socket;
import java.net.InetAddress;
import java.util.Locale;
import javax.net.ssl.SSLContext;
@@ -29,11 +30,13 @@ public class SSLSessionReuseFTPSClient extends FTPSClient {
final Object cache = sessionHostPortCache.get(context);
final Method putMethod = cache.getClass().getDeclaredMethod("put", Object.class, Object.class);
putMethod.setAccessible(true);
final Method getHostMethod = socket.getClass().getDeclaredMethod("getHost");
getHostMethod.setAccessible(true);
Object host = getHostMethod.invoke(socket);
final String key =
String.format("%s:%s", host, String.valueOf(socket.getPort())).toLowerCase(Locale.ROOT);
InetAddress address = socket.getInetAddress();
int port = socket.getPort();
String key = String.format("%s:%s", address.getHostName(), String.valueOf(port)).toLowerCase(Locale.ROOT);
putMethod.invoke(cache, key, session);
key = String.format("%s:%s", address.getHostAddress(), String.valueOf(port)).toLowerCase(Locale.ROOT);
putMethod.invoke(cache, key, session);
} catch (Exception e) {
e.printStackTrace();

View File

@@ -0,0 +1,3 @@
.classpath
.project
target/

View File

@@ -1,88 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="org.talend.designer.components.libs" default="process" basedir=".">
<property name="component.plugin.home" value="../../../org.talend.designer.components.localprovider/components" />
<!-- #################################################### -->
<!-- modification 1: config -->
<property name="jar.name" value="filecopy.jar" />
<property name="component.name" value="tFileCopy" />
<property name="author.name" value="wyang" />
<!-- modification 2: compile classpath -->
<path id="compile.classpath">
</path>
<!-- #################################################### -->
<!-- sourcecode and final jar path -->
<property name="source.home" value="." />
<property name="jar.home" value="${component.plugin.home}/${component.name}/${jar.name}" />
<!-- temp dir for clasee files -->
<property name="build.dir" value="../../build" />
<!-- compile option -->
<property name="compile.debug" value="true" />
<property name="compile.deprecation" value="false" />
<property name="compile.optimize" value="true" />
<target name="process" description="prepare a temp dir">
<antcall target="prepare" />
<antcall target="compile" />
<antcall target="clean" />
</target>
<target name="prepare" description="prepare a temp dir">
<delete dir="${build.dir}" />
<mkdir dir="${build.dir}" />
<mkdir dir="${build.dir}/classes" />
</target>
<target name="compile" description="Compile Java sources">
<!-- compile -->
<javac srcdir="${source.home}" destdir="${build.dir}/classes" debug="${compile.debug}" deprecation="${compile.deprecation}" optimize="${compile.optimize}">
<classpath refid="compile.classpath" />
</javac>
<!-- include source code -->
<copy todir="${build.dir}/classes">
<fileset dir="${source.home}">
<exclude name="build.xml" />
</fileset>
</copy>
<!-- make jar -->
<tstamp>
<format property="date" pattern="yyyy-MM-dd HH:mm:ss" />
</tstamp>
<jar destfile="${build.dir}/${jar.name}" basedir="${build.dir}/classes">
<manifest>
<!-- who -->
<attribute name="Built-By" value="${author.name}" />
<!-- when -->
<attribute name="Built-Date" value="${date}"/>
<!-- JDK version -->
<attribute name="Created-By" value="${java.version} (${java.vendor})" />
<!-- Information about the program itself -->
<attribute name="Implementation-Vendor" value="Talend SA" />
<attribute name="Implementation-Title" value="${jar.name}" />
<attribute name="Implementation-Version" value="1.0" />
</manifest>
</jar>
<!-- move jar -->
<move file="${build.dir}/${jar.name}" tofile="${jar.home}" />
</target>
<target name="clean" description="clean the temp dir">
<delete dir="${build.dir}" />
<mkdir dir="${build.dir}" />
</target>
</project>

View File

@@ -1,190 +0,0 @@
// ============================================================================
//
// Copyright (C) 2006-2019 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.lang.reflect.Method;
import java.nio.MappedByteBuffer;
import java.nio.channels.FileChannel;
import java.security.AccessController;
import java.security.PrivilegedAction;
/**
* DOC Administrator class global comment. Detailled comment
*/
public class FileCopy {
private final static long L_SIZE = 100 * 1024 * 1024; // 100M
private final static long M_SIZE = 10 * 1024 * 1024; // 10M
private final static long S_SIZE = 0; // 0M
public static void copyFile(String srcFileName, String desFileName, boolean delSrc) throws Exception {
FileInputStream srcInputStream = null;
try{
srcInputStream = new FileInputStream(srcFileName);
long lastModified = new File(srcFileName).lastModified();
int available = srcInputStream.available();
if (available > L_SIZE) {// X > 100M
copyFileL(srcFileName, srcInputStream, desFileName, delSrc);
} else if (available > M_SIZE) {// 10M < X <100M
copyFileM(srcFileName, srcInputStream, desFileName, delSrc);
} else { // X < 10M
copyFileS(srcFileName, srcInputStream, desFileName, delSrc);
}
// keep modification_time
new File(desFileName).setLastModified(lastModified);
}finally{
if(srcInputStream!=null){
srcInputStream.close();
}
}
}
private static void copyFileS(String srcFileName, FileInputStream srcInputStream, String desFileName, boolean delSrc)
throws IOException {
File source = new File(srcFileName);
File dest = new File(desFileName);
FileInputStream in = null;
FileOutputStream out = null;
try {
in = srcInputStream;
out = new FileOutputStream(dest);
byte[] buf = new byte[1024];
int len = 0;
while ((len = in.read(buf)) != -1) {
out.write(buf, 0, len);
}
in.close();
out.close();
if (delSrc) {
source.delete();
}
} finally {
if (in != null) {
in.close();
}
if (out != null) {
out.close();
}
}
}
private static void copyFileM(String srcFileName, FileInputStream srcInputStream, String desFileName, boolean delSrc)
throws IOException {
File source = new File(srcFileName);
File dest = new File(desFileName);
FileChannel in = null;
FileChannel out = null;
try {
in = srcInputStream.getChannel();
out = new FileOutputStream(dest).getChannel();
int maxCount = (32 * 1024 * 1024) - (28 * 1024);
long size = in.size();
long position = 0;
while (position < size) {
position += in.transferTo(position, maxCount, out);
}
in.close();
out.close();
if (delSrc) {
source.delete();
}
} finally {
if (in != null) {
in.close();
}
if (out != null) {
out.close();
}
}
}
private static void copyFileL(String srcFileName, FileInputStream srcInputStream, String desFileName, boolean delSrc)
throws Exception {
File source = new File(srcFileName);
File dest = new File(desFileName);
FileChannel in = null, out = null;
try {
in = srcInputStream.getChannel();
out = new FileOutputStream(dest).getChannel();
long size = in.size();
long position = 0;
final long MAP_SIZE = 33525760;
MappedByteBuffer buf = null;
while (true) {
if (position + MAP_SIZE >= size) {
buf = in.map(FileChannel.MapMode.READ_ONLY, position, size - position);
out.write(buf);
//For But TDI-26493, here must clean first, or it can't delete
clean(buf);
break;
} else {
buf = in.map(FileChannel.MapMode.READ_ONLY, position, MAP_SIZE);
out.write(buf);
// here must clean first, or it can't delete
clean(buf);
position += MAP_SIZE;
}
}
in.close();
out.close();
if (delSrc) {
source.delete();
}
} finally {
if (in != null) {
in.close();
}
if (out != null) {
out.close();
}
}
}
@SuppressWarnings("unchecked")
private static void clean(final Object buffer) throws Exception {
AccessController.doPrivileged(new PrivilegedAction() {
public Object run() {
try {
Method getCleanerMethod = buffer.getClass().getMethod("cleaner", new Class[0]);
getCleanerMethod.setAccessible(true);
sun.misc.Cleaner cleaner = (sun.misc.Cleaner) getCleanerMethod.invoke(buffer, new Object[0]);
cleaner.clean();
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
});
}
}

View File

@@ -0,0 +1,73 @@
<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>
<groupId>org.talend.libraries</groupId>
<artifactId>filecopy</artifactId>
<version>2.0.0</version>
<packaging>jar</packaging>
<name>talend-copy</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<talend.nexus.url>https://artifacts-oss.talend.com</talend.nexus.url>
<java.source.version>1.8</java.source.version>
<junit5.version>5.4.2</junit5.version>
</properties>
<distributionManagement>
<snapshotRepository>
<id>talend_nexus_deployment</id>
<url>${talend.nexus.url}/nexus/content/repositories/TalendOpenSourceSnapshot/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>false</enabled>
</releases>
</snapshotRepository>
<repository>
<id>talend_nexus_deployment</id>
<url>${talend.nexus.url}/nexus/content/repositories/TalendOpenSourceRelease/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
</distributionManagement>
<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit5.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit5.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>${java.source.version}</source>
<target>${java.source.version}</target>
<showDeprecation>true</showDeprecation>
<showWarnings>true</showWarnings>
<fork>true</fork>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@@ -0,0 +1,49 @@
// ============================================================================
//
// Copyright (C) 2006-2019 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.StandardCopyOption;
/**
* DOC Administrator class global comment. Detailled comment
*/
public class FileCopy {
/** Private constructor, only static methods */
private FileCopy() {
}
/**
* Copy files.
*
* @param srcFileName : file name for source file.
* @param desFileName : file name for destination file.
* @param delSrc : true if delete source.
* @throws IOException : if IO pb.
*/
public static void copyFile(String srcFileName, String desFileName, boolean delSrc) throws IOException {
final File source = new File(srcFileName);
final File destination = new File(desFileName);
if (delSrc) {
// move : more efficient if in same FS and mustr delete existing file.
Files.move(source.toPath(), destination.toPath(), StandardCopyOption.REPLACE_EXISTING);
} else {
Files.copy(source.toPath(), destination.toPath(), StandardCopyOption.REPLACE_EXISTING);
}
}
}

View File

@@ -0,0 +1,128 @@
package org.talend;
import java.io.BufferedWriter;
import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.nio.file.Files;
import java.nio.file.StandardOpenOption;
import java.util.concurrent.TimeUnit;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
/**
* Test for FileCopy.class with diffents file size.
*
* @author clesaec
*
*/
class FileCopyTest {
@Test
void testCopyFile() throws Exception {
final URL repCopy = Thread.currentThread().getContextClassLoader().getResource("copy");
File small = this.buildFile("small.txt", 10L * 1024L);
small.deleteOnExit();
File smallCopy = new File(repCopy.getPath(), "small.txt");
smallCopy.deleteOnExit();
FileCopy.copyFile(small.getPath(), smallCopy.getPath(), false);
Assertions.assertTrue(smallCopy.exists(), "small file fail to copy (not created)");
Assertions.assertTrue(small.exists(), "small file : original file deleted");
Assertions.assertEquals(smallCopy.length(), small.length(), "Size error");
File medium = this.buildFile("medium.txt", 30L * 1024L * 1024L);
medium.deleteOnExit();
File mediumCopy = new File(repCopy.getPath(), "medium.txt");
mediumCopy.deleteOnExit();
FileCopy.copyFile(medium.getPath(), mediumCopy.getPath(), false);
Assertions.assertTrue(mediumCopy.exists(), "medium file fail to copy (not created)");
Assertions.assertTrue(medium.exists(), "medium file : original file deleted");
Assertions.assertEquals(mediumCopy.length(), medium.length(), "Size error");
File large = this.buildFile("large.txt", 110L * 1024L * 1024L);
large.deleteOnExit();
long startTime = System.nanoTime();
File largeCopy = new File(repCopy.getPath(), "large.txt");
long duration = System.nanoTime() - startTime;
System.out.println("Duration for 110 Mo file : " + TimeUnit.NANOSECONDS.toMicros(duration) + " µs");
largeCopy.deleteOnExit();
FileCopy.copyFile(large.getPath(), largeCopy.getPath(), false);
Assertions.assertTrue(largeCopy.exists(), "small file fail to copy (not created)");
Assertions.assertTrue(large.exists(), "small file : original file deleted");
Assertions.assertEquals(largeCopy.length(), large.length(), "Size error");
}
@Test
void testCopyMv() throws Exception {
final URL repCopy = Thread.currentThread().getContextClassLoader().getResource("copy");
File file = this.buildFile("fileToMove.txt", 10L * 1024L);
file.deleteOnExit();
File copy = new File(repCopy.getPath(), "fileToMove.txt");
long referenceSize = file.length();
if (copy.exists()) {
copy.delete();
}
copy.deleteOnExit();
FileCopy.copyFile(file.getPath(), copy.getPath(), true);
Assertions.assertFalse(file.exists(), "file not delete");
Assertions.assertTrue(copy.exists(), "small file : original file deleted");
Assertions.assertEquals(referenceSize, copy.length(), "Size error");
}
@Test
void testCopyWithDelete() throws Exception {
final URL repCopy = Thread.currentThread().getContextClassLoader().getResource("copy");
File file = this.buildFile("fileToDelete.txt", 10L * 1024L);
file.deleteOnExit();
File copy = new File(repCopy.getPath(), "fileToDelete.txt");
long referenceSize = file.length();
if (!copy.exists()) {
copy.createNewFile();
}
copy.deleteOnExit();
FileCopy.copyFile(file.getPath(), copy.getPath(), true);
Assertions.assertFalse(file.exists(), "file not delete");
Assertions.assertTrue(copy.exists(), "small file : original file deleted");
Assertions.assertEquals(referenceSize, copy.length(), "Size error");
}
/**
* Generate a new file for testing.
*
* @param name : name of file.
* @param minSize : minimum size.
* @return the new file.
* @throws IOException : on IO pb.
*/
private File buildFile(String name, long minSize) throws IOException {
final URL repGenerated = Thread.currentThread().getContextClassLoader().getResource("generated");
final File generatedFile = new File(repGenerated.getPath(), name);
if (generatedFile.exists()) {
generatedFile.delete();
}
final String data = "{ data to put in generated file for it have the desired sized }" + System.lineSeparator();
long nbeIteration = (minSize / data.length()) + 1;
try (BufferedWriter writer = Files.newBufferedWriter(generatedFile.toPath(), StandardOpenOption.CREATE)) {
for (long i = 0; i < nbeIteration; i++) {
writer.append(data);
}
}
return generatedFile;
}
}

View File

@@ -0,0 +1 @@
Just here to not have an empty directory.

View File

@@ -0,0 +1 @@
Just here to not have an empty directory.

View File

@@ -7,7 +7,7 @@
<groupId>net.sf.json-lib</groupId>
<artifactId>json-lib</artifactId>
<packaging>jar</packaging>
<version>2.4.1-talend</version>
<version>2.4.5-talend</version>
<name>json-lib</name>
<properties>

View File

@@ -15,6 +15,7 @@
*/
package net.sf.json.util;
import java.math.BigDecimal;
import net.sf.json.JSONArray;
import net.sf.json.JSONException;
import net.sf.json.JSONNull;
@@ -414,7 +415,7 @@ public class JSONTokener {
}
try{
return NumberUtils.createNumber(s);
return createNumber(s);
}catch( Exception e ){
return s;
}
@@ -435,6 +436,26 @@ public class JSONTokener {
return s;
}
/**
* This method has been added to fix https://jira.talendforge.org/browse/TDI-42689
*
* @param s The String representation of the number
* @return The Number instance
*/
private Number createNumber(String s){
boolean isDecimal = s.indexOf('.') != -1;
if(isDecimal){
Double d = Double.valueOf(s);
if(Double.POSITIVE_INFINITY == Math.abs(d)){
return new BigDecimal(s);
}
return d;
}
return NumberUtils.createNumber(s);
}
/**
* Look at the next character in the source string.
*

View File

@@ -104,14 +104,15 @@ public final class JSONUtils {
return "null";
}
// Shave off trailing zeros and decimal point, if possible.
// Shave off trailing zeros. Keep decimal to keep type double
String s = Double.toString( d );
if( s.indexOf( '.' ) > 0 && s.indexOf( 'e' ) < 0 && s.indexOf( 'E' ) < 0 ){
while( s.endsWith( "0" ) ){
s = s.substring( 0, s.length() - 1 );
while(s.charAt(s.length() - 1) == '0'){
if(s.endsWith(".0")){
break;
}
if( s.endsWith( "." ) ){
s = s.substring( 0, s.length() - 1 );
}
}
@@ -184,14 +185,12 @@ public final class JSONUtils {
return Integer.class;
}else if( isLong( n ) ){
return Long.class;
}else if( isFloat( n ) ){
return Float.class;
}else if( isBigInteger( n ) ){
return BigInteger.class;
}else if( isBigDecimal( n ) ){
return BigDecimal.class;
}else if( isDouble( n ) ){
return Double.class;
}else if( isBigDecimal( n ) ){
return BigDecimal.class;
}else{
throw new JSONException( "Unsupported type" );
}
@@ -442,17 +441,19 @@ public final class JSONUtils {
}
testValidity( n );
// Shave off trailing zeros and decimal point, if possible.
// Shave off trailing zeros. Keep decimal to keep type double
String s = n.toString();
if( s.indexOf( '.' ) > 0 && s.indexOf( 'e' ) < 0 && s.indexOf( 'E' ) < 0 ){
while( s.endsWith( "0" ) ){
s = s.substring( 0, s.length() - 1 );
while(s.charAt(s.length() - 1) == '0'){
if(s.endsWith(".0")){
break;
}
if( s.endsWith( "." ) ){
s = s.substring( 0, s.length() - 1 );
}
}
return s;
}

View File

@@ -163,6 +163,11 @@ public class XMLSerializer {
*/
private boolean useLongDecimals;
/**
* flag for if parse empty elements as empty strings
*/
private boolean useEmptyStrings;
/**
* Creates a new XMLSerializer with default options.<br>
* <ul>
@@ -803,6 +808,8 @@ public class XMLSerializer {
clazz = JSONTypes.OBJECT;
}else if( JSONTypes.ARRAY.compareToIgnoreCase( clazzText ) == 0 ){
clazz = JSONTypes.ARRAY;
} else if(JSONTypes.STRING.equalsIgnoreCase(clazzText)) {
clazz = JSONTypes.STRING;
}
}
return clazz;
@@ -1414,6 +1421,8 @@ public class XMLSerializer {
String text = element.getValue();
params = StringUtils.split( paramsAttribute.getValue(), "," );
setOrAccumulate( jsonObject, key, new JSONFunction( params, text ) );
} else if( useEmptyStrings && clazz != null && clazz.equalsIgnoreCase(JSONTypes.STRING) ) {
setTextValue(jsonObject, key, element);
}else{
if( isArray( element, false ) ){
setOrAccumulate( jsonObject, key, processArrayElement( element, defaultType ) );
@@ -1421,6 +1430,14 @@ public class XMLSerializer {
setOrAccumulate( jsonObject, key, simplifyValue( jsonObject,
processObjectElement( element, defaultType ) ) );
}else{
setTextValue(jsonObject, key, element);
}
}
}
}
}
private void setTextValue(final JSONObject jsonObject, final String key, final Element element) {
String value;
if( isKeepCData && isCData( element ) ){
value = "<![CDATA[" + element.getValue() + "]]>";
@@ -1429,10 +1446,6 @@ public class XMLSerializer {
}
setOrAccumulate( jsonObject, key, trimSpaceFromValue( value ) );
}
}
}
}
}
private boolean isCData( Element element ) {
if( element.getChildCount() == 1 ){
@@ -1493,6 +1506,14 @@ public class XMLSerializer {
return str;
}
public void setUseEmptyStrings(boolean useEmptyStrings) {
this.useEmptyStrings = useEmptyStrings;
}
public boolean isUseEmptyStrings() {
return this.useEmptyStrings;
}
private static class CustomElement extends Element {
private static String getName( String name ) {
int colon = name.indexOf( ':' );

View File

@@ -27,6 +27,7 @@ import net.sf.json.processors.PropertyNameProcessor;
import net.sf.json.sample.BeanA;
import net.sf.json.sample.BeanB;
import net.sf.json.sample.BeanC;
import net.sf.json.sample.BeanD;
import net.sf.json.sample.BeanFoo;
import net.sf.json.sample.BeanWithFunc;
import net.sf.json.sample.ChildBean;
@@ -1042,6 +1043,17 @@ public class TestJSONObject extends TestCase {
JSONArray.toArray( jsonObject.getJSONArray( "intarray" ) ) );
}
public void testToBean_BeanD() {
String json = "{bool:true,integer:1,string:\"json\",doublearray:[4.2424245783E7, 123456789.2424245783E7, 6.0]}";
JSONObject jsonObject = JSONObject.fromObject( json );
BeanD bean = (BeanD) JSONObject.toBean( jsonObject, BeanD.class );
assertEquals( jsonObject.get( "bool" ), Boolean.valueOf( bean.isBool() ) );
assertEquals( jsonObject.get( "integer" ), new Integer( bean.getInteger() ) );
assertEquals( jsonObject.get( "string" ), bean.getString() );
Assertions.assertEquals( bean.getDoublearray(),
JSONArray.toArray( jsonObject.getJSONArray( "doublearray" ) ) );
}
public void testToBean_ClassBean() {
JSONObject json = new JSONObject();
json.element( "klass", "java.lang.Object" );
@@ -1050,7 +1062,7 @@ public class TestJSONObject extends TestCase {
assertEquals( Object.class, bean.getKlass() );
}
public void testToBean_DynaBean__BigInteger_BigDecimal() {
public void testToBean_DynaBean__BigInteger_Double() {
BigInteger l = new BigDecimal( "1.7976931348623157E308" ).toBigInteger();
BigDecimal m = new BigDecimal( "1.7976931348623157E307" ).add( new BigDecimal( "0.0001" ) );
JSONObject json = new JSONObject().element( "i", BigInteger.ZERO )
@@ -1063,6 +1075,26 @@ public class TestJSONObject extends TestCase {
assertTrue( i instanceof Integer );
assertTrue( d instanceof Integer );
Object bi = ((MorphDynaBean) bean).get( "bi" );
Object bd = ((MorphDynaBean) bean).get( "bd" );
assertTrue( bi instanceof BigInteger );
assertTrue( bd instanceof Double );
}
public void testToBean_DynaBean__BigInteger_BigDecimal() {
BigInteger l = new BigDecimal( "1.7976931348623157E308" ).toBigInteger();
BigDecimal m = new BigDecimal( "-1.7976931348623157E309" ).add( new BigDecimal( "0.0001" ) );
JSONObject json = new JSONObject().element( "i", BigInteger.ZERO )
.element( "d", MorphUtils.BIGDECIMAL_ONE )
.element( "bi", l )
.element( "bd", m );
Object bean = JSONObject.toBean( json );
Object i = ((MorphDynaBean) bean).get( "i" );
Object d = ((MorphDynaBean) bean).get( "d" );
assertTrue( i instanceof Integer );
assertTrue( d instanceof Integer );
Object bi = ((MorphDynaBean) bean).get( "bi" );
Object bd = ((MorphDynaBean) bean).get( "bd" );
assertTrue( bi instanceof BigInteger );

View File

@@ -0,0 +1,41 @@
/*
* Copyright 2002-2009 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.sf.json.sample;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
import java.math.BigDecimal;
/**
* @author Andres Almiray <aalmiray@users.sourceforge.net>
*/
public class BeanD extends BeanA {
private Double[] doublearray = new Double[3];
public Double[] getDoublearray() {
return doublearray;
}
public void setDoublearray(Double[] doublearray) {
this.doublearray = doublearray;
}
public String toString() {
return ToStringBuilder.reflectionToString( this, ToStringStyle.MULTI_LINE_STYLE );
}
}

View File

@@ -17,6 +17,7 @@
package net.sf.json.util;
import java.io.StringWriter;
import java.math.BigDecimal;
import junit.framework.TestCase;
import net.sf.json.JSONFunction;
@@ -93,7 +94,7 @@ public class TestJSONBuilder extends TestCase {
.endObject();
JSONObject jsonObj = JSONObject.fromObject( w.toString() );
assertEquals( Boolean.TRUE, jsonObj.get( "bool" ) );
assertEquals( new Double( 1.1d ), jsonObj.get( "numDouble" ) );
assertEquals( Double.valueOf( "1.1" ), jsonObj.get( "numDouble" ) );
assertEquals( new Long( 2 ).longValue(), ((Number) jsonObj.get( "numInt" )).longValue() );
assertEquals( "text", jsonObj.get( "text" ) );
assertTrue( JSONUtils.isFunction( jsonObj.get( "func" ) ) );

View File

@@ -20,6 +20,8 @@ import junit.framework.TestCase;
import net.sf.json.JSONFunction;
import net.sf.json.JSONObject;
import java.math.BigDecimal;
/**
* @author Andres Almiray <aalmiray@users.sourceforge.net>
*/
@@ -85,7 +87,7 @@ public class TestJSONStringer extends TestCase {
.endObject();
JSONObject jsonObj = JSONObject.fromObject( b.toString() );
assertEquals( Boolean.TRUE, jsonObj.get( "bool" ) );
assertEquals( new Double( 1.1d ), jsonObj.get( "numDouble" ) );
assertEquals( Double.valueOf( "1.1" ), jsonObj.get( "numDouble" ) );
assertEquals( new Long( 2 ).longValue(), ((Number) jsonObj.get( "numInt" )).longValue() );
assertEquals( "text", jsonObj.get( "text" ) );
assertTrue( JSONUtils.isFunction( jsonObj.get( "func" ) ) );

View File

@@ -44,7 +44,25 @@ public class TestJSONUtils extends TestCase {
}
public void testDoubleToString_trailingZeros() {
assertEquals( "200", JSONUtils.doubleToString( 200.00000 ) );
assertEquals( "200.0", JSONUtils.doubleToString( 200.00000 ) );
}
public void testDoubleToString() {
Map<String, Double> expected = new HashMap<>();
expected.put("200.0", 200.0d);
expected.put("200.0", 200.000d);
expected.put("200.1", 200.1d);
expected.put("200.1", 200.10d);
expected.put("200.1", 200.1000d);
expected.put("200.12345", 200.12345d);
expected.put("200.12345", 200.123450000d);
expected.put("200.101", 200.101d);
expected.put("1.0E-8", 1.0E-8);
expected.put("200.0", 200d);
for(String key : expected.keySet()){
assertEquals(key,JSONUtils.doubleToString(expected.get(key)));
}
}
public void testGetFunctionParams() {
@@ -101,6 +119,28 @@ public class TestJSONUtils extends TestCase {
}
}
public void testNumberToString() {
Map<String, Number> expected = new HashMap<>();
expected.put("0", Integer.valueOf("00000"));
expected.put("123", Integer.valueOf("123"));
expected.put("-123", Integer.valueOf("-123"));
expected.put("0.0", Double.valueOf("0"));
expected.put("0.0", Double.valueOf("0.00000"));
expected.put("120.0001", Double.valueOf("120.0001000"));
expected.put("-120.0001", Double.valueOf("-120.0001000"));
expected.put("0.0", Float.valueOf("0"));
expected.put("0.0", Float.valueOf("0.00000"));
expected.put("120.0001", Float.valueOf("120.0001000"));
expected.put("-120.0001", Float.valueOf("-120.0001000"));
for(String key : expected.keySet()) {
assertEquals(key, JSONUtils.numberToString(expected.get(key)));
}
}
public void testQuote_emptyString() {
assertEquals( "\"\"", JSONUtils.quote( "" ) );
}

View File

@@ -7,7 +7,7 @@
<groupId>org.talend.libraries</groupId>
<artifactId>talend-codegen-utils</artifactId>
<!-- release for revert version of library -->
<version>0.25.4</version>
<version>0.28.0</version>
<packaging>jar</packaging>
<properties>

View File

@@ -51,6 +51,8 @@ public final class TypeConverter {
public static final String LIST = "id_List";
public static final String OBJECT = "id_Object";
private TypeConverter() {
// Class provides static utility methods and shouldn't be instantiated
}
@@ -167,6 +169,8 @@ public final class TypeConverter {
return SHORT;
case "java.util.Date":
return DATE;
case "java.lang.Object":
return OBJECT;
default:
throw new UnsupportedOperationException("Unrecognized java class " + javaClass);
}

View File

@@ -5,9 +5,9 @@
>
<modelVersion>4.0.0</modelVersion>
<groupId>org.talend.libraries</groupId>
<groupId>org.talend.components.lib</groupId>
<artifactId>talend-db-exasol</artifactId>
<version>2.1.2</version>
<version>2.1.4</version>
<packaging>jar</packaging>
<name>talend-db-exasol</name>

View File

@@ -94,12 +94,11 @@ public class EXABulkUtil {
private String createNumberFormat(Integer length, Integer precision, boolean hasGroups) {
if (length != null && length.intValue() > 0) {
StringBuilder sb = new StringBuilder();
int numGroups = (length.intValue() / 3) + 1;
for (int i = 0; i < numGroups; i++) {
if (i > 0 && hasGroups) {
for (int i = length - 1; i >= 0; i--) {
if(hasGroups && i < length - 1 && i > 0 && (i % 3 == 2)) {
sb.append("G");
}
sb.append("999");
sb.append("9");
}
if (precision != null && precision.intValue() > 0) {
sb.append("D");

View File

@@ -6,7 +6,7 @@
<groupId>org.talend.libraries</groupId>
<artifactId>job-audit</artifactId>
<version>1.0</version>
<version>1.0.1</version>
<properties>
<talend.nexus.url>https://artifacts-oss.talend.com</talend.nexus.url>
@@ -50,28 +50,32 @@
<dependencies>
<dependency>
<groupId>org.talend.daikon</groupId>
<artifactId>daikon-audit</artifactId>
<version>0.31.8</version>
<artifactId>audit-common</artifactId>
<version>1.8.0</version>
</dependency>
<dependency>
<groupId>org.talend.daikon</groupId>
<artifactId>audit-logback</artifactId>
<version>0.31.8</version>
<artifactId>audit-log4j1</artifactId>
<version>1.8.0</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.3.0-alpha4</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
<scope>test</scope>
</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>
</project>

View File

@@ -18,12 +18,29 @@ public class JobEventAuditLoggerFactory {
final AuditConfigurationMap config = AuditConfiguration.loadFromProperties(properties);
AbstractBackend logger = null;
String loggerClass = "org.talend.logging.audit.logback.LogbackBackend";
//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) {
throw new RuntimeException("Unable to load backend " + loggerClass, e);
// do nothing
}
//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);
}
final DefaultAuditLoggerBase loggerBase = new DefaultAuditLoggerBase(logger, config);

View File

@@ -8,7 +8,8 @@ public class JobAuditLoggerTest {
public static void main(String[] args) {
Properties props = new Properties();
props.setProperty("root.logger", "audit");
String root_logger_name = "audit";
props.setProperty("root.logger", root_logger_name);
props.setProperty("encoding", "UTF-8");
props.setProperty("application.name", "Talend Studio");
props.setProperty("service.name", "Talend Studio Job");
@@ -19,6 +20,10 @@ public class JobAuditLoggerTest {
props.setProperty("appender.file.maxsize", "52428800");
props.setProperty("appender.file.maxbackup", "20");
props.setProperty("host", "false");
org.apache.logging.log4j.core.config.Configurator.setLevel(root_logger_name, org.apache.logging.log4j.Level.DEBUG);
//org.apache.log4j.Logger.getLogger("audit").setLevel(org.apache.log4j.Level.DEBUG);
final JobAuditLogger logger = JobEventAuditLoggerFactory.createJobAuditLogger(props);
Context context = JobContextBuilder.create().jobName("fetch_from_s3_every_day").jobId("jobid_123")
.jobVersion("0.1").connectorType("tXMLMAP").connectorId("tXMLMap_1")

View File

@@ -1,10 +1,10 @@
<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>
<groupId>org.talend.libraries</groupId>
<groupId>org.talend.components.lib</groupId>
<artifactId>talendsap</artifactId>
<name>talendsap</name>
<version>1.0.1</version>
<version>1.0.2</version>
<properties>
<talend.nexus.url>https://artifacts-oss.talend.com</talend.nexus.url>

View File

@@ -90,6 +90,7 @@ public class DocumentExtractor {
List<Element> tablesAndChangingElements = new ArrayList<Element>(3);
tablesAndChangingElements.add(functionElement.element("TABLES"));
tablesAndChangingElements.add(functionElement.element("CHANGING"));
tablesAndChangingElements.add(functionElement.element("OUTPUT"));
for(Element tablesOrChangingElement : tablesAndChangingElements) {
if (tablesOrChangingElement == null) {
@@ -121,6 +122,10 @@ public class DocumentExtractor {
}
result.add(row);
}
if(!result.isEmpty()) {
return result;
}
}
return result;

View File

@@ -49,11 +49,11 @@ public class DocumentHelper {
}
}
public void addSingleParameter(String name, String value, boolean isChanging) {
public void addSingleParameter(String name, String value, SAPParameterType parameter_type) {
if(value == null) {
value = "";
}
if (isChanging) {
if (parameter_type == SAPParameterType.CHANGING) {
correctChanging();
changing.addElement(name).setText(value);
} else {
@@ -62,8 +62,8 @@ public class DocumentHelper {
}
}
public void addStructParameter(String name, boolean isChanging) {
if (isChanging) {
public void addStructParameter(String name, SAPParameterType parameter_type) {
if (parameter_type == SAPParameterType.CHANGING) {
correctChanging();
currentStruct = changing.addElement(name);
} else {
@@ -79,13 +79,16 @@ public class DocumentHelper {
currentStruct.addElement(name).setText(value);
}
public void addTableParameter(String name, boolean isChanging) {
if (isChanging) {
public void addTableParameter(String name, SAPParameterType parameter_type) {
if (parameter_type == SAPParameterType.CHANGING) {
correctChanging();
currentTable = changing.addElement(name);
} else {
} else if(parameter_type == SAPParameterType.TABLES) {
correctTables();
currentTable = tables.addElement(name);
} else {
correctInput();
currentTable = input.addElement(name);
}
}
@@ -108,18 +111,18 @@ public class DocumentHelper {
DocumentHelper helper = new DocumentHelper();
helper.setFunctionName("READ_TABLE_FUNCTION");
helper.addSingleParameter("ID", "1", true);
helper.addSingleParameter("NAME", "gaoyan", false);
helper.addSingleParameter("ID", "1", SAPParameterType.CHANGING);
helper.addSingleParameter("NAME", "gaoyan", SAPParameterType.IMPORT);
helper.addStructParameter("INFO", true);
helper.addStructParameter("INFO", SAPParameterType.CHANGING);
helper.addStructChildParameter("ID", "2");
helper.addStructChildParameter("NAME", "wangwei");
helper.addStructParameter("INFO1", false);
helper.addStructParameter("INFO1", SAPParameterType.IMPORT);
helper.addStructChildParameter("ID1", "4");
helper.addStructChildParameter("NAME1", "momo");
helper.addTableParameter("TABLE1", false);
helper.addTableParameter("TABLE1", SAPParameterType.TABLES);
for (int i = 0; i < 200000; i++) {
helper.addTableRow();
helper.addTableRowChildParameter("c1", i + "");
@@ -132,7 +135,7 @@ public class DocumentHelper {
helper.addTableRowChildParameter("c8", "wangwei" + i);
}
helper.addTableParameter("TABLE2", false);
helper.addTableParameter("TABLE2", SAPParameterType.TABLES);
for (int i = 0; i < 2; i++) {
helper.addTableRow();
helper.addTableRowChildParameter("ID4", i + "");

View File

@@ -0,0 +1,8 @@
package org.talend.sap;
public enum SAPParameterType {
IMPORT,
CHANGING,
TABLES,
EXPORT
}

View File

@@ -46,7 +46,7 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>1.10</version>
<version>1.19</version>
</dependency>
<dependency>

View File

@@ -5,9 +5,9 @@
>
<modelVersion>4.0.0</modelVersion>
<groupId>org.talend.libraries</groupId>
<groupId>org.talend.components.lib</groupId>
<artifactId>thashfile</artifactId>
<version>3.0-20170711</version>
<version>3.1-20190910</version>
<packaging>jar</packaging>
<name>thashfile</name>
@@ -45,8 +45,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>

View File

@@ -11,7 +11,8 @@ import org.talend.designer.components.hashfile.memory.AdvancedMemoryHashFile;
public class MapHashFile {
// use this map instead of globalMap
private Map<String, AdvancedMemoryHashFile> resourceMap = new ConcurrentHashMap<>();
//keep the present key of AdvancedMemoryHashFile as key and the previous key as value
// keep the present key of AdvancedMemoryHashFile as key and the previous key as
// value
private Map<String, String> keyMap = new ConcurrentHashMap<>();
// singleton
private static final MapHashFile mhf = new MapHashFile();
@@ -20,16 +21,13 @@ public class MapHashFile {
public static class TalendMultiThreadLockMap {
private Map<Object, Object> tMultiTheadLockMap = new HashMap<Object, Object>();
private Map<Object, Object> tMultiTheadLockMap = new ConcurrentHashMap<>();
public synchronized Object get(Object key) {
if (tMultiTheadLockMap.get(key) == null) {
tMultiTheadLockMap.put(key, new Object());
}
return tMultiTheadLockMap.get(key);
public Object get(Object key) {
return tMultiTheadLockMap.computeIfAbsent(key, k -> new Object());
}
public synchronized void remove(Object key){
public void remove(Object key) {
tMultiTheadLockMap.remove(key);
}
}
@@ -45,7 +43,8 @@ public class MapHashFile {
public AdvancedMemoryHashFile getAdvancedMemoryHashFile(String key) {
AdvancedMemoryHashFile amhf = resourceMap.get(key);
String prekey = keyMap.get(key);
//if present AdvancedMemoryHashFile is null get the AdvancedMemoryHashFile before present.
// if present AdvancedMemoryHashFile is null get the AdvancedMemoryHashFile
// before present.
int size = keyMap.size();
while (amhf == null && (size--) > 0) {
amhf = resourceMap.get(prekey);
@@ -61,9 +60,11 @@ public class MapHashFile {
public Map<String, String> getKeyMap() {
return keyMap;
}
public void clearCache(String key) {
clearChildCache(getRootCache(key));
}
public void clearChildCache(String root) {
Set<String> set = keyMap.keySet();
synchronized (keyMap) {

View File

@@ -258,6 +258,8 @@
com.google.api.services.bigquery.model.JobConfiguration config_<%=cid%> = new com.google.api.services.bigquery.model.JobConfiguration();
com.google.api.services.bigquery.model.JobConfigurationLoad queryLoad_<%=cid%> = new com.google.api.services.bigquery.model.JobConfigurationLoad();
if (<%=ElementParameterParser.getBooleanValue(node, "__CREATE_TABLE_IF_NOT_EXIST__")%>) {
com.google.api.services.bigquery.model.TableSchema schema_<%=cid%> = new com.google.api.services.bigquery.model.TableSchema();
<%
@@ -328,6 +330,8 @@
schema_<%=cid%>.setFields(fields_<%=cid%>);
queryLoad_<%=cid%>.setSchema(schema_<%=cid%>);
}
<%
if("true".equals(ElementParameterParser.getValue(node, "__CREATE_TABLE_IF_NOT_EXIST__"))) {
%>
@@ -569,17 +573,18 @@
loadJobBuilder_<%=cid%>.setDestinationTable(tableId_<%=cid%>);
com.google.cloud.bigquery.CsvOptions.Builder csvOptions_<%=cid%> = com.google.cloud.bigquery.CsvOptions.newBuilder();
csvOptions_<%=cid%>.setAllowQuotedNewLines(true);
csvOptions_<%=cid%>.setSkipLeadingRows(<%=ElementParameterParser.getValue(node, "__GS_FILE_HEADER__")%>);
<%if("true".equals(ElementParameterParser.getValue(node, "__SET_FIELD_DELIMITER__"))) {
%>
loadJobBuilder_<%=cid%>.setFormatOptions(csvOptions_<%=cid%>.setFieldDelimiter(<%=fieldDelimiter%>).build());
csvOptions_<%=cid%>.setFieldDelimiter(<%=fieldDelimiter%>);
<%
}
%>
loadJobBuilder_<%=cid%>.setFormatOptions(csvOptions_<%=cid%>.build());
loadJobBuilder_<%=cid%>.setNullMarker("\\N");
com.google.cloud.bigquery.Job job_<%=cid%> = bigquery_<%=cid%>.create(com.google.cloud.bigquery.JobInfo.of(loadJobBuilder_<%=cid%>.build()));
job_<%=cid%> = job_<%=cid%>.waitFor(com.google.cloud.RetryOption.initialRetryDelay(org.threeten.bp.Duration.ofSeconds(1)), com.google.cloud.RetryOption.totalTimeout(org.threeten.bp.Duration.ofSeconds(30)));
job_<%=cid%> = job_<%=cid%>.waitFor(com.google.cloud.RetryOption.initialRetryDelay(org.threeten.bp.Duration.ofSeconds(1)));
if (job_<%=cid%> != null && job_<%=cid%>.getStatus().getError() == null) {
<%
if(isLog4jEnabled){

View File

@@ -38,7 +38,7 @@ class BigQueryUtil_<%=cid%> {
job.setConfiguration(config);
List<com.google.api.services.bigquery.model.TableReference> referencedTables = bigqueryclient.jobs().insert(projectId, job).execute().getStatistics().getQuery().getReferencedTables();
if(referencedTables != null && !referencedTables.isEmpty()) {
location = bigqueryclient.tables().get(projectId, referencedTables.get(0).getDatasetId(), referencedTables.get(0).getTableId()).execute().getLocation();
location = bigqueryclient.tables().get(referencedTables.get(0).getProjectId(), referencedTables.get(0).getDatasetId(), referencedTables.get(0).getTableId()).execute().getLocation();
}
return location;
}
@@ -146,7 +146,7 @@ class BigQueryUtil_<%=cid%> {
<%
}
%>
return executeQuery(query, true);
return executeQuery(query, true, useLegacySql);
}
<%}%>
// Do not throw exception to avoid behavior changed(because it may throw "duplicate" exception which do not throw before);

View File

@@ -221,10 +221,9 @@
}
String query_<%=cid%> = <%=query%>;
String dataset = query_<%=cid%>.substring(query_<%=cid%>.indexOf("from") + 4, query_<%=cid%>.indexOf(".")).trim();
String temp_table = "temp_" + dataset + java.util.UUID.randomUUID().toString().replaceAll("-", "")
+ "<%=cid%>".toLowerCase().replaceAll("[^a-z0-9]", "0").replaceAll("^[^a-z]", "a")
+ Integer.toHexString(java.util.concurrent.ThreadLocalRandom.current().nextInt());
<% if(isLog4jEnabled) { %>
log.info("<%=cid%> - query " + <%=query%>);
<% } %>
com.google.cloud.bigquery.BigQuery bigquery_<%=cid%> = com.google.cloud.bigquery.BigQueryOptions.newBuilder()
.setCredentials(credentials_<%=cid%>)
@@ -234,24 +233,54 @@
com.google.cloud.bigquery.QueryJobConfiguration.Builder queryConfiguration_<%=cid%> = com.google.cloud.bigquery.QueryJobConfiguration.newBuilder(<%=query%>).setUseLegacySql(<%=useLegacySql%>);
<%
if (resultSizeType.equals("LARGE") || resultSizeType.equals("AUTO")) {
%>
queryConfiguration_<%=cid%>.setDestinationTable(com.google.cloud.bigquery.TableId.of(dataset, temp_table)).setAllowLargeResults(true);
<%
}
%>
<%if (resultSizeType.equals("LARGE") || resultSizeType.equals("AUTO")) {%>
com.google.cloud.bigquery.JobId jobId_<%=cid%> = com.google.cloud.bigquery.JobId.of(java.util.UUID.randomUUID().toString());
com.google.cloud.bigquery.QueryJobConfiguration jobConfDryRun_<%=cid%> = queryConfiguration_<%=cid%> .setDryRun(true).build();
com.google.cloud.bigquery.Job jobDryRun_<%=cid%> = bigquery_<%=cid%>.create(com.google.cloud.bigquery.JobInfo.of(jobConfDryRun_<%=cid%>));
String queryLocation_<%=cid%> =jobDryRun_<%=cid%>.getJobId().getLocation();
String location_<%=cid%> = queryLocation_<%=cid%> == null ? "US" : queryLocation_<%=cid%>;
String tempDataset_<%=cid%> = java.util.UUID.randomUUID().toString().replaceAll("-", "")
+ Integer.toHexString(java.util.concurrent.ThreadLocalRandom.current().nextInt())
+ Integer.toHexString(java.util.concurrent.ThreadLocalRandom.current().nextInt());
String tempTable_<%=cid%> = java.util.UUID.randomUUID().toString().replaceAll("-", "")
+ Integer.toHexString(java.util.concurrent.ThreadLocalRandom.current().nextInt())
+ Integer.toHexString(java.util.concurrent.ThreadLocalRandom.current().nextInt());
<% if(isLog4jEnabled){ %>
log.info("<%=cid%> - query location :" + queryLocation_<%=cid%>);
log.info("<%=cid%> - temporary dataset location :" + location_<%=cid%>);
log.info("<%=cid%> - temporary Dataset name : " + tempDataset_<%=cid%>);
log.info("<%=cid%> - temporary table name : " + tempTable_<%=cid%>);
<% } %>
com.google.cloud.bigquery.DatasetInfo datasetInfo_<%=cid%> = com.google.cloud.bigquery.DatasetInfo.newBuilder(tempDataset_<%=cid%>).setLocation(location_<%=cid%>).build();
com.google.cloud.bigquery.Dataset dataset_<%=cid%> = bigquery_<%=cid%> .create(datasetInfo_<%=cid%>);
queryConfiguration_<%=cid%>
.setDryRun(false)
.setAllowLargeResults(true)
.setDestinationTable(com.google.cloud.bigquery.TableId.of(tempDataset_<%=cid%>, tempTable_<%=cid%>));
com.google.cloud.bigquery.JobId jobId_<%=cid%> = com.google.cloud.bigquery.JobId
.newBuilder().setProject(<%=projectId%>)
.setJob(java.util.UUID.randomUUID().toString())
.setLocation(location_<%=cid%>)
.build();
<% if(isLog4jEnabled){ %>
log.info("<%=cid%> - job location : " + jobId_<%=cid%>.getLocation());
<% } %>
<% } else { %>
com.google.cloud.bigquery.JobId jobId_<%=cid%> = com.google.cloud.bigquery.JobId.of(<%=projectId%>,java.util.UUID.randomUUID().toString());
<% } %>
com.google.cloud.bigquery.Job job_<%=cid%> = bigquery_<%=cid%>.create(com.google.cloud.bigquery.JobInfo.newBuilder(queryConfiguration_<%=cid%>.build()).setJobId(jobId_<%=cid%>).build());
<%
if(isLog4jEnabled){
%>
<% if(isLog4jEnabled) { %>
log.info("<%=cid%> - Sending job " + jobId_<%=cid%> + " with query: " + <%=query%>);
<%
}
%>
<% } %>
job_<%=cid%> = job_<%=cid%>.waitFor();
if (job_<%=cid%> == null) {
@@ -260,13 +289,9 @@
throw new RuntimeException(job_<%=cid%>.getStatus().getError().toString());
}
<%
if(isLog4jEnabled){
%>
<% if(isLog4jEnabled) { %>
log.info("<%=cid%> - Job " + jobId_<%=cid%> + " finished successfully.");
<%
}
%>
<% } %>
com.google.cloud.bigquery.TableResult result_<%=cid%> = job_<%=cid%>.getQueryResults();
long nb_line_<%=cid%> = 0;
<%

View File

@@ -11,6 +11,9 @@ imports="
INode node = (INode)codeGenArgument.getArgument();
String cid = node.getUniqueName();
String authMode = ElementParameterParser.getValue(node,"__AUTH_MODE__");
String projectId = ElementParameterParser.getValue(node,"__PROJECT_ID__");
String resultSizeType = ElementParameterParser.getValue(node,"__RESULT_SIZE__");
if (authMode.equals("OAUTH")) {
%>
}
@@ -24,7 +27,10 @@ imports="
} else if (authMode.equals("SERVICEACCOUNT")) {
%>
}
bigquery_<%=cid%>.delete(com.google.cloud.bigquery.TableId.of(dataset, temp_table));
<% if (resultSizeType.equals("LARGE") || resultSizeType.equals("AUTO")) { %>
com.google.cloud.bigquery.DatasetId datasetId_<%=cid%> = com.google.cloud.bigquery.DatasetId.of(<%=projectId%>, tempDataset_<%=cid%>);
bigquery_<%=cid%>.delete(datasetId_<%=cid%>, com.google.cloud.bigquery.BigQuery.DatasetDeleteOption.deleteContents());
<% }%>
<%
} else {
throw new IllegalArgumentException("authentication mode should be either \"SERVICEACCOUNT\" or \"OAUTH\", but it is " + authMode);

View File

@@ -53,6 +53,7 @@
<PARAMETER
NAME="DBTYPE"
REPOSITORY_VALUE="DBTYPE"
FIELD="CLOSED_LIST"
NUM_ROW="10"
>
@@ -897,7 +898,7 @@
<IMPORT NAME="Driver-VERTICA_7.0.1" MODULE="vertica-jdbc-7.0.1-0.jar" MVN="mvn:org.talend.libraries/vertica-jdbc-7.0.1-0/6.0.0" REQUIRED_IF="(DBTYPE=='VERTICA') and (USE_EXISTING_CONNECTION == 'false') and (DB_VERTICA_VERSION=='VERTICA_7_0_X')" />
<IMPORT NAME="Driver-VERTICA_7.1.2" MODULE="vertica-jdbc-7.1.2-0.jar" MVN="mvn:org.talend.libraries/vertica-jdbc-7.1.2-0/6.0.0" REQUIRED_IF="(DBTYPE=='VERTICA') and (USE_EXISTING_CONNECTION == 'false') and (DB_VERTICA_VERSION=='VERTICA_7_1_X')" />
<IMPORT NAME="Driver-EXASolution" MODULE="exajdbc-6.0.9302.jar" MVN="mvn:org.talend.libraries/exajdbc-6.0.9302/6.3.0" REQUIRED_IF="(DBTYPE=='EXASOL') and (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="Driver-Redshift" MODULE="redshift-jdbc42-no-awssdk-1.2.20.1043.jar" MVN="mvn:com.amazon.redshift/redshift-jdbc42-no-awssdk/1.2.20.1043" REQUIRED_IF="(DBTYPE=='REDSHIFT') and (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="Driver-Redshift" MODULE="redshift-jdbc42-no-awssdk-1.2.32.1056.jar" MVN="mvn:com.amazon.redshift/redshift-jdbc42-no-awssdk/1.2.32.1056" REQUIRED_IF="(DBTYPE=='REDSHIFT') and (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="Driver-Snowflake" MODULE="snowflake-jdbc-3.5.3.jar" MVN="mvn:net.snowflake/snowflake-jdbc/3.5.3" REQUIRED_IF="(DBTYPE=='SNOWFLAKE') and (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="Driver-VERTICA_9.0" MODULE="vertica-jdbc-9.0.0-0.jar" MVN="mvn:org.talend.libraries/vertica-jdbc-9.0.0-0/6.0.0" REQUIRED_IF="(DBTYPE=='VERTICA') and (USE_EXISTING_CONNECTION == 'false') and (DB_VERTICA_VERSION=='VERTICA_9_0')"/>
</IMPORTS>

View File

@@ -2103,7 +2103,7 @@ class SnowflaketManager extends Manager {
StringBuilder javaCode = new StringBuilder();
if(useExistingConnection) {
javaCode.append(retrieveTable());
javaCode.append("java.sql.Connection conn_" + cid + " = (java.sql.Connection)globalMap.get(\"" + connection + "_Connection\");");
javaCode.append("java.sql.Connection conn_" + cid + " = (java.sql.Connection)globalMap.get(\"" + connection + "_connection\");");
} else {
javaCode.append(super.getConnection());
}

View File

@@ -45,7 +45,7 @@ String xmlfile = ElementParameterParser.getValue(node, "__XMLFILE__");
java.lang.StringBuilder sb<%=cid %>=new java.lang.StringBuilder("");
try{
br<%=cid %> = new java.io.BufferedReader(new java.io.InputStreamReader(url<%=cid %>.openStream()));
br<%=cid %> = new java.io.BufferedReader(new UnicodeReader(url<%=cid %>.openStream(), null));
char[] buffer<%=cid %> = new char[1024];
int length<%=cid %> = -1;
@@ -66,7 +66,9 @@ String xmlfile = ElementParameterParser.getValue(node, "__XMLFILE__");
dbf<%=cid %> = javax.xml.parsers.DocumentBuilderFactory.newInstance();
dbf<%=cid %>.setValidating(false);
db<%=cid %> = dbf<%=cid %>.newDocumentBuilder();
org.w3c.dom.Document doc<%=cid %> = db<%=cid %>.parse(new java.io.StringBufferInputStream(sb<%=cid%>.toString()));
org.w3c.dom.Document doc<%=cid %> = db<%=cid %>.parse(
new java.io.ByteArrayInputStream(sb<%=cid%>.toString().getBytes("UTF-8")));
String rootnode<%=cid %>=doc<%=cid %>.getDocumentElement().getNodeName();
String encoding=null;
@@ -89,7 +91,7 @@ String xmlfile = ElementParameterParser.getValue(node, "__XMLFILE__");
int offsetRoot<%=cid %>=sb<%=cid %>.indexOf("<"+rootnode<%=cid %>);
sb<%=cid%>.replace(0, offsetRoot<%=cid %>, reference<%=cid %>);
is<%=cid %>=new java.io.StringBufferInputStream(sb<%=cid %>.toString());
is<%=cid %> = new java.io.ByteArrayInputStream(sb<%=cid%>.toString().getBytes("UTF-8"));
class MyHandler<%=cid %> extends org.xml.sax.helpers.DefaultHandler{
String errorMessage = null;

View File

@@ -40,7 +40,7 @@
</ADVANCED_PARAMETERS>
<CODEGENERATION>
<IMPORTS>
<IMPORT MODULE="janet-java-1.1.jar" MVN="mvn:org.talend.libraries/janet-java-1.1/6.0.0" NAME="janet-java-1.1"
<IMPORT MODULE="janet-java-1.2.jar" MVN="mvn:org.talend.libraries/janet-java-1.2/6.0.0" NAME="janet-java-1.2"
REQUIRED="true" />
</IMPORTS>
</CODEGENERATION>

View File

@@ -94,7 +94,7 @@
</ADVANCED_PARAMETERS>
<CODEGENERATION>
<IMPORTS>
<IMPORT MODULE="janet-java-1.1.jar" MVN="mvn:org.talend.libraries/janet-java-1.1/6.0.0" NAME="janet-java-1.1"
<IMPORT MODULE="janet-java-1.2.jar" MVN="mvn:org.talend.libraries/janet-java-1.2/6.0.0" NAME="janet-java-1.2"
REQUIRED="true" />
</IMPORTS>
</CODEGENERATION>

View File

@@ -312,27 +312,34 @@ for(Column colStmt:stmtStructure){
}else if (("UPDATE").equals(dataAction)){
if(useUpdateStatement){
%>
String updateQuery_<%=cid %> = select_query_<%=cid %>
String updateQuery_<%=cid %> = select_query_<%=cid %>;
<%
}else{
%>
String updateQuery_<%=cid %> = "UPDATE "+tableName_<%=cid%>+" SET <%=updateSetStmt.toString()%> "
String updateQuery_<%=cid %> = "UPDATE "+tableName_<%=cid%>+" SET <%=updateSetStmt.toString()%> ";
<%
}
%>
<%
if(CodeGenerationUtils.hasAlphaNumericCharacter(whereClause)) {
if(useUpdateStatement){
%>
+" WHERE " + <%=CodeGenerationUtils.replaceAllCrBySpace(whereClause)%>
if(select_query_<%=cid %>.indexOf("WHERE")==-1){
updateQuery_<%=cid %> +=" WHERE ";
}else{
updateQuery_<%=cid %> +=" AND ";
}
updateQuery_<%=cid %>+= <%=CodeGenerationUtils.replaceAllCrBySpace(whereClause)%>;
<%
}else{
%>
updateQuery_<%=cid %> += " WHERE " + <%=CodeGenerationUtils.replaceAllCrBySpace(whereClause)%>;
<%
}
}
%>
;
pstmt_<%=cid %> = conn_<%=cid%>.prepareStatement(updateQuery_<%=cid %>);
<%
}else if (("DELETE").equals(dataAction)){
%>
String deleteQuery_<%=cid %> = "DELETE FROM "+ tableName_<%=cid%>+" WHERE EXISTS ("+select_query_<%=cid %>+") "
<%
if(CodeGenerationUtils.hasAlphaNumericCharacter(whereClause)) {
@@ -343,7 +350,6 @@ for(Column colStmt:stmtStructure){
%>
;
pstmt_<%=cid %> = conn_<%=cid%>.prepareStatement(deleteQuery_<%=cid %>);
<%
}
%>

View File

@@ -33,4 +33,4 @@ USE_DIFFERENT_TABLE.NAME=Use different table name
DIFFERENT_TABLE_NAME.NAME=Table name
IS_TABLE_NAME_VARIABLE.NAME=Table name from connection name is variable
USE_UPDATE_STATEMENT.NAME=Use update statement
USE_UPDATE_STATEMENT.NAME=Use update statement without subqueries

View File

@@ -182,6 +182,17 @@
</PARAMETERS>
<ADVANCED_PARAMETERS>
<PARAMETER
NAME="PROPERTIES"
FIELD="TEXT"
NUM_ROW="1"
REPOSITORY_VALUE="PROPERTIES_STRING"
SHOW_IF="(#LINK@CONNECTOR.OUT.TABLE_REF == '0') AND (USE_EXISTING_CONNECTION == 'false')">
<DEFAULT>""</DEFAULT>
</PARAMETER>
</ADVANCED_PARAMETERS>
<CODEGENERATION>
<IMPORTS>
<IMPORT NAME="MYSQL_8" MODULE="mysql-connector-java-8.0.12.jar" MVN="mvn:mysql/mysql-connector-java/8.0.12" REQUIRED_IF="(DB_VERSION == 'MYSQL_8') AND (USE_EXISTING_CONNECTION == 'false')" />

View File

@@ -48,4 +48,5 @@ DB_VERSION.ITEM.MYSQL_5=Mysql 5
DB_VERSION.ITEM.MYSQL_8=Mysql 8
DB_VERSION.ITEM.MARIADB=MariaDB
PROPERTIES.NAME=Additional JDBC Parameters
CONNECTION.NAME=Component List

View File

@@ -52,6 +52,7 @@ imports="
String dbuser = null;
String dbVersion = "";
boolean useExistingConn = false;
String dbproperties = null;
if(previousNode != null) {
dbhost = ElementParameterParser.getValue(previousNode, "__HOST__");
dbport = ElementParameterParser.getValue(previousNode, "__PORT__");
@@ -59,6 +60,7 @@ imports="
dbuser = ElementParameterParser.getValue(previousNode, "__USER__");
useExistingConn = ("true").equals(ElementParameterParser.getValue(previousNode, "__USE_EXISTING_CONNECTION__"));
dbVersion = ElementParameterParser.getValue(previousNode, "__DB_VERSION__");
dbproperties = ElementParameterParser.getValue(previousNode, "__PROPERTIES__");
}
String differenttable = ElementParameterParser.getValue(node, "__DIFFERENT_TABLE_NAME__");
@@ -96,7 +98,11 @@ imports="
%>
String driverClass_<%=cid%> = "<%=drverClass%>";
java.lang.Class.forName(driverClass_<%=cid%>);
<%if(dbproperties == null || ("\"\"").equals(dbproperties) || ("").equals(dbproperties)) {%>
String url_<%=cid %> = "<%=jdbcURL%>://"+<%=dbhost%>+":"+<%=dbport%>+"/"+<%=dbname%>;
<%} else {%>
String url_<%=cid %> = "<%=jdbcURL%>://"+<%=dbhost%>+":"+<%=dbport%>+"/"+<%=dbname%>+"?"+<%=dbproperties%>;
<%}%>
String dbUser_<%=cid%> = <%=dbuser%>;
<%

View File

@@ -141,6 +141,14 @@
</PARAMETERS>
<ADVANCED_PARAMETERS>
<PARAMETER
NAME="USE_UPDATE_STATEMENT"
FIELD="CHECK"
NUM_ROW="10"
SHOW_IF="DATA_ACTION=='UPDATE'"
>
<DEFAULT>false</DEFAULT>
</PARAMETER>
</ADVANCED_PARAMETERS>
<CODEGENERATION>

View File

@@ -35,6 +35,7 @@ skeleton="../templates/db_output_bulk.skeleton"
String differenttable = ElementParameterParser.getValue(node, "__DIFFERENT_TABLE_NAME__");
boolean useDifferentTable = "true".equals(ElementParameterParser.getValue(node, "__USE_DIFFERENT_TABLE__"));
boolean isTableNameVariable="true".equals(ElementParameterParser.getValue(node, "__IS_TABLE_NAME_VARIABLE__"));
boolean useUpdateStatement="true".equals(ElementParameterParser.getValue(node, "__USE_UPDATE_STATEMENT__"));
%>
String select_query_<%=cid %> = null;
String tableName_<%=cid%> = null;
@@ -93,7 +94,7 @@ skeleton="../templates/db_output_bulk.skeleton"
String username = "username_" + connection;
String connectionKey=null;
if("tSnowflakeConnection".equals(connNode.getComponent().getName())){
connectionKey=connection+"_Connection";
connectionKey=connection+"_connection";
}else{
connectionKey=conn;
}
@@ -160,6 +161,20 @@ skeleton="../templates/db_output_bulk.skeleton"
String insertQuery_<%=cid %> = "INSERT INTO "+tableName_<%=cid%>+"(<%=insertColName.toString()%>) ("+select_query_<%=cid %>+")";
<%
} else if (("UPDATE").equals(dataAction)){
if(useUpdateStatement){
%>
String updateQuery_<%=cid %> = select_query_<%=cid %>;
<%
if(CodeGenerationUtils.hasAlphaNumericCharacter(whereClause)) {
%>
if (updateQuery_<%=cid %>.toUpperCase().contains(" WHERE ")) {
updateQuery_<%=cid %> += " AND (" + <%=CodeGenerationUtils.replaceAllCrBySpace(whereClause)%> + ")";
} else {
updateQuery_<%=cid %> += " WHERE " + <%=CodeGenerationUtils.replaceAllCrBySpace(whereClause)%>;
}
<%
}
} else {
%>
String updateQuery_<%=cid %> = "UPDATE "+tableName_<%=cid%>+" SET <%=updateSetStmt.toString()%> "
<%
@@ -171,6 +186,7 @@ skeleton="../templates/db_output_bulk.skeleton"
%>
;
<%
}
} else if (("DELETE").equals(dataAction)){
%>
String deleteQuery_<%=cid %> = "DELETE FROM "+ tableName_<%=cid%>+" WHERE EXISTS ("+select_query_<%=cid %>+") "

View File

@@ -41,3 +41,5 @@ TABLE_ACTION.ITEM.DROP_IF_EXISTS_AND_CREATE=Drop table if exists and create
TABLE_ACTION.ITEM.DROP_CREATE=Drop and create table
TABLE_ACTION.ITEM.NONE=None
TABLE_ACTION.NAME=Action on table
USE_UPDATE_STATEMENT.NAME=Use update statement without subqueries

View File

@@ -36,6 +36,8 @@ skeleton="@{org.talend.designer.components.localprovider}/components/templates/d
String defaultDateFormat = ElementParameterParser.getValue(node, "__DEFAULT_DATE_FORMAT__");
String defaultTimestampFormat = ElementParameterParser.getValue(node, "__DEFAULT_TIMESTAMP_FORMAT__");
String numGroupSep = ElementParameterParser.getValue(node, "__THOUSANDS_SEPARATOR__");
boolean useLenPrecision = "true".equals(ElementParameterParser.getValue(node, "__USE_PRECISION_LENGTH_FROM_SCHEMA__"));
if (numGroupSep == null|| numGroupSep.trim().isEmpty()) {
numGroupSep = "null";
}
@@ -207,13 +209,25 @@ org.talend.database.exasol.imp.EXABulkUtil <%=cid%> = new org.talend.database.ex
String lengthStr = "null";
String precisionStr = "null";
Integer length = column.getLength();
if(useLenPrecision) {
if (length != null) {
lengthStr = String.valueOf(length);
}
} else {
if (length != null && hasGroupSep) {
lengthStr = String.valueOf(length);
}
}
Integer precision = column.getPrecision();
if(useLenPrecision) {
if (precision != null) {
precisionStr = String.valueOf(precision);
}
} else {
if (precision != null && hasGroupSep) {
precisionStr = String.valueOf(precision);
}
}
String talendType = column.getTalendType();
if ("id_Date".equals(talendType)
|| "id_Timestamp".equals(talendType)

View File

@@ -636,13 +636,22 @@
<DEFAULT>false</DEFAULT>
</PARAMETER>
<PARAMETER
NAME="USE_PRECISION_LENGTH_FROM_SCHEMA"
FIELD="CHECK"
NUM_ROW="115"
REQUIRED="true"
>
<DEFAULT>false</DEFAULT>
</PARAMETER>
</ADVANCED_PARAMETERS>
<CODEGENERATION>
<IMPORTS>
<IMPORT NAME="Driver-EXASolution" MODULE="exajdbc-6.0.9302.jar" MVN="mvn:org.talend.libraries/exajdbc-6.0.9302/6.3.0" REQUIRED="true" />
<IMPORT NAME="Talend-DB-Exasol-Util" MODULE="talend-db-exasol-2.1.2.jar" MVN="mvn:org.talend.libraries/talend-db-exasol-2.1.2/6.2.0"
UrlPath="platform:/plugin/org.talend.libraries.jdbc.exasol/lib/talend-db-exasol-2.1.2.jar" REQUIRED="true" />
<IMPORT NAME="Talend-DB-Exasol-Util" MODULE="talend-db-exasol-2.1.4.jar" MVN="mvn:org.talend.components.lib/talend-db-exasol/2.1.4"
UrlPath="platform:/plugin/org.talend.libraries.jdbc.exasol/lib/talend-db-exasol-2.1.4.jar" REQUIRED="true" />
</IMPORTS>
</CODEGENERATION>

View File

@@ -109,3 +109,5 @@ NB_LINE_DELETED.NAME=Rows deleted
SOURCE_QUERY.NAME=Source query
TEST_MODE.NAME=Test mode (no statements are executed)
USE_PRECISION_LENGTH_FROM_SCHEMA.NAME=Use precision and length from schema

View File

@@ -178,7 +178,7 @@
<IMPORTS>
<IMPORT NAME="Java_DOM4J1.6" MODULE="dom4j-1.6.1.jar" MVN="mvn:dom4j/dom4j/1.6.1" UrlPath="platform:/plugin/org.talend.libraries.dom4j-jaxen/lib/dom4j-1.6.1.jar" REQUIRED_IF="READ_BY == 'XPATH'" BundleID="" />
<IMPORT NAME="Java_JAXEN1.1" MODULE="jaxen-1.1.1.jar" MVN="mvn:org.talend.libraries/jaxen-1.1.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.dom4j-jaxen/lib/jaxen-1.1.1.jar" REQUIRED_IF="READ_BY == 'XPATH'" BundleID="" />
<IMPORT NAME="json-lib" MODULE="json-lib-2.4.1-talend.jar" MVN="mvn:net.sf.json-lib/json-lib/2.4.1-talend" REQUIRED_IF="READ_BY == 'XPATH'" />
<IMPORT NAME="json-lib" MODULE="json-lib-2.4.5-talend.jar" MVN="mvn:net.sf.json-lib/json-lib/2.4.5-talend" REQUIRED_IF="READ_BY == 'XPATH'" />
<IMPORT NAME="commons_lang" MODULE="commons-lang-2.6.jar" MVN="mvn:commons-lang/commons-lang/2.6" UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-lang-2.6.jar" REQUIRED_IF="READ_BY == 'XPATH'" />
<IMPORT NAME="commons_logging" MODULE="commons-logging-1.1.1.jar" MVN="mvn:org.talend.libraries/commons-logging-1.1.1/6.0.0" UrlPath="platform:/base/plugins/org.apache.commons.logging_1.1.1.v201101211721.jar" REQUIRED_IF="READ_BY == 'XPATH'" />
<IMPORT NAME="ezmorph" MODULE="ezmorph-1.0.6.jar" MVN="mvn:org.talend.libraries/ezmorph-1.0.6/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.jackson/lib/ezmorph-1.0.6.jar" REQUIRED_IF="READ_BY == 'XPATH'" />

View File

@@ -239,7 +239,7 @@
<IMPORT NAME="Java-FTP" MODULE="edtftpj-2.5.0.jar" MVN="mvn:com.enterprisedt/edtftpj/2.5.0" UrlPath="platform:/plugin/org.talend.libraries.ftp/lib/edtftpj-2.5.0.jar" REQUIRED_IF="(SFTP == 'false') AND (FTPS == 'false')"/>
<IMPORT NAME="Java-SFTP" MODULE="jsch-0.1.55.jar" MVN="mvn:com.jcraft/jsch/0.1.55" REQUIRED_IF="(SFTP == 'true')"/>
<IMPORT NAME="Java-FTPS" MODULE="commons-net-3.6.jar" MVN="mvn:commons-net/commons-net/3.6" REQUIRED_IF="(FTPS == 'true')" />
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190128.jar" MVN="mvn:org.talend.libraries/commons-net-ftps-proxy/3.6.1-talend-20190128" REQUIRED_IF="(FTPS == 'true')" />
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190819.jar" MVN="mvn:org.talend.components.lib/commons-net-ftps-proxy/3.6.1-talend-20190819" REQUIRED_IF="(FTPS == 'true')" />
</IMPORTS>
</CODEGENERATION>

View File

@@ -296,8 +296,8 @@
<IMPORT NAME="Java-SFTP" MODULE="jsch-0.1.55.jar" MVN="mvn:com.jcraft/jsch/0.1.55" REQUIRED_IF="(SFTP == 'true') AND (USE_EXISTING_CONNECTION == 'false')"/>
<IMPORT NAME="jakarta-oro" MODULE="jakarta-oro-2.0.8.jar" MVN="mvn:org.talend.libraries/jakarta-oro-2.0.8/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache/lib/jakarta-oro-2.0.8.jar" REQUIRED="true" />
<IMPORT NAME="Java-FTPS" MODULE="commons-net-3.6.jar" MVN="mvn:commons-net/commons-net/3.6" REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190128.jar"
MVN="mvn:org.talend.libraries/commons-net-ftps-proxy/3.6.1-talend-20190128" UrlPath="platform:/plugin/org.talend.designer.components.localprovider/components/tFTPConnection/commons-net-ftps-proxy-3.6.1-talend-20190128.jar"
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190819.jar"
MVN="mvn:org.talend.components.lib/commons-net-ftps-proxy/3.6.1-talend-20190819"
REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
</IMPORTS>
</CODEGENERATION>

View File

@@ -283,8 +283,8 @@ COMPATIBILITY="ALL"
<IMPORT NAME="Java-FTP" MODULE="edtftpj-2.5.0.jar" MVN="mvn:com.enterprisedt/edtftpj/2.5.0" UrlPath="platform:/plugin/org.talend.libraries.ftp/lib/edtftpj-2.5.0.jar" REQUIRED_IF="(SFTP == 'false') AND (FTPS == 'false') AND (USE_EXISTING_CONNECTION == 'false')"/>
<IMPORT NAME="Java-SFTP" MODULE="jsch-0.1.55.jar" MVN="mvn:com.jcraft/jsch/0.1.55" REQUIRED_IF="(SFTP == 'true') AND (USE_EXISTING_CONNECTION == 'false')"/>
<IMPORT NAME="Java-FTPS" MODULE="commons-net-3.6.jar" MVN="mvn:commons-net/commons-net/3.6" REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190128.jar"
MVN="mvn:org.talend.libraries/commons-net-ftps-proxy/3.6.1-talend-20190128" UrlPath="platform:/plugin/org.talend.designer.components.localprovider/components/tFTPConnection/commons-net-ftps-proxy-3.6.1-talend-20190128.jar"
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190819.jar"
MVN="mvn:org.talend.components.lib/commons-net-ftps-proxy/3.6.1-talend-20190819"
REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
</IMPORTS>
</CODEGENERATION>

View File

@@ -433,8 +433,8 @@ if (sftp) {// *** sftp *** //
<%}%>
String remotedir_<%=cid %> = (<%=remotedir%>).replaceAll("\\\\","/");
ftp_<%=cid %>.chdir(remotedir_<%=cid %>);
String[] fileList_<%=cid %> = ftp_<%=cid %>.dir(null, true);
String[] fileListwithNames_<%=cid %> = ftp_<%=cid %>.dir(null, false);
com.enterprisedt.net.ftp.FTPFile[] fileList_<%=cid %> = ftp_<%=cid %>.dirDetails(null);
String[] arrayWithNames_<%=cid %> = ftp_<%=cid %>.dir(null, false);
<%
if (("true").equals(useExistingConn)) {
if(!moveToCurrentDir){
@@ -449,13 +449,18 @@ if (sftp) {// *** sftp *** //
for (String filemask_<%=cid %> : maskList_<%=cid %>) {
java.util.regex.Pattern fileNamePattern_<%=cid %> = java.util.regex.Pattern.compile(filemask_<%=cid %>.replaceAll("\\.", "\\\\.").replaceAll("\\*", ".*"));
for (int i_<%=cid%> = 0; i_<%=cid%> < fileList_<%=cid%>.length; i_<%=cid%>++){
String filemaskTemp_<%=cid%> = fileList_<%=cid%>[i_<%=cid%>];
String filemaskTempName_<%=cid%> = fileListwithNames_<%=cid%>[i_<%=cid%>];
java.util.Set<String> setWithNames_<%=cid %> = new java.util.HashSet<>(java.util.Arrays.asList(arrayWithNames_<%=cid %>));
for (com.enterprisedt.net.ftp.FTPFile ftpFile : fileList_<%=cid %>){
String filemaskTemp_<%=cid%> = "";
String filemaskTempName_<%=cid%> = "";
if (setWithNames_<%=cid %>.contains(ftpFile.getName())){
filemaskTemp_<%=cid%> = ftpFile.getRaw();
filemaskTempName_<%=cid%> = ftpFile.getName();
if (fileNamePattern_<%=cid %>.matcher(filemaskTempName_<%=cid %>).matches()) {
fileListTemp_<%=cid %>.add(filemaskTemp_<%=cid %>);
fileListTempWithNames_<%=cid%>.add(fileListwithNames_<%=cid%>[i_<%=cid%>]);
fileListTempWithNames_<%=cid%>.add(filemaskTempName_<%=cid%>);
}
}
}
}

View File

@@ -261,8 +261,8 @@
<IMPORT NAME="Java-FTP" MODULE="edtftpj-2.5.0.jar" MVN="mvn:com.enterprisedt/edtftpj/2.5.0" REQUIRED_IF="(SFTP == 'false') AND (FTPS == 'false') AND (USE_EXISTING_CONNECTION == 'false')"/>
<IMPORT NAME="Java-SFTP" MODULE="jsch-0.1.55.jar" MVN="mvn:com.jcraft/jsch/0.1.55" REQUIRED_IF="(SFTP == 'true') AND (USE_EXISTING_CONNECTION == 'false')"/>
<IMPORT NAME="Java-FTPS" MODULE="commons-net-3.6.jar" MVN="mvn:commons-net/commons-net/3.6" REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190128.jar"
MVN="mvn:org.talend.libraries/commons-net-ftps-proxy/3.6.1-talend-20190128" UrlPath="platform:/plugin/org.talend.designer.components.localprovider/components/tFTPConnection/commons-net-ftps-proxy-3.6.1-talend-20190128.jar"
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190819.jar"
MVN="mvn:org.talend.components.lib/commons-net-ftps-proxy/3.6.1-talend-20190819"
REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
</IMPORTS>
</CODEGENERATION>

View File

@@ -258,8 +258,8 @@
<IMPORT NAME="Java-FTP" MODULE="edtftpj-2.5.0.jar" MVN="mvn:com.enterprisedt/edtftpj/2.5.0" UrlPath="platform:/plugin/org.talend.libraries.ftp/lib/edtftpj-2.5.0.jar" REQUIRED_IF="(SFTP == 'false') AND (FTPS == 'false') AND (USE_EXISTING_CONNECTION == 'false')"/>
<IMPORT NAME="Java-SFTP" MODULE="jsch-0.1.55.jar" MVN="mvn:com.jcraft/jsch/0.1.55" REQUIRED_IF="(SFTP == 'true') AND (USE_EXISTING_CONNECTION == 'false')"/>
<IMPORT NAME="Java-FTPS" MODULE="commons-net-3.6.jar" MVN="mvn:commons-net/commons-net/3.6" REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190128.jar"
MVN="mvn:org.talend.libraries/commons-net-ftps-proxy/3.6.1-talend-20190128" UrlPath="platform:/plugin/org.talend.designer.components.localprovider/components/tFTPConnection/commons-net-ftps-proxy-3.6.1-talend-20190128.jar"
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190819.jar"
MVN="mvn:org.talend.components.lib/commons-net-ftps-proxy/3.6.1-talend-20190819"
REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
</IMPORTS>
</CODEGENERATION>

View File

@@ -302,8 +302,8 @@ COMPATIBILITY="ALL"
<IMPORT NAME="Java-SFTP" MODULE="jsch-0.1.55.jar" MVN="mvn:com.jcraft/jsch/0.1.55" REQUIRED_IF="(SFTP == 'true') AND (USE_EXISTING_CONNECTION == 'false')"/>
<IMPORT NAME="jakarta-oro" MODULE="jakarta-oro-2.0.8.jar" MVN="mvn:org.talend.libraries/jakarta-oro-2.0.8/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache/lib/jakarta-oro-2.0.8.jar" REQUIRED="true" />
<IMPORT NAME="Java-FTPS" MODULE="commons-net-3.6.jar" MVN="mvn:commons-net/commons-net/3.6" REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')"/>
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190128.jar"
MVN="mvn:org.talend.libraries/commons-net-ftps-proxy/3.6.1-talend-20190128" UrlPath="platform:/plugin/org.talend.designer.components.localprovider/components/tFTPConnection/commons-net-ftps-proxy-3.6.1-talend-20190128.jar"
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190819.jar"
MVN="mvn:org.talend.components.lib/commons-net-ftps-proxy/3.6.1-talend-20190819"
REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
</IMPORTS>
</CODEGENERATION>

View File

@@ -346,8 +346,8 @@ COMPATIBILITY="ALL"
<IMPORT NAME="Java-FTP" MODULE="edtftpj-2.5.0.jar" MVN="mvn:com.enterprisedt/edtftpj/2.5.0" UrlPath="platform:/plugin/org.talend.libraries.ftp/lib/edtftpj-2.5.0.jar" REQUIRED_IF="(SFTP == 'false') AND (FTPS == 'false') AND (USE_EXISTING_CONNECTION == 'false')"/>
<IMPORT NAME="Java-SFTP" MODULE="jsch-0.1.55.jar" MVN="mvn:com.jcraft/jsch/0.1.55" REQUIRED_IF="(SFTP == 'true') AND (USE_EXISTING_CONNECTION == 'false')"/>
<IMPORT NAME="Java-FTPS" MODULE="commons-net-3.6.jar" MVN="mvn:commons-net/commons-net/3.6" REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')"/>
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190128.jar"
MVN="mvn:org.talend.libraries/commons-net-ftps-proxy/3.6.1-talend-20190128" UrlPath="platform:/plugin/org.talend.designer.components.localprovider/components/tFTPConnection/commons-net-ftps-proxy-3.6.1-talend-20190128.jar"
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190819.jar"
MVN="mvn:org.talend.components.lib/commons-net-ftps-proxy/3.6.1-talend-20190819"
REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
</IMPORTS>
</CODEGENERATION>

View File

@@ -264,8 +264,8 @@ COMPATIBILITY="ALL"
<IMPORT NAME="Java-FTP" MODULE="edtftpj-2.5.0.jar" MVN="mvn:com.enterprisedt/edtftpj/2.5.0" UrlPath="platform:/plugin/org.talend.libraries.ftp/lib/edtftpj-2.5.0.jar" REQUIRED_IF="(SFTP == 'false') AND (FTPS == 'false') AND (USE_EXISTING_CONNECTION == 'false')"/>
<IMPORT NAME="Java-SFTP" MODULE="jsch-0.1.55.jar" MVN="mvn:com.jcraft/jsch/0.1.55" REQUIRED_IF="(SFTP == 'true') AND (USE_EXISTING_CONNECTION == 'false')"/>
<IMPORT NAME="Java-FTPS" MODULE="commons-net-3.6.jar" MVN="mvn:commons-net/commons-net/3.6" REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190128.jar"
MVN="mvn:org.talend.libraries/commons-net-ftps-proxy/3.6.1-talend-20190128" UrlPath="platform:/plugin/org.talend.designer.components.localprovider/components/tFTPConnection/commons-net-ftps-proxy-3.6.1-talend-20190128.jar"
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190819.jar"
MVN="mvn:org.talend.components.lib/commons-net-ftps-proxy/3.6.1-talend-20190819"
REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
</IMPORTS>
</CODEGENERATION>

View File

@@ -253,8 +253,8 @@ COMPATIBILITY="ALL"
<IMPORT NAME="Java-SFTP" MODULE="jsch-0.1.55.jar" MVN="mvn:com.jcraft/jsch/0.1.55" REQUIRED_IF="(SFTP == 'true') AND (USE_EXISTING_CONNECTION == 'false')"/>
<IMPORT NAME="jakarta-oro" MODULE="jakarta-oro-2.0.8.jar" MVN="mvn:org.talend.libraries/jakarta-oro-2.0.8/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache/lib/jakarta-oro-2.0.8.jar" REQUIRED="true" />
<IMPORT NAME="Java-FTPS" MODULE="commons-net-3.6.jar" MVN="mvn:commons-net/commons-net/3.6" REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190128.jar"
MVN="mvn:org.talend.libraries/commons-net-ftps-proxy/3.6.1-talend-20190128" UrlPath="platform:/plugin/org.talend.designer.components.localprovider/components/tFTPConnection/commons-net-ftps-proxy-3.6.1-talend-20190128.jar"
<IMPORT NAME="Java-FTPS-talend" MODULE="commons-net-ftps-proxy-3.6.1-talend-20190819.jar"
MVN="mvn:org.talend.components.lib/commons-net-ftps-proxy/3.6.1-talend-20190819"
REQUIRED_IF="(FTPS == 'true') AND (USE_EXISTING_CONNECTION == 'false')" />
</IMPORTS>
</CODEGENERATION>

View File

@@ -131,7 +131,7 @@
<CODEGENERATION>
<IMPORTS>
<IMPORT NAME="COMMONS-COMPRESS-1.10" MODULE="commons-compress-1.10.jar" MVN="mvn:org.talend.libraries/commons-compress-1.10/6.1.0" UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-compress-1.10.jar" REQUIRED="true" />
<IMPORT NAME="commons-compress" MODULE="commons-compress-1.19.jar" MVN="mvn:org.apache.commons/commons-compress/1.19" REQUIRED="true" />
<IMPORT NAME="Encrypt-Zip" MODULE="checkArchive-1.1-20181130.jar" MVN="mvn:org.talend.libraries/checkArchive-1.1-20181130/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.custom/lib/checkArchive-1.1-20181130.jar" REQUIRED="true" />
<IMPORT NAME="zip4j_1.3.1.jar" MODULE="zip4j_1.3.1.jar" MVN="mvn:org.talend.libraries/zip4j_1.3.1/6.0.0" REQUIRED="true" />
<IMPORT NAME="talendzip-1.0-20190527.jar" MODULE="talendzip-1.0-20190527.jar" MVN="mvn:org.talend.libraries/talendzip/1.0-20190527" UrlPath="platform:/plugin/org.talend.libraries.custom/lib/talendzip-1.0-20190527.jar" REQUIRED="true" />

View File

@@ -143,7 +143,10 @@
<CODEGENERATION>
<IMPORTS>
<IMPORT NAME="filecopy" MODULE="filecopy.jar" MVN="mvn:org.talend.libraries/filecopy/6.0.0" REQUIRED="true" />
<IMPORT NAME="filecopy" MODULE="filecopy-2.0.0.jar"
MVN="mvn:org.talend.libraries/filecopy/2.0.0"
UrlPath="platform:/plugin/org.talend.libraries.custom/lib/filecopy-2.0.0.jar"
REQUIRED="true" />
</IMPORTS>
</CODEGENERATION>

View File

@@ -185,7 +185,7 @@
<IMPORT NAME="simpleexcel" MODULE="simpleexcel-2.1-20190507.jar" MVN="mvn:org.talend.libraries/simpleexcel-2.1-20190507/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.excel/lib/simpleexcel-2.1-20190507.jar" REQUIRED_IF="(VERSION_2007 == 'true') AND GENERATION_MODE == 'EVENT_MODE')" />
<IMPORT NAME="commons-collections4" MODULE="commons-collections4-4.1.jar" MVN="mvn:org.talend.libraries/commons-collections4-4.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.excel/lib/commons-collections4-4.1.jar" REQUIRED_IF="(VERSION_2007 == 'true')" />
<IMPORT NAME="commons-compress" MODULE="commons-compress-1.18.jar" MVN="mvn:org.apache.commons/commons-compress/1.18" REQUIRED_IF="(VERSION_2007 == 'true')" />
<IMPORT NAME="commons-compress" MODULE="commons-compress-1.19.jar" MVN="mvn:org.apache.commons/commons-compress/1.19" REQUIRED_IF="(VERSION_2007 == 'true')" />
<IMPORT NAME="commons-math3" MODULE="commons-math3-3.6.1.jar" MVN="mvn:org.apache.commons/commons-math3/3.6.1" REQUIRED_IF="(VERSION_2007 == 'true')" />
</IMPORTS>
</CODEGENERATION>

View File

@@ -165,7 +165,7 @@
REQUIRED_IF="(READ_BY == 'XPATH')" BundleID="" />
<IMPORT NAME="Java_JAXEN1.1" MODULE="jaxen-1.1.1.jar" MVN="mvn:org.talend.libraries/jaxen-1.1.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.dom4j-jaxen/lib/jaxen-1.1.1.jar"
REQUIRED_IF="(READ_BY == 'XPATH')" BundleID="" />
<IMPORT NAME="json-lib" MODULE="json-lib-2.4.1-talend.jar" MVN="mvn:net.sf.json-lib/json-lib/2.4.1-talend" REQUIRED_IF="(READ_BY == 'XPATH')" />
<IMPORT NAME="json-lib" MODULE="json-lib-2.4.5-talend.jar" MVN="mvn:net.sf.json-lib/json-lib/2.4.5-talend" REQUIRED_IF="(READ_BY == 'XPATH')" />
<IMPORT NAME="commons_lang" MODULE="commons-lang-2.6.jar" MVN="mvn:commons-lang/commons-lang/2.6" UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-lang-2.6.jar"
REQUIRED_IF="(READ_BY == 'XPATH')" />
<IMPORT NAME="commons_logging" MODULE="commons-logging-1.1.1.jar" MVN="mvn:org.talend.libraries/commons-logging-1.1.1/6.0.0" UrlPath="platform:/base/plugins/org.apache.commons.logging_1.1.1.v201101211721.jar"

View File

@@ -76,8 +76,10 @@
String part_<%=cid %> = mailParts_<%=cid %>[i_<%=cid %>];
String sep_<%=cid%>= mailSeparator_<%=cid %>[i_<%=cid %>];
if(part_<%=cid %>.equalsIgnoreCase("body")) {
boolean multiValueBody_<%=cid%> = ("true").equals(mailChecked_<%=cid %>[i_<%=cid%>]);
if(msg_<%=cid %>.isMimeType("multipart/*")) {
javax.mail.Multipart mp<%=cid%> = (javax.mail.Multipart) msg_<%=cid %>.getContent();
StringBuilder body_<%=cid %> = new StringBuilder();
for (int i = 0; i < mp<%=cid%>.getCount(); i++) {
javax.mail.BodyPart mpart<%=cid%> = mp<%=cid%>.getBodyPart(i);
String disposition<%=cid%> = mpart<%=cid%>.getDisposition();
@@ -99,26 +101,42 @@
for(int j_<%=cid %>_body = 0; j_<%=cid %>_body < mimeMultipart_<%=cid %>_body.getCount(); j_<%=cid %>_body++){
javax.mail.BodyPart bodyPart_<%=cid %>_body = mimeMultipart_<%=cid %>_body.getBodyPart(j_<%=cid %>_body);
if (bodyPart_<%=cid %>_body.isMimeType("text/*")) {
if(multiValueBody_<%=cid%>) {
body_<%=cid %>.append(bodyPart_<%=cid %>_body.getContent().toString()).append(sep_<%=cid%>);
} else {
list_<%=cid %>.add(bodyPart_<%=cid %>_body.getContent().toString());
}
} else {
System.out.println("Ignore the part " + bodyPart_<%=cid %>_body.getContentType());
}
}
}else{
if (bodyPart_<%=cid %>.isMimeType("text/*")) {
if(multiValueBody_<%=cid%>) {
body_<%=cid %>.append(bodyPart_<%=cid %>.getContent().toString()).append(sep_<%=cid%>);
} else {
list_<%=cid %>.add(bodyPart_<%=cid %>.getContent().toString());
}
} else {
System.out.println("Ignore the part " + bodyPart_<%=cid %>.getContentType());
}
}
}
} else {
if(multiValueBody_<%=cid%>) {
body_<%=cid %>.append(mpart<%=cid%>.getContent().toString()).append(sep_<%=cid%>);
} else {
list_<%=cid %>.add(mpart<%=cid%>.getContent().toString());
}
}
}catch (java.io.UnsupportedEncodingException e){
java.io.ByteArrayOutputStream bao_<%=cid%> = new java.io.ByteArrayOutputStream();
mpart<%=cid %>.writeTo(bao_<%=cid%>);
if(multiValueBody_<%=cid%>) {
body_<%=cid %>.append(bao_<%=cid%>.toString()).append(sep_<%=cid%>);
} else {
list_<%=cid %>.add(bao_<%=cid%>.toString());
}
<%if(isLog4jEnabled){%>
log.warn("<%=cid%> - " + bao_<%=cid%>.toString());
<%}%>
@@ -127,9 +145,16 @@
//both attachment and message context in the email,bug TDI-19065
%>
}else if(disposition<%=cid%> != null && disposition<%=cid%>.equals(javax.mail.Part.INLINE)){
if(multiValueBody_<%=cid%>) {
body_<%=cid %>.append(mpart<%=cid%>.getContent().toString()).append(sep_<%=cid%>);
} else {
list_<%=cid %>.add(mpart<%=cid%>.getContent().toString());
}
}
}
if(multiValueBody_<%=cid%>) {
list_<%=cid %>.add(body_<%=cid %>.toString());
}
} else {
java.io.InputStream in_<%=cid %> = msg_<%=cid %>.getInputStream();
byte[] buffer_<%=cid %> = new byte[1024];

View File

@@ -220,7 +220,7 @@
<CODEGENERATION>
<IMPORTS>
<IMPORT NAME="Java_Excel" MODULE="jxl.jar" MVN="mvn:org.talend.libraries/jxl/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.jexcel/lib/jxl.jar" REQUIRED_IF="(VERSION_2007 == 'false')" />
<IMPORT NAME="TALEND_EXCEL" MODULE="talendExcel-1.4-20190531.jar" MVN="mvn:org.talend.libraries/talendExcel-1.4-20190531/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.excel/lib/talendExcel-1.4-20190531.jar" REQUIRED_IF="(VERSION_2007 == 'true')" />
<IMPORT NAME="TALEND_EXCEL" MODULE="talendExcel-1.5-20190731.jar" MVN="mvn:org.talend.libraries/talendExcel-1.5-20190731/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.excel/lib/talendExcel-1.5-20190731.jar" REQUIRED_IF="(VERSION_2007 == 'true')" />
<IMPORT NAME="commons-lang3" MODULE="commons-lang3-3.8.1.jar" MVN="mvn:org.apache.commons/commons-lang3/3.8.1" REQUIRED_IF="(VERSION_2007 == 'true')" />
<IMPORT NAME="dom4j" MODULE="dom4j-1.6.1.jar" MVN="mvn:dom4j/dom4j/1.6.1" UrlPath="platform:/plugin/org.talend.libraries.dom4j-jaxen/lib/dom4j-1.6.1.jar" REQUIRED_IF="(VERSION_2007 == 'true')" BundleID="" />
<IMPORT NAME="geronimo-stax-api" MODULE="geronimo-stax-api_1.0_spec-1.0.1.jar" MVN="mvn:org.talend.libraries/geronimo-stax-api_1.0_spec-1.0.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/geronimo-stax-api_1.0_spec-1.0.1.jar" REQUIRED_IF="(VERSION_2007 == 'true')" BundleID="" />
@@ -232,7 +232,7 @@
<IMPORT NAME="xmlbeans" MODULE="xmlbeans-3.1.0.jar" MVN="mvn:org.apache.xmlbeans/xmlbeans/3.1.0" REQUIRED_IF="(VERSION_2007 == 'true')" />
<IMPORT NAME="commons-collections4" MODULE="commons-collections4-4.1.jar" MVN="mvn:org.talend.libraries/commons-collections4-4.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.excel/lib/commons-collections4-4.1.jar" REQUIRED_IF="(VERSION_2007 == 'true')" />
<IMPORT NAME="commons-compress" MODULE="commons-compress-1.18.jar" MVN="mvn:org.apache.commons/commons-compress/1.18" REQUIRED_IF="(VERSION_2007 == 'true')" />
<IMPORT NAME="commons-compress" MODULE="commons-compress-1.19.jar" MVN="mvn:org.apache.commons/commons-compress/1.19" REQUIRED_IF="(VERSION_2007 == 'true')" />
<IMPORT NAME="commons-math3" MODULE="commons-math3-3.6.1.jar" MVN="mvn:org.apache.commons/commons-math3/3.6.1" REQUIRED_IF="(VERSION_2007 == 'true')" />
</IMPORTS>
</CODEGENERATION>

View File

@@ -86,7 +86,7 @@
<CODEGENERATION>
<IMPORTS>
<IMPORT NAME="COMMONS-COMPRESS-1.10" MODULE="commons-compress-1.10.jar" MVN="mvn:org.talend.libraries/commons-compress-1.10/6.1.0" UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-compress-1.10.jar" REQUIRED="true" />
<IMPORT NAME="commons-compress" MODULE="commons-compress-1.19.jar" MVN="mvn:org.apache.commons/commons-compress/1.19" REQUIRED="true" />
<IMPORT NAME="Ant-Zip" MODULE="ant-1.10.1.jar" MVN="mvn:org.apache.ant/ant/1.10.1" REQUIRED="true" />
<IMPORT NAME="Check-Archive" MODULE="checkArchive-1.1-20181130.jar" MVN="mvn:org.talend.libraries/checkArchive-1.1-20181130/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.custom/lib/checkArchive-1.1-20181130.jar" REQUIRED="true" />
<IMPORT NAME="zip4j_1.3.1.jar" MODULE="zip4j_1.3.1.jar" MVN="mvn:org.talend.libraries/zip4j_1.3.1/6.0.0" REQUIRED="true" />

View File

@@ -13,9 +13,22 @@
INode node = (INode)codeGenArgument.getArgument();
String cid = node.getUniqueName();
String confLib = ElementParameterParser.getValue(node, "__CONF_LIB__");
Boolean setHadoopConf = ElementParameterParser.getBooleanValue(node, "__SET_HADOOP_CONF__");
String customHadoopConfPath = ElementParameterParser.getValue(node, "__HADOOP_CONF_SPECIFIC_JAR__");
if (setHadoopConf == null) {
setHadoopConf = Boolean.FALSE;
}
%>
<% if(confLib != null && confLib.length() > 0){%>
<% if((confLib != null && confLib.length() > 0) || setHadoopConf){%>
String libPath_<%=cid %> = "";
<% if (setHadoopConf) { %>
libPath_<%=cid %> = <%=customHadoopConfPath %>;
<% } else { %>
class DealJobLibrary_<%=cid%> {
@@ -75,14 +88,9 @@ class DealJobLibrary_<%=cid%> {
}
java.net.URLClassLoader currentLoader<%=cid %> = (java.net.URLClassLoader) Thread.currentThread().getContextClassLoader();
java.lang.reflect.Method method_<%=cid %> = java.net.URLClassLoader.class.getDeclaredMethod("addURL", new Class[] { java.net.URL.class });
method_<%=cid %>.setAccessible(true);
DealJobLibrary_<%=cid%> dealJobLibrary = new DealJobLibrary_<%=cid%>();
String confJarName = dealJobLibrary.getConfJarName(<%=confLib %>, this.contextStr);
String libPath_<%=cid %> = "";
<%if (ProcessorUtilities.isExportConfig()) {%>
libPath_<%=cid %> = "../lib/" + confJarName;
<%} else {
@@ -90,6 +98,11 @@ String libPath_<%=cid %> = "";
libPath_<%=cid %> = new java.io.File("<%=libFolder %>/" + confJarName).getAbsolutePath();
<%}%>
libPath_<%=cid %> = dealJobLibrary.replaceJarPathsFromCrcMap(libPath_<%=cid %>);
<%}%>
java.net.URLClassLoader currentLoader<%=cid %> = (java.net.URLClassLoader) Thread.currentThread().getContextClassLoader();
java.lang.reflect.Method method_<%=cid %> = java.net.URLClassLoader.class.getDeclaredMethod("addURL", new Class[] { java.net.URL.class });
method_<%=cid %>.setAccessible(true);
method_<%=cid %>.invoke(currentLoader<%=cid %>, new Object[] { new java.io.File(libPath_<%=cid %>).toURL() });
<%}%>

View File

@@ -41,6 +41,12 @@
REQUIRED="true"
>
<DEFAULT></DEFAULT>
</PARAMETER>
<PARAMETER NAME="SET_HADOOP_CONF" FIELD="CHECK" NUM_ROW="2" REPOSITORY_VALUE="SET_HADOOP_CONF" >
<DEFAULT>false</DEFAULT>
</PARAMETER>
<PARAMETER NAME="HADOOP_CONF_SPECIFIC_JAR" FIELD="TEXT" NUM_ROW="2" REPOSITORY_VALUE="HADOOP_CONF_SPECIFIC_JAR" >
<DEFAULT>"path/to/hadoop_conf.jar"</DEFAULT>
</PARAMETER>
</PARAMETERS>

View File

@@ -57,7 +57,7 @@
<CODEGENERATION>
<IMPORTS>
<IMPORT NAME="thashfile-3.0-20170711" MODULE="thashfile-3.0-20170711.jar" MVN="mvn:org.talend.libraries/thashfile-3.0-20170711/6.0.0" REQUIRED="true" />
<IMPORT NAME="thashfile-3.1-20190910" MODULE="thashfile-3.1-20190910.jar" MVN="mvn:org.talend.components.lib/thashfile/3.1-20190910" REQUIRED="true" />
</IMPORTS>
</CODEGENERATION>

View File

@@ -82,7 +82,7 @@
<CODEGENERATION>
<IMPORTS>
<IMPORT NAME="thashfile-3.0-20170711" MODULE="thashfile-3.0-20170711.jar" MVN="mvn:org.talend.libraries/thashfile-3.0-20170711/6.0.0" REQUIRED="true" />
<IMPORT NAME="thashfile-3.1-20190910" MODULE="thashfile-3.1-20190910.jar" MVN="mvn:org.talend.components.lib/thashfile/3.1-20190910" REQUIRED="true" />
</IMPORTS>
</CODEGENERATION>

View File

@@ -17,17 +17,20 @@
<% if(hotLibs!=null&&hotLibs.size() > 0){%>
java.net.URLClassLoader sysloader_<%=cid %> = (java.net.URLClassLoader) ClassLoader.getSystemClassLoader();
java.lang.reflect.Method method_<%=cid %> = java.net.URLClassLoader.class.getDeclaredMethod("addURL", new Class[] { java.net.URL.class });
method_<%=cid %>.setAccessible(true);
String[] libPaths_<%=cid %> = new String[] { <% for(Map<String, String> item : hotLibs) {%> <%=item.get("LIBPATH") %>, <%}%> };
java.util.List<java.net.URL> libURL_<%=cid %> = new java.util.ArrayList<>();
for(String lib_<%=cid %>:libPaths_<%=cid %>) {
String separator_<%=cid %> = System.getProperty("path.separator");
String[] jarFiles_<%=cid %> = lib_<%=cid %>.split(separator_<%=cid %>);
for(String jarFile_<%=cid %> : jarFiles_<%=cid %>) {
method_<%=cid %>.invoke(sysloader_<%=cid %>, new Object[] { new java.io.File(jarFile_<%=cid %>).toURL() });
libURL_<%=cid %>.add( new java.io.File(jarFile_<%=cid %>).toURI().toURL() );
}
}
java.net.URL[] libURLArray_<%=cid %> = libURL_<%=cid %>.toArray(new java.net.URL[] {});
ClassLoader threadClassLoader_<%=cid %> = Thread.currentThread().getContextClassLoader();
java.net.URLClassLoader newthreadClassLoader_<%=cid %> = new java.net.URLClassLoader(libURLArray_<%=cid %>, threadClassLoader_<%=cid %>);
Thread.currentThread().setContextClassLoader(newthreadClassLoader_<%=cid %>);
<%}%>

View File

@@ -188,7 +188,7 @@
<IMPORT NAME="MSAX-Ncacn_ip_tcp" MODULE="b-ncacn_ip_tcp.jar" MVN="mvn:org.talend.libraries/b-ncacn_ip_tcp/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.microsoft/lib/b-ncacn_ip_tcp.jar" REQUIRED="false" REQUIRED_IF="CONNECTION_TYPE == 'DCOM'" />
<IMPORT NAME="MSAX-Ncacn_np" MODULE="b-ncacn_np.jar" MVN="mvn:org.talend.libraries/b-ncacn_np/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.microsoft/lib/b-ncacn_np.jar" REQUIRED="false" REQUIRED_IF="CONNECTION_TYPE == 'DCOM'"/>
<IMPORT NAME="MSAX-Ntlm-securityt" MODULE="b-ntlm-security.jar" MVN="mvn:org.talend.libraries/b-ntlm-security/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.microsoft/lib/b-ntlm-security.jar" REQUIRED="false" REQUIRED_IF="CONNECTION_TYPE == 'DCOM'"/>
<IMPORT NAME="MSAX-NET-CONNECTOR" MODULE="janet-java-1.0.jar" MVN="mvn:org.talend.libraries/janet-java-1.0/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.microsoft/lib/janet-java-1.0.jar" REQUIRED="false" REQUIRED_IF="CONNECTION_TYPE == 'DOTNET'"/>
<IMPORT NAME="MSAX-NET-CONNECTOR" MODULE="janet-java-1.2.jar" MVN="mvn:org.talend.libraries/janet-java-1.2/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.microsoft/lib/janet-java-1.2.jar" REQUIRED="false" REQUIRED_IF="CONNECTION_TYPE == 'DOTNET'"/>
</IMPORTS>
</CODEGENERATION>

View File

@@ -262,7 +262,7 @@
<IMPORT NAME="MSAX-Ncacn_ip_tcp" MODULE="b-ncacn_ip_tcp.jar" MVN="mvn:org.talend.libraries/b-ncacn_ip_tcp/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.microsoft/lib/b-ncacn_ip_tcp.jar" REQUIRED="false" REQUIRED_IF="CONNECTION_TYPE == 'DCOM'" />
<IMPORT NAME="MSAX-Ncacn_np" MODULE="b-ncacn_np.jar" MVN="mvn:org.talend.libraries/b-ncacn_np/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.microsoft/lib/b-ncacn_np.jar" REQUIRED="false" REQUIRED_IF="CONNECTION_TYPE == 'DCOM'"/>
<IMPORT NAME="MSAX-Ntlm-securityt" MODULE="b-ntlm-security.jar" MVN="mvn:org.talend.libraries/b-ntlm-security/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.microsoft/lib/b-ntlm-security.jar" REQUIRED="false" REQUIRED_IF="CONNECTION_TYPE == 'DCOM'"/>
<IMPORT NAME="MSAX-NET-CONNECTOR" MODULE="janet-java-1.0.jar" MVN="mvn:org.talend.libraries/janet-java-1.0/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.microsoft/lib/janet-java-1.0.jar" REQUIRED="false" REQUIRED_IF="CONNECTION_TYPE == 'DOTNET'"/>
<IMPORT NAME="MSAX-NET-CONNECTOR" MODULE="janet-java-1.2.jar" MVN="mvn:org.talend.libraries/janet-java-1.2/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.microsoft/lib/janet-java-1.2.jar" REQUIRED="false" REQUIRED_IF="CONNECTION_TYPE == 'DOTNET'"/>
</IMPORTS>
</CODEGENERATION>

View File

@@ -69,3 +69,5 @@ imports="
globalMap.put("conn_<%=cid%>",conn_<%=cid%>);
globalMap.put("shareIdentitySetting_<%=cid%>", <%=ElementParameterParser.getValue(node, "__SHARE_IDENTITY_SETTING__")%>);
globalMap.put("driver_<%=cid%>", "<%=ElementParameterParser.getValue(node, "__DRIVER__")%>");

View File

@@ -454,8 +454,15 @@ for (int iInputTable = 0; iInputTable < sizeInputTables - 1; iInputTable++) { //
IMetadataTable table = connection.getMetadataTable();
List<IMetadataColumn> listColumns = table.getListColumns();
for (IMetadataColumn column : listColumns) {
%>this.<%= connection.getName() %>__<%= column.getLabel() %> = <%= connection.getName() %>.<%= column.getLabel() %>;
if ("Dynamic".equals(JavaTypesManager.getTypeToGenerate(column.getTalendType(), column.isNullable()))) {
%>
this.<%= connection.getName() %>__<%= column.getLabel() %> = (routines.system.Dynamic) <%= connection.getName() %>.<%= column.getLabel() %>.clone();
<%
} else {
%>
this.<%= connection.getName() %>__<%= column.getLabel() %> = <%= connection.getName() %>.<%= column.getLabel() %>;
<%
}
}
}
%>
@@ -463,10 +470,15 @@ for (int iInputTable = 0; iInputTable < sizeInputTables - 1; iInputTable++) { //
sizeNextColumns = nextColumnsKeys.size();
for (int iColumn = 0; iColumn < sizeNextColumns; iColumn++) { // T_TM_B_104
IMetadataColumn column = nextColumnsKeys.get(iColumn);
%>this.exprKey_<%= nextInputTable.getName() %>__<%=column.getLabel() %> = exprKey_<%= nextInputTable.getName() %>__<%=column.getLabel() %>;
if ("Dynamic".equals(JavaTypesManager.getTypeToGenerate(column.getTalendType(), column.isNullable()))) {
%>
this.exprKey_<%= nextInputTable.getName() %>__<%=column.getLabel() %> = (routines.system.Dynamic) exprKey_<%= nextInputTable.getName() %>__<%=column.getLabel() %>.clone();
<%
} else {
%>
this.exprKey_<%= nextInputTable.getName() %>__<%=column.getLabel() %> = exprKey_<%= nextInputTable.getName() %>__<%=column.getLabel() %>;
<%
}
} // T_TM_B_104
%>
}
@@ -660,7 +672,18 @@ for (int iInputTable = 0; iInputTable < sizeInputTables - 1; iInputTable++) { //
if (length == -1) {
this.<%= connection.getName() %>__<%= column.getLabel() %> = null;
} else {
<%
if ("Dynamic".equals(typeToGenerate)) {
hasAtLeastOneObjectType = true;
%>
this.<%= connection.getName() %>__<%= column.getLabel() %> = (<%= typeToGenerate %>) dis.readObject();
<%
} else {
%>
this.<%= connection.getName() %>__<%= column.getLabel() %> = dis.read<%= typeToGenerate %>();
<%
}
%>
}
<%
}
@@ -734,7 +757,18 @@ for (int iInputTable = 0; iInputTable < sizeInputTables - 1; iInputTable++) { //
if (length == -1) {
this.exprKey_<%= nextInputTable.getName() %>__<%= column.getLabel() %> = null;
} else {
<%
if ("Dynamic".equals(typeToGenerate)) {
hasAtLeastOneObjectType = true;
%>
this.exprKey_<%= nextInputTable.getName() %>__<%= column.getLabel() %> = (<%= typeToGenerate %>) dis.readObject();
<%
} else {
%>
this.exprKey_<%= nextInputTable.getName() %>__<%= column.getLabel() %> = dis.read<%= typeToGenerate %>();
<%
}
%>
}
<%
}
@@ -832,7 +866,17 @@ for (int iInputTable = 0; iInputTable < sizeInputTables - 1; iInputTable++) { //
dos.writeByte(-1);
} else {
dos.writeByte(0);
<%
if ("Dynamic".equals(typeToGenerate)) {
%>
dos.writeObject(this.<%= connection.getName() %>__<%= column.getLabel() %>);
<%
} else {
%>
dos.write<%= typeToGenerate %>(this.<%= connection.getName() %>__<%= column.getLabel() %>);
<%
}
%>
}
<%
@@ -893,7 +937,17 @@ for (int iInputTable = 0; iInputTable < sizeInputTables - 1; iInputTable++) { //
dos.writeByte(-1);
} else {
dos.writeByte(0);
<%
if ("Dynamic".equals(typeToGenerate)) {
%>
dos.writeObject(this.exprKey_<%= nextInputTable.getName() %>__<%= column.getLabel() %>);
<%
} else {
%>
dos.write<%= typeToGenerate %>(this.exprKey_<%= nextInputTable.getName() %>__<%= column.getLabel() %>);
<%
}
%>
}
<%

View File

@@ -767,11 +767,16 @@
<%= tableName %>HashKey.<%= aKeysNames[iKeyName] %> = (<%= typeToGenerate %>)(<%= nullableType %>) rsc_<%=componentNameForKeyProblem%>_<%=currentJoinedTableIndex%>.exprKey_<%= tableName %>__<%= aKeysNames[iKeyName] %>;
}
<%
} else {
if("java.util.Date".equals(typeToGenerate)) {%>
<%= tableName %>HashKey.<%= aKeysNames[iKeyName] %> = rsc_<%=componentNameForKeyProblem%>_<%=currentJoinedTableIndex%>.exprKey_<%= tableName %>__<%= aKeysNames[iKeyName] %> == null ? null : new java.util.Date(rsc_<%=componentNameForKeyProblem%>_<%=currentJoinedTableIndex%>.exprKey_<%= tableName %>__<%= aKeysNames[iKeyName] %>.getTime());
<%
}else {
%>
<%= tableName %>HashKey.<%= aKeysNames[iKeyName] %> = rsc_<%=componentNameForKeyProblem%>_<%=currentJoinedTableIndex%>.exprKey_<%= tableName %>__<%= aKeysNames[iKeyName] %>;
<%
}
}
} else {
@@ -787,12 +792,17 @@
<%= tableName %>HashKey.<%= aKeysNames[iKeyName] %> = (<%= typeToGenerate %>)(<%= nullableType %>) exprKeyValue_<%= tableName %>__<%= aKeysNames[iKeyName] %>;
}
<%
} else {
if("java.util.Date".equals(typeToGenerate)) {%>
<%= tableName %>HashKey.<%= aKeysNames[iKeyName] %> = <%= aKeysValues[iKeyName] %> == null ? null : new java.util.Date(<%= aKeysValues[iKeyName] %>.getTime());
<%
}else {
%>
<%= tableName %>HashKey.<%= aKeysNames[iKeyName] %> = <%= aKeysValues[iKeyName] %>;
<%
}
}
}
if (checkingSyntax) {
%>
<%= CodeGenerationUtils.buildJavaEndFieldKey(key) %>

View File

@@ -27506,7 +27506,7 @@
<IMPORT NAME="commons-httpclient" MODULE="commons-httpclient-3.1.jar" MVN="mvn:commons-httpclient/commons-httpclient/3.1" UrlPath="platform:/plugin/org.talend.libraries.apache.http/lib/commons-httpclient-3.1.jar" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="commons-logging" MODULE="commons-logging-1.1.1.jar" MVN="mvn:org.talend.libraries/commons-logging-1.1.1/6.0.0" UrlPath="platform:/base/plugins/org.apache.commons.logging_1.1.1.v201101211721.jar" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="httpcore" MODULE="httpcore-4.2.1.jar" MVN="mvn:org.talend.libraries/httpcore-4.2.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.http/lib/httpcore-4.2.1.jar" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="mail" MODULE="mail-1.4.jar" MVN="mvn:org.talend.libraries/mail-1.4/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/mail-1.4.jar" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="mail" MODULE="mail-1.4.7.jar" MVN="mvn:javax.mail/mail/1.4.7" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="neethi" MODULE="neethi-3.0.1.jar" MVN="mvn:org.talend.libraries/neethi-3.0.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/neethi-3.0.1.jar" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="WSDL4J-1_6_3" MODULE="wsdl4j-1.6.3.jar" MVN="mvn:wsdl4j/wsdl4j/1.6.3" BundleID="org.apache.servicemix.bundles.wsdl4j" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="xmlbeans" MODULE="xmlbeans-2.3.0.jar" MVN="mvn:org.talend.libraries/xmlbeans-2.3.0/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.xml/lib/xmlbeans-2.3.0.jar" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
@@ -27536,7 +27536,7 @@
<IMPORT NAME="commons-cli-1.2" MODULE="commons-cli-1.2.jar" MVN="mvn:commons-cli/commons-cli/1.2" UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-cli-1.2.jar" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="geronimo-stax-api_1.0_spec-1.0.1" MODULE="geronimo-stax-api_1.0_spec-1.0.1.jar" MVN="mvn:org.talend.libraries/geronimo-stax-api_1.0_spec-1.0.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/geronimo-stax-api_1.0_spec-1.0.1.jar" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="jaxen-1.1.6" MODULE="jaxen-1.1.6.jar" MVN="mvn:jaxen/jaxen/1.1.6" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" BundleID="" />
<IMPORT NAME="mail-1.4" MODULE="mail-1.4.jar" MVN="mvn:org.talend.libraries/mail-1.4/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/mail-1.4.jar" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="mail-1.4.7" MODULE="mail-1.4.7.jar" MVN="mvn:javax.mail/mail/1.4.7" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="neethi-3.0.3" MODULE="neethi-3.0.3.jar" MVN="mvn:org.apache.neethi/neethi/3.0.3" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="WSDL4J-1_6_3" MODULE="wsdl4j-1.6.3.jar" MVN="mvn:wsdl4j/wsdl4j/1.6.3" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="wstx-asl-3.2.9" MODULE="wstx-asl-3.2.9.jar" MVN="mvn:org.talend.libraries/wstx-asl-3.2.9/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/wstx-asl-3.2.9.jar" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />

View File

@@ -38269,7 +38269,7 @@
<IMPORT NAME="commons-httpclient" MODULE="commons-httpclient-3.1.jar" MVN="mvn:commons-httpclient/commons-httpclient/3.1" UrlPath="platform:/plugin/org.talend.libraries.apache.http/lib/commons-httpclient-3.1.jar" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="commons-logging" MODULE="commons-logging-1.1.1.jar" MVN="mvn:org.talend.libraries/commons-logging-1.1.1/6.0.0" UrlPath="platform:/base/plugins/org.apache.commons.logging_1.1.1.v201101211721.jar" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="httpcore" MODULE="httpcore-4.2.1.jar" MVN="mvn:org.talend.libraries/httpcore-4.2.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.http/lib/httpcore-4.2.1.jar" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="mail" MODULE="mail-1.4.jar" MVN="mvn:org.talend.libraries/mail-1.4/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/mail-1.4.jar" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="mail" MODULE="mail-1.4.7.jar" MVN="mvn:javax.mail/mail/1.4.7" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="neethi" MODULE="neethi-3.0.1.jar" MVN="mvn:org.talend.libraries/neethi-3.0.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/neethi-3.0.1.jar" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="WSDL4J-1_6_3" MODULE="wsdl4j-1.6.3.jar" MVN="mvn:wsdl4j/wsdl4j/1.6.3" BundleID="org.apache.servicemix.bundles.wsdl4j" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
<IMPORT NAME="xmlbeans" MODULE="xmlbeans-2.3.0.jar" MVN="mvn:org.talend.libraries/xmlbeans-2.3.0/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.xml/lib/xmlbeans-2.3.0.jar" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')"/>
@@ -38299,7 +38299,7 @@
<IMPORT NAME="commons-cli-1.2" MODULE="commons-cli-1.2.jar" MVN="mvn:commons-cli/commons-cli/1.2" UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-cli-1.2.jar" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="geronimo-stax-api_1.0_spec-1.0.1" MODULE="geronimo-stax-api_1.0_spec-1.0.1.jar" MVN="mvn:org.talend.libraries/geronimo-stax-api_1.0_spec-1.0.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/geronimo-stax-api_1.0_spec-1.0.1.jar" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="jaxen-1.1.6" MODULE="jaxen-1.1.6.jar" MVN="mvn:jaxen/jaxen/1.1.6" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" BundleID="" />
<IMPORT NAME="mail-1.4" MODULE="mail-1.4.jar" MVN="mvn:org.talend.libraries/mail-1.4/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/mail-1.4.jar" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="mail-1.4.7" MODULE="mail-1.4.7.jar" MVN="mvn:javax.mail/mail/1.4.7" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="neethi-3.0.3" MODULE="neethi-3.0.3.jar" MVN="mvn:org.apache.neethi/neethi/3.0.3" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="WSDL4J-1_6_3" MODULE="wsdl4j-1.6.3.jar" MVN="mvn:wsdl4j/wsdl4j/1.6.3" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
<IMPORT NAME="wstx-asl-3.2.9" MODULE="wstx-asl-3.2.9.jar" MVN="mvn:org.talend.libraries/wstx-asl-3.2.9/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/wstx-asl-3.2.9.jar" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />

View File

@@ -26,6 +26,7 @@ imports="
}
}
%>
int lastNoEmptyIndex_<%=cid%> = 0;
int nb_line_<%=cid%> = 0;
<%
if(metadataColumns != null && metadataColumns.size() > 0) {

View File

@@ -90,7 +90,7 @@ if ((metadatas!=null)&&(metadatas.size()>0)) {//1
if(!outIterate.isEmpty()||outgoingConnName != null){
if(useCSV && isDiscardTrailingEmptyStr){
%>
int lastNoEmptyIndex_<%=cid%>=0;
lastNoEmptyIndex_<%=cid%>=0;
for(int i_<%=cid%>=normalizeRecord_<%=cid%>.length;i_<%=cid%> > 0;i_<%=cid%>--){
if(!"".equals(normalizeRecord_<%=cid%>[i_<%=cid%> - 1])){
lastNoEmptyIndex_<%=cid%>=i_<%=cid%>;
@@ -100,7 +100,7 @@ if ((metadatas!=null)&&(metadatas.size()>0)) {//1
<%
}else{
%>
int lastNoEmptyIndex_<%=cid%>=normalizeRecord_<%=cid%>.length;
lastNoEmptyIndex_<%=cid%>=normalizeRecord_<%=cid%>.length;
<%if(isDiscardTrailingEmptyStr){%>
if(lastNoEmptyIndex_<%=cid%> == 1 && "".equals(normalizeRecord_<%=cid%>[0])){
lastNoEmptyIndex_<%=cid%> = 0;

View File

@@ -104,7 +104,7 @@
<CODEGENERATION>
<IMPORTS>
<IMPORT MODULE="janet-java-1.1.jar" MVN="mvn:org.talend.libraries/janet-java-1.1/6.0.0" NAME="janet-java-1.1"
<IMPORT MODULE="janet-java-1.2.jar" MVN="mvn:org.talend.libraries/janet-java-1.2/6.0.0" NAME="janet-java-1.2"
REQUIRED="true" />
</IMPORTS>
</CODEGENERATION>

View File

@@ -179,7 +179,7 @@
</ADVANCED_PARAMETERS>
<CODEGENERATION><IMPORTS>
<IMPORT MODULE="janet-java-1.1.jar" MVN="mvn:org.talend.libraries/janet-java-1.1/6.0.0" NAME="janet-java-1.1"
<IMPORT MODULE="janet-java-1.2.jar" MVN="mvn:org.talend.libraries/janet-java-1.2/6.0.0" NAME="janet-java-1.2"
REQUIRED="true" />
</IMPORTS></CODEGENERATION>

View File

@@ -183,7 +183,7 @@
</ADVANCED_PARAMETERS>
<CODEGENERATION><IMPORTS>
<IMPORT MODULE="janet-java-1.1.jar" MVN="mvn:org.talend.libraries/janet-java-1.1/6.0.0" NAME="janet-java-1.1"
<IMPORT MODULE="janet-java-1.2.jar" MVN="mvn:org.talend.libraries/janet-java-1.2/6.0.0" NAME="janet-java-1.2"
REQUIRED="true" />
</IMPORTS></CODEGENERATION>

Some files were not shown because too many files have changed in this diff Show More