Compare commits

...

158 Commits

Author SHA1 Message Date
kjwang-talend
d9e50fc49f Fake patch test 2021-11-04 17:34:49 +08:00
Chao MENG
16d300f0ad Cmeng/patch/7.3/tup 28063 improve start (#5092)
* workitem(TUP-28063): Improve studio bundles reloading logic
https://jira.talendforge.org/browse/TUP-28063

* workitem(TUP-28063): Improve studio bundles reloading logic
https://jira.talendforge.org/browse/TUP-28063

* workitem(TUP-28063): Improve studio bundles reloading logic
https://jira.talendforge.org/browse/TUP-28063

Conflicts:
	main/plugins/org.talend.repository/src/main/java/org/talend/repository/RepositoryService.java
2021-10-22 16:57:22 +08:00
bhe-talendbj
89675c4b23 bugfix(TUP-28659): backport (#6472)
* fix(TUP-28659): migrate jobs because remove snapshot jars

* fix(TUP-28659): backport

* fix(TUP-28659): backport
2021-08-02 09:48:10 +08:00
vdrokov
0133dd05e8 APPINT-33068: Fix variable duplication 2021-06-01 09:46:38 +02:00
bkatiukhov
b9e13df05d APPINT-32699 Fix error while deploying a route with tAzureStorageQueue (#6153)
Co-authored-by: Bohdan Katiukhov <bohdan.katiukhov@synapse.com>
2021-05-25 14:13:39 +03:00
vdrokov
f777b52c4a APPINT-32689: Undeploying a Service causes java.io.FileNotFoundException: {runtime}\data\cache\org.eclipse.osgi\xxxx\0\bundleFile (#6154) 2021-05-17 16:39:50 +03:00
apoltavtsev
c5e0d7119b bugfix(APPINT-32738) Job execution for Linux is corrected 2021-04-07 12:54:19 +02:00
apoltavtsev
2819dc3566 bugfix(APPINT-32723) Jobs bundle name is corrected 2021-04-07 06:54:00 +02:00
SunChaoqun
ad979090a0 fix the backport code conflict (#6034) 2021-04-02 17:51:07 +08:00
hcyi
db0a65fcdb Patch/7.2.1 tps 4713 (#5887)
* fix(TUP-30438):Issue when updating snowflake table using tELTOutput.

* fix(TUP-30438):add junits

* TPS-4713:Issue when updating snowflake table using tELTOutput
(TUP-30438)

* TPS-4713:add code change of TDI-41651

* TPS-4718: [7.2.1] Issue when updating snowflake table using tELTOutput
(TDI-41651)

* TPS-4713:Issue when updating snowflake table using tELTOutput(TPS-4072)

* TPS-4713:Issue when updating snowflake table using tELTOutput
(TUP-30438)

Co-authored-by: Dmytro Sylaiev <dmytro.sylaiev@globallogic.com>
2021-04-02 11:21:47 +08:00
vdrokov
7b0ccc6793 APPINT-32452: After applying the latest patch, trunjob component fails with "java.io.IOException: Cannot run program "java.exe": error=2, No such file or directory" (#6016)
Co-authored-by: Denis Sergent <32458402+dsergent@users.noreply.github.com>
2021-03-31 17:35:47 +02:00
vdrokov
2637f4f0e4 TESB-32452: After applying the latest patch, trunjob component fails … (#5989)
* TESB-32452: After applying the latest patch, trunjob component fails with "java.io.IOException: Cannot run program "java.exe": error=2, No such file or directory"

* TESB-32452: After applying the latest patch, trunjob component fails with "java.io.IOException: Cannot run program "java.exe": error=2, No such file or directory"
2021-03-31 17:28:04 +02:00
bkatiukhov
409131fac1 TESB-32307 tESBConsumer - wrong header content-type (#5978)
Co-authored-by: bohdan.katiukhov <bohdan.katiukhov@KBP1-LHP-A00125.synapse.com>
2021-03-29 10:17:52 +02:00
hcyi
636c261cf5 TPS-4674:[7.2.1]Add a new option for tELTOracleMap to generate column alias on selection. (TUP-30043) (#5865)
* TPS-4674:[7.2.1]Add a new option for tELTOracleMap to generate column
alias on selection. (TUP-30043)

* fix(TUP-30043):Add a new option for tELTOracleMap to generate column
alias on selection.
2021-03-02 18:03:52 +08:00
bhe-talendbj
0e09d928c1 fix(TUP-30360): add an option to disable sharing libraries (#5814) (#5841)
* fix(TUP-30360): add an option to disable sharing libraries

* fix(TUP-30360): add an option to disable sharing libraries, default to true
2021-03-01 17:05:09 +08:00
hzhao-talendbj
7f2b14e9fe TUP-30333 tMap with Lookup model Reload at each row freezes Studio (#5817)
* TUP-30333 tMap with Lookup model Reload at each row freezes Studio

* TUP-30333 add comments

* TUP-30333 add condition for refresh background
2021-02-25 18:50:38 +08:00
apoltavtsev
67dec82a79 feat(TESB-31727) message about version inheritance for child job is added 2021-01-29 09:50:11 +01:00
apoltavtsev
7988529bfd fix(TESB-31274) jobs containing tRestClient build issues 2021-01-22 08:31:16 +01:00
apoltavtsev
6e5e614f62 fix(TESB-31274) jobs containing tRestClient build issues 2021-01-20 14:07:12 +01:00
SunChaoqun
9158251a31 TESB-29921:Build/Deploy of a route snapshot with CommandLine has 0 byte bundle in Nexus (#5693) 2021-01-05 16:40:20 +08:00
sponomarova
2193cb5bc6 fix(TBD-10285):Add contains predicate to expressions (#4613) (#5563)
Co-authored-by: Laurent BOURGEOIS <lbourgeois@talend.com>
2020-12-02 17:07:55 +02:00
hcyi
92143bc9d9 fix(TUP-29090):[7.2.1] Extra plus '+' signs in generated SQL (#5559) (#5564)
* fix(TUP-29090):[7.2.1] Extra plus '+' signs in generated SQL (#5559)

* fix(TUP-29090):fix some failed junits .
2020-11-30 20:05:58 +08:00
hcyi
5886a9ea1e fix(TUP-29072):When renaming link (table) between teltinput and teltmap (#5507)
, the generated SQL query is not updated.
2020-11-30 10:12:39 +08:00
undx
8e11d18951 fix(TUP-25152): backport to patch/7.2.1 2020-10-08 13:38:59 +02:00
Emmanuel GALLOIS
18ae07abed fix(TPS-4351): Make component-runtime class loader find classes in JobServer (#5247)
* fix(TPS-4351): Make component-runtime class loader find classes in JobServer
* fix(TPS-4351): fix AsciidoctorService
* fix(TPS-4351): bump asciidoctorj
* fix(TPS-4351): fix MANIFEST.MF
2020-10-06 13:56:40 +02:00
vdrokov
89a48f51e3 fix(TESB-30317): [CI Builder] Some models throw error "context file d… (#5242)
* fix(TESB-30317): [CI Builder] Some models throw error "context file doesn't exist" during CITEST compilation phase
Fix by catching error from the members() function call which will throw error if the folder it is working with doens't exist.

* TESB-30317:[CI Builder] Some models throw error "context file doesn't
exist" during CITEST compilation phase

Co-authored-by: SunChaoqun <csun@talend.com>
2020-10-06 12:52:59 +03:00
Zhiwei Xue
6b0ccf8623 fix(TUP-28576):Reference projects routine POM file is modified and can't (#5181)
be committed to GIT
2020-09-21 15:00:31 +08:00
SunChaoqun
3df34392cd TESB-30188:CI builder doesn't publish feature folders for some artifacts (#5177)
(jobs, routes, services)

Co-authored-by: Mike Yan <yyan@talend.com>
2020-09-08 16:43:40 +08:00
hzhao-talendbj
17687cbe3d fix change metadata table ,column list wrong order. (#5131) 2020-08-28 11:21:27 +08:00
apoltavtsev
386eec46c3 fix(TESB-29963) MQ Dependency issues in Runtime 2020-08-24 15:45:03 +02:00
Chao MENG
fd72c4d991 Cmeng/patch/7.2.1/tup 28304 backport (#5088)
* fix(TUP-27953): tSalesforceInput component displays in-job (#4996)

tSalesforceConnection incorrectly
https://jira.talendforge.org/browse/TUP-27953

Conflicts:
	main/plugins/org.talend.designer.core.generic/src/main/java/org/talend/designer/core/generic/controller/ComponentRefController.java

* fix(TUP-28295): UI Problem of TCOMPV0 in the recent 741NB and 731
Release + Aug. Nightly Build Patch
https://jira.talendforge.org/browse/TUP-28295
2020-08-19 10:47:01 +08:00
bhe-talendbj
2f5a499389 fix(TUP-27374): Fix test case (#5055) 2020-08-10 18:25:22 +08:00
jiezhang-tlnd
759eaa73f0 feat(TUP-27862)Add possibility to customize pattern for dates when (#4977) (#5021)
retrieve table
2020-08-07 10:51:42 +08:00
bhe-talendbj
d85a5c0e08 fix(TUP-28009): Save relationship index after version change (#5017) 2020-08-07 10:26:43 +08:00
bhe-talendbj
5c9f99b54e fix(TUP-27374): Get default jvm arguments (#4792)
* fix(TUP-27374): Get default jvm arguments

* fix(TUP-27374): add back default vm arguments
2020-08-07 10:24:58 +08:00
Mike Yan
e5ce502008 fix(TESB-29210): Build type not updated for consumer job (#5015) 2020-08-03 16:14:57 +08:00
apoltavtsev
ccfbf51dff TESB-29071 Bean in route gives wrong output on running in studio 2020-07-31 12:09:37 +02:00
nrousseau
d2b0c87288 Revert "fix(TDI-42522): avoid 65535 issue (#3636) (#3893) (#4895)" (#5020)
This reverts commit 6cf2cae1b6.
2020-07-31 17:46:47 +08:00
msheverda-talend
6cf2cae1b6 fix(TDI-42522): avoid 65535 issue (#3636) (#3893) (#4895)
Co-authored-by: wang wei <wwang@talend.com>
2020-07-30 18:08:10 +03:00
Chao MENG
604fb23a71 patch(TPS-4193): remove localprovider, make it compatible with javajet modifications (#4984)
* patch(TPS-4193): remove localprovider, make it compatible with javajet
modifications

* patch(TPS-4193): remove localprovider, make it compatible with javajet
modifications
2020-07-23 18:56:58 +08:00
apoltavtsev
e3f6f81cde TESB-29647 Bundle version for Jobs is corrected 2020-07-20 15:23:29 +02:00
Andreas Mattes
26ff46ddeb TESB-27583 TESB-29690 Ensure WSDL is included in WS consumer build. (#4966)
This fix corrects TESB-27081 and TESB-27583 ensuring SOAP Action is set from binding definition in WSDL, and TESB-2960 ensuring the WSDL is present for properly configuring the SOAP 1.2 binding. This fix is identical with the temporarily reverted fix from pull request #4926.
2020-07-20 11:25:28 +02:00
Andreas Mattes
cd955b7ad4 Revert "TESB-29690 Ensure WSDL is included in WS consumer build". 2020-07-14 11:36:46 +02:00
Andreas Mattes
dc11694fd1 TESB-29690 Ensure WSDL is included in WS consumer build. (#4926)
This fix includes fixes for TESB-27081 and TESB-27583 handling missing SOAP Action due to missing WSDL and TESB-2960 ensuring the WSDL is present for properly configuring the SOAP 1.2 binding.
2020-07-13 18:25:54 +02:00
hzhao-talendbj
b1598aca9f tup-27447 backport to patch721 (#4822) 2020-07-02 14:28:41 +08:00
hzhao-talendbj
938c1dadb2 TUP-27070 (#4855)
on patch721, eltmap don't have 'update' option  so remove this junit
from 721
2020-06-24 15:36:07 +08:00
hzhao-talendbj
ba7622b528 tup-27070 (#4848)
add this junit by mistake,it should not in branch patch721, so remove it
2020-06-23 18:18:04 +08:00
hzhao-talendbj
2cdfb08e18 tup-27070 fix junit failed on patch 7.2.1 (#4846) 2020-06-23 09:18:11 +08:00
bhe-talendbj
33fb855c55 fix(TUP-27053): backport (#4767) (#4801) 2020-06-19 15:13:02 +08:00
hzhao-talendbj
e6458bc956 Hengzhao/backport patch721/tup 27070 (#4774)
* Tup-27070 (#4734)
backport to 7.2.1 and fix conflicts

Conflicts:
	main/plugins/org.talend.designer.dbmap/src/main/java/org/talend/designer/dbmap/language/generation/DbGenerationManager.java

* TUP-27070  fix cross join cases

* Fix(TDI-43264):Fix issues. (#4182)

Co-authored-by: vyu-talend <49019399+vyu-talend@users.noreply.github.com>
2020-06-19 15:01:05 +08:00
hcyi
699ac6f1d4 fix(TUP-26939:Tmap shows null values when using Expression Builder. (#4802)
(#4632)

Conflicts:
	main/plugins/org.talend.expressionbuilder/src/main/java/org/talend/expressionbuilder/test/shadow/VirtualRowGeneratorNode.java
2020-06-19 14:55:49 +08:00
Zhiwei Xue
eeb99e841b fix(TUP-27199): remove wrapping space for condition. 2020-05-26 15:02:58 +08:00
hcyi
5af3d5faa2 fix(TUP-26924):tELTXXX: link name won't be updated after updating (#4729)
"default table name" in tELTInput
2020-05-22 17:11:20 +08:00
bhe-talendbj
cd90676406 fix(TUP-26728): backport 2020-05-14 10:30:47 +08:00
undx
df3e6451d9 fix(TCOMP-1681): Make ESB Studio job export TaCoKit compliant 2020-05-13 12:08:33 +02:00
undx
67c2ee7982 feat(TCOMP-1681): Make ESB Studio job export TaCoKit compliant 2020-05-12 14:22:48 +02:00
hwang-talend
44c8adafc5 Hwang/tup 26059 (#4436)
* bugfix(TUP-26059):tELTPostgresqlMap lost its "DB Type" column for which
the value should be "BPCHAR"
2020-05-07 17:47:49 +08:00
hzhao-talendbj
9b05cd445d TUP-26388 fix missing DB context value (#4614) (#4620)
* TUP-26388 fix missing DB context value

* fix missing db value issue

* remove useless isTcompv0
2020-05-07 17:44:12 +08:00
hzhao-talendbj
feccc56372 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-05-07 17:43:44 +08:00
hzhao-talendbj
4002ebf11c 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-05-07 17:43:02 +08:00
hwang-talend
ca0734292e bugfix(TUP-26758):[7.2.1] Wrong column order when using Schema from (#4606)
bugfix(TUP-26758):[7.2.1] Wrong column order when using Schema from Repository
2020-05-07 17:13:41 +08:00
hwang
ade3d8ea9f Revert "bugfix(TUP-26758):[7.2.1] Wrong column order when using Schema from (#4606)"
This reverts commit 73b0ef1715.
2020-04-29 18:28:51 +08:00
hwang
642afd4c61 Revert "Hwang/tup 26059 (#4436)"
This reverts commit a88d5d7da6.
2020-04-29 18:28:41 +08:00
hwang-talend
73b0ef1715 bugfix(TUP-26758):[7.2.1] Wrong column order when using Schema from (#4606)
bugfix(TUP-26758):[7.2.1] Wrong column order when using Schema from Repository
2020-04-29 18:06:14 +08:00
hwang-talend
a88d5d7da6 Hwang/tup 26059 (#4436)
* bugfix(TUP-26059):tELTPostgresqlMap lost its "DB Type" column for which
the value should be "BPCHAR"
2020-04-29 18:04:08 +08:00
hcyi
66baf2369a TPS-3953:[7.2.1] Table name in eltinput component, the default table is (#4628)
taken into consideration (TUP-26750)
2020-04-20 09:32:57 +08:00
jiezhang-tlnd
a71f6b26b9 Temp patch tps 3844 (#4615)
* Fix TUP-26399 Items in Studio get deleted and cannot be recovered, even (#4533)

if items are locked
https://jira.talendforge.org/browse/TUP-26399

* fix(TUP-26231)Relative path not working in Talend v721 (#4530) (#4549) (#4597)

* 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

* fix(TUP-24310):routines is duplicated in the reactor (#3909)

* fix(TUP-26482):[Studio] Studio is very slow to build the job(the (#4546)

performance issue)

* bugfix(TUP-26475):Job is referring to the joblet present in the (#4543)

bugfix(TUP-26475):Job is referring to the joblet present in the
reference job even after we delete it from the main job

* 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

* fix(TUP-26213):Compilation issue after migration to v7.2 (#4478)

Co-authored-by: kjwang <kjwang@talend.com>
Co-authored-by: Jane Ding <35018295+jding-tlnd@users.noreply.github.com>
Co-authored-by: Zhiwei Xue <zwxue@talend.com>
Co-authored-by: hwang-talend <hwang@talend.com>
Co-authored-by: wang wei <wwang@talend.com>
2020-04-13 16:12:08 +08:00
hcyi
68f7ea24cc TPS-3921: tELTHiveMap doesn't pass context variable properly (TUP-24955) (#4580) 2020-04-01 14:33:44 +08:00
Dmytro Sylaiev
c32f6c1097 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 14:52:41 +02:00
hzhao-talendbj
0234a23a9c https://jira.talendforge.org/browse/TPS-3452 2020-03-24 17:15:34 +08:00
hzhao-talendbj
a604485e3a fix column names are same (#4551) (#4552) 2020-03-24 16:51:52 +08:00
kjwang
1337af08ad 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-23 14:46:55 +08:00
SunChaoqun
a0669d27fc TESB-28130:Duplicate dependencies in POM.xml for routes lead to compile issues (#4536) 2020-03-20 18:07:17 +08:00
Mike Yan
a62487a9f0 fix(TESB-28255): Solve reference error for java ws and mdm lib in java 8 2020-03-18 15:45:25 +08:00
Zhiwei Xue
51f7668e49 fix(TUP-26132):Cannot build a job by CI (maven) after updating multiple (#4442)
job versions
2020-03-09 15:01:05 +08:00
Jane Ding
5db747c247 fix(TUP-25820)TMC: error show in error log when logon TMC project (#4318)
https://jira.talendforge.org/browse/TUP-25820
2020-03-09 15:00:36 +08:00
kjwang
9a8d085a05 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-09 14:58:53 +08:00
hwang-talend
39c9616bb5 bugfix(TUP-25959):Incorrect message is observed in the tWarn component (#4464)
bugfix(TUP-25959):Incorrect message is observed in the tWarn component
2020-03-09 14:58:12 +08:00
apoltavtsev
691e5ed912 TESB-24900 Undeploying a Data Service causes "Exception in opening zip file" error 2020-02-26 18:31:30 +08:00
jiezhang-tlnd
24c60f1920 Temp patch tps 3681 (#4482)
* 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

* 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

* 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

* 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

Conflicts:
	main/plugins/org.talend.designer.dbmap/src/main/java/org/talend/designer/dbmap/language/generation/DbGenerationManager.java

* fix(TUP-25649):ERROR when Job in MDM project calling Job in Reference DI (#4331) (#4355)

project:import routines.DataQuality cannot be resolved.

* Revert "fix(TUP-25649):ERROR when Job in MDM project calling Job in Reference DI (#4331) (#4355)"

This reverts commit 499a44fb3c.

* fix(TUP-23789)Pom files are not generated sometimes for the jobs in (#3738)

* 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.

* Revert "TESB-24900 Undeploying a Data Service causes "Exception in opening zip file" error"

This reverts commit 0b047b73b6.

Co-authored-by: hzhao-talendbj <49395568+hzhao-talendbj@users.noreply.github.com>
Co-authored-by: kjwang <kjwang@talend.com>
Co-authored-by: hcyi <hcyi@talend.com>
Co-authored-by: Jane Ding <35018295+jding-tlnd@users.noreply.github.com>
2020-02-24 14:38:15 +08:00
apoltavtsev
0b047b73b6 TESB-24900 Undeploying a Data Service causes "Exception in opening zip file" error 2020-02-19 18:42:08 +01:00
jiezhang-tlnd
d1b60e2e3f Tps 3636 temp patch721 (#4327)
* fix(TUP-25460)schema hardcoded in guess query in tDBInput component (#4206)

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

* Revert "Revert "bugfix(TUP-25409) Improve building speed of CI builder (#4253)""

This reverts commit 956891d18c.

Co-authored-by: bhe-talendbj <52311292+bhe-talendbj@users.noreply.github.com>
2020-01-16 11:07:57 +08:00
Chao MENG
7329a7558e Patch/7.2.1 tps 3583 (#4310) 2020-01-09 17:20:26 +01:00
bhe-talendbj
956891d18c Revert "bugfix(TUP-25409) Improve building speed of CI builder (#4253)"
This reverts commit 50810ed439.
2020-01-09 17:47:38 +08:00
bhe-talendbj
50810ed439 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-01-09 17:19:18 +08:00
Chao MENG
9420056b37 Revert "feat(TUP-25226): Make the hadoop conf jar path a contextualizable parameter in the Hadoop conf wizard (#4228)"
This reverts commit a1fd9f361b.
2020-01-02 11:20:19 +08:00
Chao MENG
5957b4993c Revert "feat(TUP-25226): Make the hadoop conf jar path a contextualizable (#4283)"
This reverts commit c6647a76a8.
2020-01-02 11:20:12 +08:00
Chao MENG
5b664d9852 Revert "feat(TUP-25226): Make the hadoop conf jar path a contextualizable parameter in the Hadoop conf wizard"
This reverts commit 5d4c8cc9d9.
2020-01-02 11:20:05 +08:00
Chao MENG
7cbef2f37f Revert "feat(TUP-25226): Make the hadoop conf jar path a contextualizable parameter in the Hadoop conf wizard"
This reverts commit 564ed2618d.
2020-01-02 11:19:51 +08:00
Chao MENG
4cc93be67f fix(TUP-24148): tNetsuiteInput throws cast error when switching from use (#4036)
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-31 10:50:31 +08:00
hcyi
f120c7c4dd fix(TUP-25099):NPE when using joblets from reference Projects. (#4132) (#4146) 2019-12-30 14:20:56 +08:00
Chao MENG
564ed2618d feat(TUP-25226): Make the hadoop conf jar path a contextualizable
parameter in the Hadoop conf wizard

https://jira.talendforge.org/browse/TUP-25226
2019-12-27 18:17:01 +08:00
Chao MENG
5d4c8cc9d9 feat(TUP-25226): Make the hadoop conf jar path a contextualizable
parameter in the Hadoop conf wizard

https://jira.talendforge.org/browse/TUP-25226
2019-12-27 17:15:31 +08:00
Chao MENG
c6647a76a8 feat(TUP-25226): Make the hadoop conf jar path a contextualizable (#4283)
parameter in the Hadoop conf wizard

https://jira.talendforge.org/browse/TUP-25226
2019-12-26 19:08:45 +08:00
Chao MENG
a1fd9f361b feat(TUP-25226): Make the hadoop conf jar path a contextualizable parameter in the Hadoop conf wizard (#4228)
* 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
2019-12-24 11:29:47 +08:00
Mike Yan
2ad1c00b63 fix(TESB-27266):Exclude tdm-lib-di from REST DS, but keep package info (#4231)
* TESB-26951 Dependencies from SubJob are added to manifest of ParentJob

* fix(TESB-27266):Exclude tdm-lib-di from REST DS, but keep package info
2019-12-13 14:20:13 +08:00
mbasiuk-talend
98db49e280 fix(TDI-43212): improve code generation for query string (#4149) 2019-12-12 08:58:20 +02:00
Jane Ding
6a6be36610 Jding/72/tup 22361 elt map bug in column expression while using context variable as a parameter (#3990) (#4209)
* 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-12-09 10:45:35 +08:00
Chao MENG
ddb69232e5 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-12-02 10:52:01 +08:00
jiezhang-tlnd
a4ffd73a24 Jzhang/test patch tps 3491 (#4193)
* kjwang/Fix TUP-24748 CLONE - Modification in Context Variables is not (#4009) (#4047)

propagating to all jobs
https://jira.talendforge.org/browse/TUP-24748

* Jding/test patch tps 3474 (#4170)

* fix(TUP-24732) Studio Code tab doesn't generate code/show errors in Job (#4113)

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

* fix(TUP-24732)Studio Code tab doesn't generate code/show errors in Job (#4169)

https://jira.talendforge.org/browse/TUP-24732
2019-12-02 10:45:03 +08:00
Hanna Liashchuk
6bb63c2a6d backport(TPS-3600): tBigQueryBulkExec get error when run with big file (#4190) 2019-11-29 16:51:11 +01:00
AlixMetivier
e7881d1ecd patch(tps-3592): cherry pick (#4189)
* cherry pick

* cherry pick
2019-11-29 15:34:46 +01:00
hwang
8b879dcbbd bugfix(TUP-24937):Propagate changes in tELTInput schema to tELTMap 2019-11-22 16:17:12 +08:00
hwang
87b860b0b1 Revert "bugfix(TUP-24937):Propagate changes in tELTInput schema to tELTMap"
This reverts commit 9b736bf30a.
2019-11-22 16:12:07 +08:00
hwang
3f5a74d847 Revert "bugfix(TUP-24937):Propagate changes in tELTInput schema to tELTMap"
This reverts commit dd6501d8c6.
2019-11-22 16:11:15 +08:00
hwang
dd6501d8c6 bugfix(TUP-24937):Propagate changes in tELTInput schema to tELTMap 2019-11-21 22:09:08 +08:00
hwang
9b736bf30a bugfix(TUP-24937):Propagate changes in tELTInput schema to tELTMap 2019-11-21 22:07:22 +08:00
hcyi
09b2ad8aa6 fix(TUP-25218):tELTXXXMap: Output table : Expression & Column set to
blank if you add a Column without Expression on Mac OS X.
2019-11-15 16:45:02 +08:00
hcyi
245f1c42c2 TPS-3542 : [7.2.1] ELTMap / Teradata connexion fixes (#4136)
* fix(TUP-24885):tELTTeradataMap: Output table : Expression & Column set (#4048)

to blank if you add a Column without Expression.

* fix(TUP-24937):Propagate changes in tELTInput schema to tELTMap.
2019-11-14 11:31:13 +08:00
apoltavtsev
03085d1574 TESB-27110 Missing tSendMail dependencies are added 2019-11-13 09:20:23 +01:00
hwang
5fb4589799 bugfix(TUP-24884):Spark Joblets cannot be built within Parent DI job 2019-11-11 15:00:43 +08:00
nrousseau
7a69ed4c4d Nrousseau/tup 24884 backport (#4110)
* 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

* 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-08 14:12:54 +08:00
Zhiwei Xue
a38fec9792 fix(TUP-24323):_tdm folder is missing after build thmap job (#3885) 2019-11-06 15:57:58 +08:00
nrousseau
4cef94aff4 upgrade tacokit 1.1.14 (#4033) 2019-11-04 16:34:11 +08:00
jiezhang-tlnd
09169a8664 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:08:22 +08:00
SunChaoqun
391704ac42 TESB-27139:"Could not find the context Default" is shown in runtime when
deploy a route into runtime



* TESB-27139:"Could not find the context Default" is shown in runtime
when

deploy a route into runtime
2019-11-01 15:56:03 +08:00
Zhiwei Xue
9e693e6f89 fix(TUP-23637):7.x missing local_project for big data spark batch job (#3671) (#3823) 2019-11-01 15:56:01 +08:00
Zhiwei Xue
eee97f1977 Revert "TESB-27123:Context does not transmit to Job called by route in the second call in runtime (#4073)"
This reverts commit 2884b847d5.
2019-11-01 15:55:58 +08:00
hzhao-talendbj
095c79cbf2 fix(TUP-24613)routine section does not allow user to edit required (#4011)
checkbox
2019-11-01 15:47:20 +08:00
SunChaoqun
2884b847d5 TESB-27123:Context does not transmit to Job called by route in the second call in runtime (#4073) 2019-10-28 18:58:52 +08:00
Zhiwei Xue
96d4930a0a fix(TUP-24623):fix regression. 2019-10-24 14:21:09 +08:00
apoltavtsev
e8f2adce2d TESB-26789 Bean called in routelet not found by main route 2019-10-24 11:54:53 +08:00
Zhiwei Xue
34396d7182 fix(TUP-24623):Compilation error on the job with project references (#4010) 2019-10-18 18:30:49 +08:00
hzhao-talendbj
82d238deff fix(TUP-24607)Not able to see the component error in the Studio Designer (#3968)
* 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:04:22 +08:00
slushatel
4487a6d33e 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:53:40 +02:00
hcyi
70469391d8 fix(TUP-24784):Build error with tRunJob on a spark job. (#4025) (#4029) 2019-10-16 17:33:14 +08:00
Denis Sergent
7ea110dc3c TESB-26300: disable message dialog when checking build errors (#3654) (#4019)
* TESB-23600 : do not open dialog anymore when checking errors

* TESB-23600 : refactor/cleanup

Conflicts:
	main/plugins/org.talend.designer.runprocess/src/main/java/org/talend/designer/runprocess/JobErrorsChecker.java

Conflicts:
	main/plugins/org.talend.designer.runprocess/src/main/java/org/talend/designer/runprocess/JobErrorsChecker.java
2019-10-14 09:08:31 +02:00
jiezhang-tlnd
fcad4148f5 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-10-14 14:29:04 +08:00
hwang-talend
ebe98a4d67 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-10-11 11:41:25 +08:00
yanbasic
cd23062e30 Revert "TESB-26300: disable message dialog when checking build errors (#3654)"
This reverts commit c9c9d4df22.
2019-10-08 15:14:19 +08:00
hcyi
5990df09b0 fix(TUP-23790):Can't guess schema for metadata (#3692)
item(delimited/positional/regex/excel/ldif/ldap)
2019-10-08 12:05:59 +08:00
hwang-talend
4f5b39d2da bugfix(TUP-24355):Default Context environment appended after migrating (#3927)
* bugfix(TUP-24355):Default Context environment appended after migrating
to 7.2.1
2019-10-08 11:56:19 +08:00
Stéphane Bouchet
c9c9d4df22 TESB-26300: disable message dialog when checking build errors (#3654)
* TESB-23600 : do not open dialog anymore when checking errors

* TESB-23600 : refactor/cleanup

Conflicts:
	main/plugins/org.talend.designer.runprocess/src/main/java/org/talend/designer/runprocess/JobErrorsChecker.java

Conflicts:
	main/plugins/org.talend.designer.runprocess/src/main/java/org/talend/designer/runprocess/JobErrorsChecker.java
2019-10-07 11:43:03 +02:00
SunChaoqun
9f4d4fc832 TESB-27079:Data Service Micro-service is failing from TMC (#3983) 2019-09-27 20:47:47 +08:00
Mike Yan
cc93b9959b fix(TESB-27046): Job run failed with pure DI license in studio (#3966) 2019-09-24 15:24:19 +08:00
hcyi
94e2442e11 fix(TUP-24084):Change the display of the new Couchbase component names. (#3934) 2019-09-23 15:23:30 +08:00
hwang-talend
079ce620ab 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-09-23 15:20:26 +08:00
hcyi
535af6359e fix(TUP-23264):Studio can't find dependencies for tacokit components. 2019-09-23 15:20:24 +08:00
jiezhang-tlnd
0544da1147 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:47:33 +08:00
Laurent BOURGEOIS
bdb27eaf55 fix(TBD-9137) : tBigQueryInput does not support backtick in query (#3953) 2019-09-20 17:08:13 +02:00
hwang
c4b9def853 bugfix(TUP-24326):keyword "__TABLE__" not working for tJDBCxxxx
components
2019-09-18 14:16:37 +08:00
hwang
9b31f616f7 Revert "bugfix(TUP-24326):keyword "__TABLE__" not working for tJDBCxxxx (#3906)"
This reverts commit 3c8552e58c.
2019-09-18 14:15:56 +08:00
hwang-talend
3c8552e58c bugfix(TUP-24326):keyword "__TABLE__" not working for tJDBCxxxx (#3906)
bugfix(TUP-24326):keyword "__TABLE__" not working for tJDBCxxxx components
2019-09-16 13:37:53 +08:00
heng zhao
81f603037b feat(TUP-24028)Add Azure datacenter part of the studio connection 2019-09-12 13:47:28 +08:00
hzhao-talendbj
3c9ff7e553 Hengzhao/backportpatch721/tup 24028 add azure datacenter part of the studio connection (#3910)
* 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-09 15:21:47 +08:00
hcyi
6611515bd6 fix(TUP-23743):ERROR when Job in MDM project calling Job in Reference DI (#3709)
project:import routines.DataQuality cannot be resolved.
2019-08-26 11:49:10 +08:00
SunChaoqun
66dfb4f0bf TESB-26736:DS OSGi bundles are failing on runtime after the docker patch 2019-08-15 16:30:20 +08:00
yanbasic
75b74d2c17 fix(TESB-24597): Fixed OSGi job build missing OSGI-INF folder issue 2019-08-14 18:07:41 +08:00
SunChaoqun
92e5a0801d TESB-26736:DS OSGi bundles are failing on runtime after the docker patch 2019-08-13 19:22:39 +08:00
SunChaoqun
62ce41a0e9 TESB-24597 Docker Support for Microservice - CI Part (#3797)
* 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-07 18:17:49 +08:00
apoltavtsev
aa9c2b08b9 TESB-26293 Duplicated libraries in private & import packages of the build manifest file 2019-07-15 11:26:07 +08:00
kjwang-talend
37c58a98cd kjwang/Fix TUP-23809 changes in column
Fix TUP-23809 [Studio] changes in column order are not saved (no
propagate changes dialog)
https://jira.talendforge.org/browse/TUP-23809
2019-07-15 10:34:31 +08:00
nrousseau
9c31c2869d fix(TDI-42522) add option to deactivate component log 2019-06-19 18:58:02 +08:00
Jane Ding
e91f8c1b5d fix(TUP-23506)Job use tsapconnection component run fail when use the (#3623) (#3633)
* fix(TUP-23506)Job use tsapconnection component run fail when use the
sapjco3.jar with a newer version 3.0.14.
https://jira.talendforge.org/browse/TUP-23506

* fix(TUP-23506)Job use tsapconnection component run fail when use the
sapjco3.jar with a newer version 3.0.14.
https://jira.talendforge.org/browse/TUP-23506

* fix(TUP-23506)Job use tsapconnection component run fail when use the
sapjco3.jar with a newer version 3.0.14
https://jira.talendforge.org/browse/TUP-23506
2019-06-18 14:22:33 +08:00
hwang-talend
6d16ec2e3e bugfix(TUP-23510):There is compile error job in TDI demo project (#3632)
* bugfix(TUP-23510):There is compile error job in TDI demo project

* bugfix(TUP-23510):There is compile error job in TDI demo project (#3628)
2019-06-18 12:11:46 +08:00
Chao MENG
d5dfa732da Cmeng/backport/7.2.1/tup 20054 tck refresh issue (#3624)
* fix(TUP-20054): Due to checking fields it is hard to type
credentials/data from the keyboard
https://jira.talendforge.org/browse/TUP-20054

* main/plugins/org.talend.sdk.component.studio-integration/src/main/java/org/talend/sdk/component/studio/ui/wizard/TaCoKitConfigurationWizard.java

* fix(TUP-20054): Due to checking fields it is hard to type
credentials/data from the keyboard
https://jira.talendforge.org/browse/TUP-20054

* fix(TUP-20054): Due to checking fields it is hard to type
credentials/data from the keyboard
https://jira.talendforge.org/browse/TUP-20054

* Cmeng/bugfix/tup 20054 fix junit issue (#3627)

* fix(TUP-20054): Due to checking fields it is hard to type
credentials/data from the keyboard
https://jira.talendforge.org/browse/TUP-20054

Fix junit issue

* add junit source

* add junit source

* fix(TUP-20054): Due to checking fields it is hard to type (#3630)

credentials/data from the keyboard
https://jira.talendforge.org/browse/TUP-20054

Fix junit issue
2019-06-18 11:29:06 +08:00
Antoine Parent
49d093c671 fix(): typo in a pattern (#3626)
fix a pattern used to display job status
2019-06-17 16:46:08 +02:00
Jenkins Continuous Build server
0f3b302525 Set version to 7.2.1 2019-06-14 11:49:03 +02:00
308 changed files with 7103 additions and 1391 deletions

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version>
<version>7.2.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.abstractmap.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version>
<version>7.2.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.alfrescooutput.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version>
<version>7.2.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.business.diagram.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version>
<version>7.2.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.codegen.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version>
<version>7.2.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.components.exchange.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version>
<version>7.2.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.core.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version>
<version>7.2.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.dbmap.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version>
<version>7.2.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.documentation.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version>
<version>7.2.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.fileoutputxml.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version>
<version>7.2.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.gefabstractmap.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version>
<version>7.2.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.mapper.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version>
<version>7.2.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.maven.job.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version>
<version>7.2.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.rowgenerator.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version>
<version>7.2.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.runprocess.nl</artifactId>

View File

@@ -52,7 +52,7 @@ ProcessDebugDialog.errortext=Impossible de d\u00E9bugger le job.\\nV\u00E9rifiez
ShadowProcess.notGeneratedOutputException=Sortie non g\u00E9n\u00E9r\u00E9e.
ProcessComposite.contextGroup=Contexte
prefs.clientConfiguration=Configuration du client Talend
ProcessComposite.endPattern=Le Job {0} s\'est termin\u00E9 \u00E0 {1,date,HH:mm dd/MM/yyyy}. [code de sortie={2,number}]
ProcessComposite.endPattern=Job {0} termin\u00e9 \u00e0 {1,date,HH\:mm dd/MM/yyyy}. [Code sortie\=\{2,number}]
ProcessView.title=Ex\u00E9cuter({0})
Processor.configurePerl=L'interpr\u00E9teur Perl n'est pas configur\u00E9.
JavaProcessor.notFoundedFolderException=Dossier introuvable dans le projet .Java

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version>
<version>7.2.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.scd.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version>
<version>7.2.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.webservice.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version>
<version>7.2.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.xmlmap.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version>
<version>7.2.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.expressionbuilder.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version>
<version>7.2.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.presentation.onboarding.resource.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version>
<version>7.2.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.presentation.onboarding.resource.tos.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version>
<version>7.2.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.repository.ftp.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version>
<version>7.2.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.repository.json.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version>
<version>7.2.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.repository.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version>
<version>7.2.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.repository.view.di.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version>
<version>7.2.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.sbi.engines.client.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version>
<version>7.2.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.spagic.engines.client.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version>
<version>7.2.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.sqlbuilder.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version>
<version>7.2.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.business.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version>
<version>7.2.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version>
<version>7.2.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.fragment.jars.di.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version>
<version>7.2.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.rcp.branding.tos.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version>
<version>7.2.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.rcp.branding.tos.test.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version>
<version>7.2.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.repository.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version>
<version>7.2.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.sbi.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version>
<version>7.2.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.spagic.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version>
<version>7.2.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.tos.components.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version>
<version>7.2.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.tos.core.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version>
<version>7.2.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.tos.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version>
<version>7.2.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.tos.libraries.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version>
<version>7.2.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.abstractmap</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version>
<version>7.2.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.alfrescooutput</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version>
<version>7.2.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.business.diagram</artifactId>

View File

@@ -584,7 +584,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 +611,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 +670,10 @@
}
<%
}
%>
<%//{B1 block%>
}
<%
}
%>
} <%/*close last method*/%>
@@ -1159,16 +1166,36 @@ if (execStat) {
<% if(exist_tSQLDB) { %>
private void closeSqlDbConnections() {
boolean shutdownAbandonedConnections = false;
try {
Object obj_conn;
<% for (INode sqlDbComponent : sqlDbComponentsList) { %>
obj_conn = globalMap.remove("conn_<%=sqlDbComponent.getUniqueName() %>");
if (null != obj_conn) {
((java.sql.Connection) obj_conn).close();
if (obj_conn != null) {
java.sql.Connection conn = (java.sql.Connection)obj_conn;
String originalURL = conn.getMetaData().getURL();
java.sql.Driver drv = java.sql.DriverManager.getDriver(originalURL);
String driverClass = drv.getClass().getName();
conn.close();
if("com.mysql.cj.jdbc.Driver".equals(driverClass) && routines.system.BundleUtils.inOSGi()) {
shutdownAbandonedConnections = true;
}
}
<% } %>
} catch (java.lang.Exception e) {
}
if (shutdownAbandonedConnections) {
try {
Class.forName("com.mysql.cj.jdbc.AbandonedConnectionCleanupThread").
getMethod("uncheckedShutdown").invoke(null, (Object[]) null);
} catch(java.lang.Exception e) {
}
}
}
<% } %>

View File

@@ -289,6 +289,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

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version>
<version>7.2.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.codegen</artifactId>

View File

@@ -66,6 +66,7 @@ import org.talend.designer.codegen.model.CodeGeneratorEmittersPoolFactory;
import org.talend.designer.codegen.model.CodeGeneratorInternalTemplatesFactoryProvider;
import org.talend.designer.codegen.proxy.JetProxy;
import org.talend.designer.core.generic.model.Component;
import org.talend.designer.runprocess.ProcessorUtilities;
/**
* CodeGenerator.
@@ -353,8 +354,12 @@ public class CodeGenerator implements ICodeGenerator {
.getDefault().getService(IResourcesDependenciesService.class);
String resourcePathForContext = null;
if (process instanceof IProcess2) {
resourcePathForContext = resourceService.getResourcePathForContext(process,
contextPar.getValue());
String value = contextPar.getValue();
// for runtime
if (!ProcessorUtilities.isExportConfig()) {
contextPar.setType(JavaTypesManager.FILE.getId());
}
resourcePathForContext = resourceService.getResourcePathForContext(process, value);
} else {
// for PreviewFileInputContentDataProcess run
resourcePathForContext = resourceService.getResourceItemFilePath(contextPar.getValue());

View File

@@ -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,23 +837,21 @@ public class ComponentsFactory implements IComponentsFactory {
init(false);
}
for (IComponent comp : componentList) {
if (comp.getComponentType() != EComponentType.JOBLET) {
continue;
}
String comName = comp.getName();
if (comp != null && paletteType.equals(comp.getPaletteType())) {
if (comName.equals(name)) {
return comp;
} else if (new JobletUtil().matchExpression(comName)) {
String[] names = comName.split(":"); //$NON-NLS-1$
comName = names[1];
if (comName.equals(name)) {
return comp;
}
// check if reference joblet component presents
JobletUtil jobletUtils = new JobletUtil();
Optional<IComponent> result = jobletUtils.findComponentByName(componentList, name, paletteType);
if (!result.isPresent()) {
// check if any name matching joblet component presents
if (jobletUtils.matchExpression(name)) {
name = StringUtils.substringAfterLast(name, ":"); //$NON-NLS-1$
if (StringUtils.isNotBlank(name)) {
result = jobletUtils.findComponentByName(componentList, name, paletteType);
}
}
}
if (result.isPresent()) {
return result.get();
}
return null;
}

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version>
<version>7.2.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.components.exchange</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version>
<version>7.2.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.components.libs</artifactId>

View File

@@ -569,17 +569,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

@@ -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%>)
@@ -233,25 +232,55 @@
.getService();
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);
<%
}
%>
com.google.cloud.bigquery.JobId jobId_<%=cid%> = com.google.cloud.bigquery.JobId.of(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 (resultSizeType.equals("LARGE") || resultSizeType.equals("AUTO")) {%>
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) { %>
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

@@ -10,7 +10,10 @@ imports="
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
INode node = (INode)codeGenArgument.getArgument();
String cid = node.getUniqueName();
String authMode = ElementParameterParser.getValue(node,"__AUTH_MODE__");
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

@@ -25,7 +25,7 @@
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
org.talend.designer.dbmap.language.generation.GenericDbGenerationManager gm = new org.talend.designer.dbmap.language.generation.GenericDbGenerationManager();
org.talend.designer.dbmap.language.mssql.MssqlGenerationManager gm = new org.talend.designer.dbmap.language.mssql.MssqlGenerationManager();
String uniqueNameComponent = null;
IDbLanguage currentLanguage = gm.getLanguage();

View File

@@ -305,48 +305,54 @@ for(Column colStmt:stmtStructure){
if(("INSERT").equals(dataAction)){
%>
String insertQuery_<%=cid %> = "INSERT INTO "+tableName_<%=cid%>+"(<%=insertColName.toString()%>) ("+select_query_<%=cid %>+")";
pstmt_<%=cid %> = conn_<%=cid%>.prepareStatement(insertQuery_<%=cid %>);
String insertQuery_<%=cid %> = "INSERT INTO "+tableName_<%=cid%>+"(<%=insertColName.toString()%>) ("+select_query_<%=cid %>+")";
pstmt_<%=cid %> = conn_<%=cid%>.prepareStatement(insertQuery_<%=cid %>);
<%
}else if (("UPDATE").equals(dataAction)){
if(useUpdateStatement){
if(useUpdateStatement){
%>
String updateQuery_<%=cid %> = select_query_<%=cid %>
String updateQuery_<%=cid %> = select_query_<%=cid %>;
<%
}else{
}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){
%>
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)) {
%>
+" WHERE " + <%=CodeGenerationUtils.replaceAllCrBySpace(whereClause)%>
+" AND " + <%=CodeGenerationUtils.replaceAllCrBySpace(whereClause)%>
<%
}
%>
;
pstmt_<%=cid %> = conn_<%=cid%>.prepareStatement(deleteQuery_<%=cid %>);
<%
}
%>
;
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)) {
%>
+" AND " + <%=CodeGenerationUtils.replaceAllCrBySpace(whereClause)%>
<%
}
%>
;
pstmt_<%=cid %> = conn_<%=cid%>.prepareStatement(deleteQuery_<%=cid %>);
<%
}
%>
int nb_line_<%=cid%> = 0;
int nb_line_updated_<%=cid%> = 0;
int nb_line_inserted_<%=cid%> = 0;

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

@@ -140,7 +140,15 @@
</PARAMETERS>
<ADVANCED_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;
@@ -156,21 +157,36 @@ skeleton="../templates/db_output_bulk.skeleton"
}
if(("INSERT").equals(dataAction)){
%>
String insertQuery_<%=cid %> = "INSERT INTO "+tableName_<%=cid%>+"(<%=insertColName.toString()%>) ("+select_query_<%=cid %>+")";
<%
} else if (("UPDATE").equals(dataAction)){
%>
String updateQuery_<%=cid %> = "UPDATE "+tableName_<%=cid%>+" SET <%=updateSetStmt.toString()%> "
<%
if(CodeGenerationUtils.hasAlphaNumericCharacter(whereClause)) {
%>
+" WHERE " + <%=CodeGenerationUtils.replaceAllCrBySpace(whereClause)%>
<%
}
%>
;
%>
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()%> "
<%
if(CodeGenerationUtils.hasAlphaNumericCharacter(whereClause)) {
%>
+" WHERE " + <%=CodeGenerationUtils.replaceAllCrBySpace(whereClause)%>
<%
}
%>
;
<%
}
} else if (("DELETE").equals(dataAction)){
%>
String deleteQuery_<%=cid %> = "DELETE FROM "+ tableName_<%=cid%>+" WHERE EXISTS ("+select_query_<%=cid %>+") "

View File

@@ -40,4 +40,6 @@ TABLE_ACTION.ITEM.CREATE_IF_NOT_EXISTS=Create table if not exists
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
TABLE_ACTION.NAME=Action on table
USE_UPDATE_STATEMENT.NAME=Use update statement without subqueries

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

@@ -42,6 +42,12 @@
>
<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>
<CODEGENERATION></CODEGENERATION>

View File

@@ -208,6 +208,8 @@ boolean isLog4jEnabled = ("true").equals(ElementParameterParser.getValue(node.ge
mc_<%=cid%>.addMailcap("multipart/*;; x-java-content-handler=com.sun.mail.handlers.multipart_mixed");
mc_<%=cid%>.addMailcap("message/rfc822;; x-java-content-handler=com.sun.mail.handlers.message_rfc822");
javax.activation.CommandMap.setDefaultCommandMap(mc_<%=cid%>);
// add com.sun.mail.handlers to job imports / depenencies (TESB-27110)
com.sun.mail.handlers.text_plain text_plain_h_<%=cid%> = null;
// -- Send the message --
javax.mail.Transport.send(msg_<%=cid %>);
} catch(java.lang.Exception e){

View File

@@ -106,7 +106,12 @@
REQUIRED="false" NUM_ROW="11">
<DEFAULT>true</DEFAULT>
</PARAMETER>
<PARAMETER NAME="IGNORE_SERVICE_ATTRIBUTES_FOR_EMPTY" FIELD="CHECK" NUM_ROW="11"
SHOW_IF="CREATE_EMPTY_ELEMENT=='false'">
<DEFAULT>false</DEFAULT>
</PARAMETER>
<PARAMETER NAME="EXPAND_EMPTY_ELM" FIELD="CHECK" NUM_ROW="11"
SHOW_IF="CREATE_EMPTY_ELEMENT=='true'">
<DEFAULT>false</DEFAULT>
@@ -173,6 +178,8 @@
TARGET="Out.CREATE" />
<TEMPLATE_PARAM SOURCE="self.CREATE_EMPTY_ELEMENT"
TARGET="Out.CREATE_EMPTY_ELEMENT" />
<TEMPLATE_PARAM SOURCE="self.IGNORE_SERVICE_ATTRIBUTES_FOR_EMPTY"
TARGET="Out.IGNORE_SERVICE_ATTRIBUTES_FOR_EMPTY" />
<TEMPLATE_PARAM SOURCE="self.EXPAND_EMPTY_ELM"
TARGET="Out.EXPAND_EMPTY_ELM" />
<TEMPLATE_PARAM SOURCE="self.OUTPUT_AS_XSD"

View File

@@ -43,4 +43,5 @@ SCHEMA.NAME=Schema
THOUSANDS_SEPARATOR.NAME=Thousands separator
XMLFIELD.NAME=Output Column
XSD_FILE.NAME=XSD file path
IGNORE_SERVICE_ATTRIBUTES_FOR_EMPTY.NAME = Ignore service attributes for empty elements
EXPAND_EMPTY_ELM.NAME = Expand Empty Element if needed(for dom4j)

View File

@@ -45,6 +45,7 @@ if ((metadatas!=null)&&(metadatas.size()>0)) {
String removeHeader = ElementParameterParser.getValue(node, "__REMOVE_HEADER__"); // add for feature7788
String encoding = ElementParameterParser.getValue(node, "__ENCODING__");
boolean isAllowEmpty = ("true").equals(ElementParameterParser.getValue(node, "__CREATE_EMPTY_ELEMENT__"));
boolean ignoreServiceAttributes = ("true").equals(ElementParameterParser.getValue(node, "__IGNORE_SERVICE_ATTRIBUTES_FOR_EMPTY__"));
boolean expandEmptyElm = ("true").equals(ElementParameterParser.getValue(node, "__EXPAND_EMPTY_ELM__"));
String mode = ElementParameterParser.getValue(node, "__GENERATION_MODE__");
List<Map<String, String>> rootTable =
@@ -200,6 +201,18 @@ java.util.Map<String,String> arraysValueMap_<%=cid%> = new java.util.HashMap<Str
%>
class NestXMLTool_<%=cid%>{
<%
if (!isAllowEmpty && ignoreServiceAttributes) {
%>
private java.util.Set<String> serviceAttributeNames = new java.util.HashSet<>();
{
serviceAttributeNames.add("type");
serviceAttributeNames.add("class");
serviceAttributeNames.add("array");
}
<%
}
%>
public void parseAndAdd(org.dom4j.Element nestRoot, String value){
try {
org.dom4j.Document doc4Str = org.dom4j.DocumentHelper.parseText("<root>"+ value + "</root>");
@@ -235,16 +248,25 @@ class NestXMLTool_<%=cid%>{
for (org.dom4j.Element tmp: (java.util.List<org.dom4j.Element>) root.elements()) {
removeEmptyElement(tmp);
}
if (root.content().size() == 0
&& root.attributes().size() == 0
&& root.declaredNamespaces().size() == 0) {
if(root.getParent()!=null){
root.getParent().remove(root);
boolean noSignificantDataAnnotationsExist = root.attributes().isEmpty() <%if (!isAllowEmpty && ignoreServiceAttributes) {%>|| isOnlyServiceAttributesDeclared(root.attributes()) <% } %>;
if (root.content().isEmpty()
&& noSignificantDataAnnotationsExist && root.declaredNamespaces().isEmpty()) {
if(root.getParent()!=null){
root.getParent().remove(root);
}
}
}
}
}
}
<%
if (!isAllowEmpty && ignoreServiceAttributes) {
%>
private boolean isOnlyServiceAttributesDeclared(List<org.dom4j.Attribute> attributes) {
return attributes.stream().allMatch(a -> serviceAttributeNames.contains(a.getName().toLowerCase()));
}
<%
}
%>
public String objectToString(Object value){
if(value.getClass().isArray()){
StringBuilder sb = new StringBuilder();

View File

@@ -99,6 +99,11 @@
<DEFAULT>true</DEFAULT>
</PARAMETER>
<PARAMETER NAME="IGNORE_SERVICE_ATTRIBUTES_FOR_EMPTY" FIELD="CHECK" NUM_ROW="11"
SHOW_IF="CREATE_EMPTY_ELEMENT=='false'">
<DEFAULT>false</DEFAULT>
</PARAMETER>
<PARAMETER NAME="EXPAND_EMPTY_ELM" FIELD="CHECK" NUM_ROW="11"
SHOW_IF="CREATE_EMPTY_ELEMENT=='true'">
<DEFAULT>false</DEFAULT>

View File

@@ -44,5 +44,6 @@ THOUSANDS_SEPARATOR.NAME=Thousands separator
XMLFIELD.NAME=Output Column
XML_FIELD.NAME=XML Field
XSD_FILE.NAME=XSD file path
IGNORE_SERVICE_ATTRIBUTES_FOR_EMPTY.NAME = Ignore service attributes for empty elements
EXPAND_EMPTY_ELM.NAME = Expand Empty Element if needed(for dom4j)
COMPACT_FORMAT.NAME = Compact Format

View File

@@ -35,6 +35,7 @@ imports="
%>
String driverClass_<%=cid%> = "<%=this.getDirverClassName(node)%>";
java.lang.Class jdbcclazz_<%=cid%> = java.lang.Class.forName(driverClass_<%=cid%>);
globalMap.put("driverClass_<%=cid%>", driverClass_<%=cid%>);
<%
newInstance(node);
}

View File

@@ -165,6 +165,12 @@ imports="
close_begin();
%>
conn_<%=cid%>.close();
<% /* TESB-24900 - graceful shutdown for MYSQL connection */ %>
if("com.mysql.cj.jdbc.Driver".equals((String)globalMap.get("driverClass_<%=(connection!=null)?connection.replaceAll("'","").trim():""%>"))
&& routines.system.BundleUtils.inOSGi()) {
Class.forName("com.mysql.cj.jdbc.AbandonedConnectionCleanupThread").
getMethod("checkedShutdown").invoke(null, (Object[]) null);
}
<%
close_end();
}

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version>
<version>7.2.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.components.localprovider</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version>
<version>7.2.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.core.generic</artifactId>

View File

@@ -16,6 +16,7 @@ import java.beans.PropertyChangeEvent;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang.StringUtils;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.gef.commands.Command;
import org.eclipse.swt.SWT;
@@ -126,7 +127,9 @@ public class ButtonController extends AbstractElementPropertySectionController {
continue;
}
for(String path : listString){
jars.add(GenericTableUtils.getDriverJarPath(path));
if (!StringUtils.isBlank(path)) {
jars.add(GenericTableUtils.getDriverJarPath(path));
}
}
}

View File

@@ -15,8 +15,10 @@ package org.talend.designer.core.generic.controller;
import java.beans.PropertyChangeEvent;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import org.apache.commons.lang.StringUtils;
@@ -41,6 +43,7 @@ import org.talend.components.api.properties.ComponentReferenceProperties;
import org.talend.core.model.process.EParameterFieldType;
import org.talend.core.model.process.IElementParameter;
import org.talend.core.model.process.INode;
import org.talend.core.model.process.IReplaceNodeHandler;
import org.talend.core.model.utils.TalendTextUtils;
import org.talend.core.ui.properties.tab.IDynamicProperty;
import org.talend.designer.core.generic.constants.IGenericConstants;
@@ -100,15 +103,20 @@ public class ComponentRefController extends AbstractElementPropertySectionContro
for (int j = 0; j < param.getListItemsValue().length; j++) {
if (((CCombo) ctrl).getText().equals(param.getListItemsDisplayName()[j])) {
value = (String) param.getListItemsValue()[j];
if (j == 0 && (boolean) ((ElementParameter) propertyParameter)
.getTaggedValue(IGenericConstants.IS_PROPERTY_SHOW)) {
if (j == 0) {
// The first item in the combo is
// this component
props.referenceType
.setValue(ComponentReferenceProperties.ReferenceType.THIS_COMPONENT);
props.componentInstanceId.setValue(null);
props.setReference(null);
propertyParameter.setShow(true);
boolean isPropertyShow = true;
Object isPropertyShowObj = ((ElementParameter) propertyParameter)
.getTaggedValue(IGenericConstants.IS_PROPERTY_SHOW);
if (isPropertyShowObj != null) {
isPropertyShow = Boolean.valueOf(isPropertyShowObj.toString());
}
propertyParameter.setShow(isPropertyShow);
} else {
props.referenceType
.setValue(ComponentReferenceProperties.ReferenceType.COMPONENT_INSTANCE);
@@ -277,12 +285,12 @@ public class ComponentRefController extends AbstractElementPropertySectionContro
INode currentNode = (INode) elem;
List<INode> refNodes = getRefNodes(param, props);
List<String> itemsLabel = new ArrayList<>();
List<String> itemsValue = new ArrayList<>();
Map<String, INode> itemsValue = new LinkedHashMap<>();
// First item is this component (see also createComboCommand)
// FIXME - I18N for this message
itemsLabel.add("Use this Component");
itemsValue.add(currentNode.getUniqueName());
itemsValue.put(currentNode.getUniqueName(), currentNode);
String selectedValue;
Object referenceType = props.referenceType.getValue();
if (referenceType != null && referenceType.equals(ComponentReferenceProperties.ReferenceType.COMPONENT_INSTANCE)) {
@@ -306,19 +314,20 @@ public class ComponentRefController extends AbstractElementPropertySectionContro
displayName = uniqueName + " - " + displayName; //$NON-NLS-1$
}
itemsLabel.add(displayName);
itemsValue.add(uniqueName);
itemsValue.put(uniqueName, node);
labelToValueMap.put(displayName, uniqueName);
}
List<String> itemValueList = new ArrayList<>(itemsValue.keySet());
param.setListItemsDisplayName(itemsLabel.toArray(new String[0]));
param.setListItemsDisplayCodeName(itemsLabel.toArray(new String[0]));
param.setListItemsValue(itemsValue.toArray(new String[0]));
param.setListItemsValue(itemValueList.toArray(new String[0]));
combo.setItems(itemsLabel.toArray(new String[0]));
String iLabel = null;
int selection = 0;
for (int i = 0; i < itemsValue.size(); i++) {
String iValue = itemsValue.get(i);
for (int i = 0; i < itemValueList.size(); i++) {
String iValue = itemValueList.get(i);
if ((selectedValue == null && (((INode) elem).getUniqueName()).equals(iValue))
|| (selectedValue != null && StringUtils.isNotEmpty(iValue) && iValue.endsWith(selectedValue))) {
|| isRefernceNode(currentNode, itemsValue.get(iValue), selectedValue, props)) {
iLabel = itemsLabel.get(i);
break;
}
@@ -331,6 +340,33 @@ public class ComponentRefController extends AbstractElementPropertySectionContro
}
private boolean isRefernceNode(INode selectedNode, INode checkingNode, String selectedUniqueName, ComponentReferenceProperties props) {
IReplaceNodeHandler selectedHandler = selectedNode.getReplaceNodeHandler();
IReplaceNodeHandler checkingHandler = checkingNode.getReplaceNodeHandler();
String selectedPrefix = Optional.ofNullable(selectedHandler).map(h -> h.getPrefix()).orElse("");
String checkingPrefix = Optional.ofNullable(checkingHandler).map(h -> h.getPrefix()).orElse("");
if (checkingPrefix.startsWith(selectedPrefix)) {
String selectedNameWithoutPrefix = selectedUniqueName;
String checkingUniqueNameWithoutPrefix = checkingNode.getUniqueName();
if (selectedNameWithoutPrefix.startsWith(selectedPrefix)) {
selectedNameWithoutPrefix = selectedNameWithoutPrefix.substring(selectedPrefix.length());
}
if (checkingUniqueNameWithoutPrefix.startsWith(selectedPrefix)) {
checkingUniqueNameWithoutPrefix = checkingUniqueNameWithoutPrefix.substring(selectedPrefix.length());
}
boolean isReferenceNode = StringUtils.equals(selectedNameWithoutPrefix, checkingUniqueNameWithoutPrefix);
if (isReferenceNode && selectedNode != checkingNode) {
props.componentInstanceId.setValue(selectedNameWithoutPrefix);
props.setReference(checkingNode.getComponentProperties());
}
return isReferenceNode;
} else {
return false;
}
}
private List<INode> getRefNodes(IElementParameter param, ComponentReferenceProperties props) {
callBeforeActive(param);
List<INode> refNodes = new ArrayList<>();

View File

@@ -1473,7 +1473,12 @@ public class Component extends AbstractBasicComponent {
//as sql type value may have newline and return characters, which make compiler issue in java code,
//so have to convert the newline characters to visible "\r", "\n" for pass the compiler issue and can't only convert them to white space as TDI-41898
//jdbc drivers, salesforce driver can work like that sql : select * \nfrom Account, so it is ok
return NodeUtil.replaceCRLFInMEMO_SQL(value);
String replacedString = NodeUtil.replaceCRLFInMEMO_SQL(value).trim();
// For the case when sql field ends with extra semicolon, it has to be removed to avoid compilation error.
return replacedString.endsWith(";")
? replacedString.substring(0, replacedString.length() -1)
: replacedString;
}
if (GenericTypeUtils.isSchemaType(property)) {
// Handles embedded escaped quotes which might occur

View File

@@ -15,6 +15,7 @@ package org.talend.designer.core.generic.model;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.lang.reflect.InvocationTargetException;
import java.net.ProxySelector;
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicBoolean;
@@ -30,6 +31,7 @@ import org.eclipse.ui.PlatformUI;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.commons.ui.gmf.util.DisplayUtils;
import org.talend.commons.ui.swt.dialogs.ErrorDialogWidthDetailArea;
import org.talend.commons.utils.network.TalendProxySelector;
import org.talend.components.api.component.Connector;
import org.talend.components.api.properties.ComponentProperties;
import org.talend.components.api.service.ComponentService;
@@ -498,11 +500,27 @@ public class GenericElementParameter extends ElementParameter implements IGeneri
monitor.beginTask(taskName, IProgressMonitor.UNKNOWN);
try {
exceptionResult = null;
if (Boolean.getBoolean(TalendProxySelector.PROP_PRINT_LOGS)) {
ExceptionHandler.log(
"Before tcompv0 service call: ProxySelector.getDefault() -> " + ProxySelector.getDefault());
ExceptionHandler.log("http.proxyHost -> " + System.getProperty("http.proxyHost"));
}
toDo();
if (Boolean.getBoolean(TalendProxySelector.PROP_PRINT_LOGS)) {
ExceptionHandler.log(
"After tcompv0 service call: ProxySelector.getDefault() -> " + ProxySelector.getDefault());
ExceptionHandler.log("http.proxyHost -> " + System.getProperty("http.proxyHost"));
}
} catch (Throwable e) {
result.set(false);
exceptionResult = new InvocationTargetException(e);
throw exceptionResult;
} finally {
if (Boolean.getBoolean(TalendProxySelector.PROP_PRINT_LOGS)) {
ExceptionHandler.log(
"Finally tcompv0 service call: ProxySelector.getDefault() -> " + ProxySelector.getDefault());
ExceptionHandler.log("http.proxyHost -> " + System.getProperty("http.proxyHost"));
}
}
result.set(true);
}
@@ -568,6 +586,7 @@ public class GenericElementParameter extends ElementParameter implements IGeneri
this.drivedByForm = drivedByForm;
}
@Override
public Property getProperty() {
NamedThing content = widget.getContent();
if (content instanceof Property) {

View File

@@ -21,11 +21,13 @@ import java.util.Set;
import org.talend.components.api.component.ComponentDefinition;
import org.talend.components.api.properties.ComponentProperties;
import org.talend.components.api.properties.ComponentReferenceProperties;
import org.talend.core.model.components.IComponent;
import org.talend.core.model.process.EParameterFieldType;
import org.talend.core.model.process.IElementParameter;
import org.talend.core.model.process.INode;
import org.talend.core.runtime.services.IGenericService;
import org.talend.daikon.properties.Properties;
import org.talend.designer.core.generic.model.Component;
import org.talend.designer.core.generic.model.GenericElementParameter;
import org.talend.designer.core.generic.utils.ComponentsUtils;
@@ -109,4 +111,9 @@ public class GenericService implements IGenericService {
return null;
}
@Override
public boolean isTcompv0(IComponent component) {
return Component.class.isInstance(component);
}
}

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>7.2.1-SNAPSHOT</version>
<version>7.2.1</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.core</artifactId>

View File

@@ -736,6 +736,7 @@ PerformancePreferencePage.generateCode=Generate code when opening the job
PerformancePreferencePage.checkVersion=Check only the last version when updating jobs or joblets
PerformancePreferencePage.addOrDeleteVariable=Propagate add/delete variable changes in repository contexts
PerformancePreferencePage.ActivedTimeoutSetting=Activate the timeout for database connection.
PerformancePreferencePage.propagateContext=Propagate add context groups in repository contexts
PerformancePreferencePage.ConnectionTimeout=Connection timeout (seconds)
PerformancePreferencePage.HBaseOrMaprDBScanLimit=HBase/MapR-DB scan limit (for retrieving schema)
PerformancePreferencePage.HBaseOrMaprDBScanLimitTip=If set it by zero, will be same as deactiving the limit.

View File

@@ -99,6 +99,7 @@ import org.talend.designer.core.ui.views.jobsettings.JobSettings;
import org.talend.designer.core.ui.views.problems.Problems;
import org.talend.designer.core.ui.views.properties.ComponentSettings;
import org.talend.designer.core.ui.views.properties.ComponentSettingsView;
import org.talend.designer.core.utils.BigDataJobUtil;
import org.talend.designer.core.utils.JavaProcessUtil;
import org.talend.designer.core.utils.UnifiedComponentUtil;
import org.talend.designer.runprocess.ProcessorException;
@@ -874,4 +875,9 @@ public class DesignerCoreService implements IDesignerCoreService {
}
return false;
}
@Override
public boolean isNeedContextInJar(IProcess process) {
return new BigDataJobUtil(process).needsToHaveContextInsideJar();
}
}

View File

@@ -12,106 +12,100 @@
// ============================================================================
package org.talend.designer.core.build;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.runtime.IPath;
import org.talend.commons.CommonsPlugin;
import org.talend.core.model.process.INode;
import org.talend.core.model.process.IProcess2;
import org.talend.core.model.properties.Item;
import org.talend.core.model.properties.ProcessItem;
import org.talend.core.model.properties.Property;
import org.talend.core.model.repository.ERepositoryObjectType;
import org.talend.core.model.repository.IRepositoryViewObject;
import org.talend.core.repository.utils.ItemResourceUtil;
import org.talend.core.runtime.process.IBuildJobHandler;
import org.talend.core.runtime.process.TalendProcessArgumentConstant;
import org.talend.core.runtime.repository.build.BuildType;
import org.talend.core.runtime.repository.build.IBuildExportHandler;
import org.talend.core.runtime.repository.build.IMavenPomCreator;
import org.talend.core.runtime.repository.build.RepositoryObjectTypeBuildProvider;
import org.talend.designer.core.model.utils.emf.talendfile.NodeType;
import org.talend.designer.core.model.utils.emf.talendfile.ProcessType;
import org.talend.designer.maven.tools.creator.CreateMavenStandardJobOSGiPom;
import org.talend.designer.runprocess.IProcessor;
import org.talend.repository.constants.BuildJobConstants;
import org.talend.repository.ui.wizards.exportjob.handler.BuildOSGiBundleHandler;
import org.talend.repository.ui.wizards.exportjob.scriptsmanager.JobScriptsManager.ExportChoice;
/**
* DOC ggu class global comment. Detailled comment
* Build Provider for OSGI build type (ESB bundle)
*/
public class StandardJobOSGiBundleBuildProvider extends RepositoryObjectTypeBuildProvider {
private static final List<String> ESB_COMPONENTS;
static {
final List<String> esbComponents = Arrays.asList("tRESTClient", "tRESTRequest", "tRESTResponse", "tESBConsumer",
"tESBProviderFault", "tESBProviderRequest", "tESBProviderResponse", "tRouteInput", "tREST");
ESB_COMPONENTS = Collections.unmodifiableList(esbComponents);
}
private static final String OSGI = "OSGI";
@Override
public boolean valid(Map<String, Object> parameters) {
if (parameters == null || parameters.isEmpty()) {
return false;
}
ERepositoryObjectType type = null;
Property property = null;
boolean containsEsbComponent = false;
Object object = parameters.get(PROCESS);
if (object != null && object instanceof IProcess2) {
Property property = ((IProcess2) object).getProperty();
if (isOsgiBuildType(property)) {
return true;
}
IProcess2 process = (IProcess2) object;
for (INode node : process.getGraphicalNodes()) {
if (ESB_COMPONENTS.contains(node.getComponent().getName())) {
containsEsbComponent = true;
break;
}
}
property = ((IProcess2) object).getProperty();
if (property != null) {
type = ERepositoryObjectType.getType(property);
}
}
if (type == null) {
object = parameters.get(ITEM);
if (object != null && object instanceof ProcessItem) {
ProcessItem processItem = (ProcessItem) object;
ProcessType process = processItem.getProcess();
for (Object node : process.getNode()) {
NodeType nodeType = (NodeType) node;
if (ESB_COMPONENTS.contains(nodeType.getComponentName())) {
containsEsbComponent = true;
break;
}
}
property = ((Item) object).getProperty();
if (property != null) {
type = ERepositoryObjectType.getType(property);
if (node.isActivate() && BuildJobConstants.esbComponents.contains(node.getComponent().getName())) {
fixDefaultBuildType(property);
return true;
}
}
}
if (type == null) {
object = parameters.get(REPOSITORY_OBJECT);
if (object != null && object instanceof IRepositoryViewObject) {
type = ((IRepositoryViewObject) object).getRepositoryObjectType();
property = ((IRepositoryViewObject) object).getProperty();
object = parameters.get(ITEM);
if (object != null && object instanceof ProcessItem) {
Property property = ((Item) object).getProperty();
if (isOsgiBuildType(property)) {
return true;
}
ProcessItem processItem = (ProcessItem) object;
for (Object node : processItem.getProcess().getNode()) {
NodeType nodeType = (NodeType) node;
if (BuildJobConstants.esbComponents.contains(nodeType.getComponentName())) {
fixDefaultBuildType(property);
return true;
}
}
}
// && !isServiceOperation(property)
if (containsEsbComponent) {
return true;
}
return false;
}
/**
* @param property
* @return true if the build type is OSGI
*/
private boolean isOsgiBuildType(Property property) {
return property != null && "OSGI".equals(property.getAdditionalProperties().get(TalendProcessArgumentConstant.ARG_BUILD_TYPE));
}
/**
* Fix the default build type if it is a ESB job
* @param property
*/
@SuppressWarnings("unchecked")
private void fixDefaultBuildType(Property property) {
if(CommonsPlugin.isHeadless() && property != null && property.getAdditionalProperties().get(TalendProcessArgumentConstant.ARG_BUILD_TYPE) == null) {
property.getAdditionalProperties().put(TalendProcessArgumentConstant.ARG_BUILD_TYPE, OSGI);
}
}
@Override
protected ERepositoryObjectType getObjectType() {
return ERepositoryObjectType.PROCESS;
@@ -204,5 +198,4 @@ public class StandardJobOSGiBundleBuildProvider extends RepositoryObjectTypeBuil
contextGroup.toString(), (Map<ExportChoice, Object>) choiceOption);
return buildHandler;
}
}

View File

@@ -45,6 +45,8 @@ import org.talend.repository.ui.wizards.exportjob.scriptsmanager.JobScriptsManag
*/
public class StandardJobStandaloneBuildProvider extends RepositoryObjectTypeBuildProvider {
private static final String REST_REQUEST = "tRESTRequest";
/*
* (non-Javadoc)
*
@@ -74,7 +76,7 @@ public class StandardJobStandaloneBuildProvider extends RepositoryObjectTypeBuil
if (object != null && object instanceof IProcess2) {
for (INode node : ((IProcess2) object).getGraphicalNodes()) {
if ("tRESTRequest".equals(node.getComponent().getName())) {
if (node.isActivate() && REST_REQUEST.equals(node.getComponent().getName())) {
isRestServiceProvider = true;
break;
}
@@ -97,7 +99,7 @@ public class StandardJobStandaloneBuildProvider extends RepositoryObjectTypeBuil
ProcessItem processItem = (ProcessItem) object;
for (Object node : processItem.getProcess().getNode()) {
NodeType nodeType = (NodeType) node;
if ("tRESTRequest".equals(nodeType.getComponentName())) {
if (REST_REQUEST.equals(nodeType.getComponentName())) {
isRestServiceProvider = true;
break;
}

View File

@@ -379,6 +379,8 @@ public enum EParameterName {
ACTIVE_DATABASE_DELIMITED_IDENTIFIERS("Active database delimited identifiers"), //$NON-NLS-1$
USE_ALIAS_IN_OUTPUT_TABLE("Use alias in output table"), //$NON-NLS-1$
// for tDataprepRun
PREPARATION_ID("PREPARATION_ID");

View File

@@ -16,11 +16,14 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.commons.lang.ArrayUtils;
import org.talend.commons.ui.runtime.exception.ExceptionHandler;
import org.talend.commons.utils.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.oro.text.regex.MalformedPatternException;
import org.apache.oro.text.regex.Pattern;
import org.apache.oro.text.regex.Perl5Compiler;
import org.apache.oro.text.regex.Perl5Matcher;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.commons.utils.system.EnvironmentUtils;
import org.talend.core.PluginChecker;
import org.talend.core.language.LanguageManager;
@@ -35,10 +38,10 @@ import org.talend.core.model.process.IConnectionCategory;
import org.talend.core.model.process.IElement;
import org.talend.core.model.process.IElementParameter;
import org.talend.core.model.process.INode;
import org.talend.designer.core.ui.editor.process.Process;
import org.talend.hadoop.distribution.DistributionFactory;
import org.talend.hadoop.distribution.ESparkVersion;
import org.talend.hadoop.distribution.spark.SparkVersionUtil;
import org.talend.designer.core.ui.editor.process.Process;
/**
* This class will test an expression in the element parameters. <br>
@@ -74,7 +77,36 @@ public final class Expression {
private static final String LESS_THAN = "<"; //$NON-NLS-1$
private static final Pattern isShowFuncPattern = Pattern.compile("isShow\\[(\\w+)(\\.\\w+)*\\]"); //$NON-NLS-1$
private static final String isShowPrefix = "isShow"; //$NON-NLS-1$
private static final java.util.regex.Pattern isShowFuncPattern = java.util.regex.Pattern
.compile(isShowPrefix + "\\[(\\w+)(\\.\\w+)*\\]"); //$NON-NLS-1$
private static final String sparkVersionPrefix = "SPARK_"; //$NON-NLS-1$
private static final java.util.regex.Pattern sparkVersionPattern = java.util.regex.Pattern
.compile("(lt|le|gt|ge|eq|ne)\\s*'(" + sparkVersionPrefix + ".*)'"); //$NON-NLS-1$ //$NON-NLS-2$
private static Perl5Matcher conditionMatcher = new Perl5Matcher();
private static Pattern andPattern;
private static Pattern orPattern;
static {
Perl5Compiler compiler = new Perl5Compiler();
// example for the reg exp: (.*)[')][ ]*or[ ]*[\w(](.*)
String prefixReg = "(.*)[') ][ ]*"; //$NON-NLS-1$
String suffixReg = "[ ]*[ (](.*)"; //$NON-NLS-1$
try {
andPattern = compiler.compile(prefixReg + AND + suffixReg);
orPattern = compiler.compile(prefixReg + OR + suffixReg);
} catch (MalformedPatternException e) {
throw new RuntimeException(e);
}
}
private static final String CONTAINS = "CONTAINS"; //$NON-NLS-1$
private Expression(String expressionString) {
this.expressionString = expressionString;
@@ -145,14 +177,15 @@ public final class Expression {
}
public static boolean isThereCondition(String expression, String condition) {
// example for the reg exp: (.*)[')][ ]*or[ ]*[\w(](.*)
String refixReg = "(.*)[') ][ ]*"; //$NON-NLS-1$
String suffixReg = "[ ]*[ (](.*)"; //$NON-NLS-1$
if (expression.matches(refixReg + condition + suffixReg)) {
protected static boolean isThereCondition(String expression, String condition) {
expression = expression.toLowerCase();
if (!expression.contains(condition)) {
return false;
}
if (AND.equals(condition) && conditionMatcher.matches(expression, andPattern)) {
return true;
}
if (expression.matches(refixReg + condition.toUpperCase() + suffixReg)) {
if (OR.equals(condition) && conditionMatcher.matches(expression, orPattern)) {
return true;
}
return false;
@@ -274,6 +307,10 @@ public final class Expression {
if ((simpleExpression.contains("SPARK_VERSION["))) { //$NON-NLS-1$
return evaluateSparkVersion(simpleExpression, listParam, currentParam);
}
if ((simpleExpression.contains(CONTAINS))) { //$NON-NLS-1$
return evaluateContains(simpleExpression, listParam);
}
List<String> paraNames = getParaNamesFromIsShowFunc(simpleExpression);
if (paraNames.size() > 0) {
@@ -784,13 +821,15 @@ public final class Expression {
// should be private, but need to unitary tested
public static boolean evaluateSparkVersion(String simpleExpression, List<? extends IElementParameter> listParam,
ElementParameter currentParam) {
if (!simpleExpression.contains(sparkVersionPrefix)) {
return false;
}
INode node = retrieveNodeElementFromParameter(currentParam, listParam);
ESparkVersion version = SparkVersionUtil.getSparkVersion(node);
if (version == null) {
return false;
}
Pattern p = java.util.regex.Pattern.compile("(lt|le|gt|ge|eq|ne)\\s*'(SPARK_.*)'"); //$NON-NLS-1$
Matcher m = p.matcher(simpleExpression);
Matcher m = sparkVersionPattern.matcher(simpleExpression);
if (m.find()) {
ESparkVersion versionToTest = ESparkVersion.valueOf(m.group(2));
switch (m.group(1)) {
@@ -836,7 +875,7 @@ public final class Expression {
private static List<String> getParaNamesFromIsShowFunc(String expr) {
List<String> paraNames = new ArrayList<String>();
if (expr == null) {
if (expr == null || !expr.contains(isShowPrefix)) {
return paraNames;
}
Matcher matcher = isShowFuncPattern.matcher(expr);
@@ -1030,5 +1069,28 @@ public final class Expression {
}
return false;
}
public static boolean evaluateContains(String simpleExpression, List<? extends IElementParameter> listParam) {
//Split to get param name and param value to look after
String[] splitted = simpleExpression.split(CONTAINS);
if (splitted.length != 2) {
return false;
}
String paramName = splitted[0].trim();
String paramValue = splitted[1].trim();
//Look for the param name in list
IElementParameter param = listParam.stream()
.filter(p -> paramName.equals(p.getName()))
.findAny()
.orElse(null);
if (param == null || ! EParameterFieldType.TABLE.equals(param.getFieldType())) {
return false;
}
// Check if we can find paraValue among table lines
return ((List<Map<String, Object>>) param.getValue()).stream()
.anyMatch(line -> paramValue.equals(line.toString()));
}
}

View File

@@ -31,9 +31,20 @@ public class MultipleComponentConnection implements IMultipleComponentConnection
String connectionType;
String connectorName;
public MultipleComponentConnection(String cType, String targetName) {
connectionType = cType;
nameTarget = targetName;
connectorName = cType;
}
public String getConnectorName() {
return connectorName;
}
public void setConnectorName(String connectorName) {
this.connectorName = connectorName;
}
/*

View File

@@ -17,6 +17,7 @@ import java.util.List;
import org.talend.core.model.components.IMultipleComponentConnection;
import org.talend.core.model.components.IMultipleComponentItem;
import org.talend.core.model.process.INode;
/**
* DOC nrousseau class global comment. Detailled comment <br/>
@@ -67,4 +68,10 @@ public class MultipleComponentItem implements IMultipleComponentItem {
public void setComponent(String component) {
this.component = component;
}
@Override
public void updateNode(INode newNode, INode oldNode) {
// nothing to do
}
}

View File

@@ -77,17 +77,36 @@ public class MultipleComponentManager implements IMultipleComponentManager {
return currentItem;
}
public void addItem(IMultipleComponentItem currentItem) {
String name = currentItem.getName();
if (name.equals(inputName)) {
input = currentItem;
}
if (name.equals(outputName)) {
output = currentItem;
}
itemList.add(currentItem);
}
/*
* (non-Javadoc)
*
* @see org.talend.core.model.components.IMultipleComponentManager#addParam(java.lang.String, java.lang.String)
*/
public void addParam(String source, String target) {
paramList.add(new MultipleComponentParameter(source, target));
paramList.add(createMultiCompParam(source, target));
}
public void addValue(String target, String value) {
paramList.add(new MultipleComponentParameterValue(target, value));
paramList.add(createMultiCompParamValue(target, value));
}
protected IMultipleComponentParameter createMultiCompParam(String target, String value) {
return new MultipleComponentParameter(target, value, getParamSeperator());
}
protected IMultipleComponentParameter createMultiCompParamValue(String target, String value) {
return new MultipleComponentParameterValue(target, value, getParamSeperator());
}
public void validateItems() {
@@ -170,4 +189,9 @@ public class MultipleComponentManager implements IMultipleComponentManager {
return this.lookupMode;
}
@Override
public String getParamSeperator() {
return ".";
}
}

View File

@@ -33,11 +33,15 @@ public class MultipleComponentParameter implements IMultipleComponentParameter {
String targetValue;
public MultipleComponentParameter(String source, String target) {
StringTokenizer token = new StringTokenizer(source, "."); //$NON-NLS-1$
this(source, target, ".");
}
public MultipleComponentParameter(String source, String target, String seperator) {
StringTokenizer token = new StringTokenizer(source, seperator);
sourceComponent = token.nextToken();
sourceValue = token.nextToken();
token = new StringTokenizer(target, "."); //$NON-NLS-1$
token = new StringTokenizer(target, seperator);
targetComponent = token.nextToken();
targetValue = token.nextToken();
}

View File

@@ -33,7 +33,11 @@ public class MultipleComponentParameterValue implements IMultipleComponentParame
String targetValue;
public MultipleComponentParameterValue(String target, String value) {
StringTokenizer token = new StringTokenizer(target, "."); //$NON-NLS-1$
this(target, value, ".");
}
public MultipleComponentParameterValue(String target, String value, String seperator) {
StringTokenizer token = new StringTokenizer(target, seperator);
targetComponent = token.nextToken();
targetValue = token.nextToken();
@@ -41,6 +45,7 @@ public class MultipleComponentParameterValue implements IMultipleComponentParame
sourceValue = value;
}
/*
* (non-Javadoc)
*

View File

@@ -0,0 +1,37 @@
// ============================================================================
//
// 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.designer.core.model.components;
/**
* DOC hzhao class global comment. Detailled comment
*/
public class MultipleGenricComponentManager extends MultipleComponentManager {
public MultipleGenricComponentManager(boolean lookupMode) {
super(lookupMode);
}
public MultipleGenricComponentManager(String inputName, String outputName, String connector) {
super(inputName, outputName, connector);
}
public MultipleGenricComponentManager(String inputName, String outputName) {
super(inputName, outputName);
}
@Override
public String getParamSeperator() {
return "#";
}
}

View File

@@ -23,6 +23,7 @@ import org.eclipse.core.runtime.Platform;
import org.eclipse.gef.palette.PaletteEntry;
import org.eclipse.jface.resource.ImageDescriptor;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.commons.exception.PersistenceException;
import org.talend.core.model.components.IComponent;
import org.talend.core.model.process.INode;
import org.talend.core.model.process.IProcess;
@@ -31,6 +32,7 @@ import org.talend.core.model.process.IReplaceNodeInProcess;
import org.talend.core.model.properties.Item;
import org.talend.core.model.properties.JobletProcessItem;
import org.talend.core.model.repository.ERepositoryObjectType;
import org.talend.core.model.repository.IRepositoryEditorInput;
import org.talend.core.model.update.UpdateResult;
import org.talend.designer.core.ui.editor.process.Process;
@@ -143,7 +145,7 @@ public abstract class AbstractProcessProvider implements IReplaceNodeInProcess {
}
}
}
/**
* DOC qzhang Comment method "canDeleteNode".
*
@@ -257,5 +259,10 @@ public abstract class AbstractProcessProvider implements IReplaceNodeInProcess {
public boolean canHandleNode(INode node) {
return false;
}
public IRepositoryEditorInput createJobletEditorInput(JobletProcessItem processItem, boolean load, Boolean lastVersion, Boolean readonly,
Boolean openedInJob) throws PersistenceException{
return null;
}
}

View File

@@ -20,6 +20,7 @@ import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Optional;
import java.util.Set;
import org.apache.commons.collections.BidiMap;
@@ -36,6 +37,7 @@ import org.talend.components.api.properties.VirtualComponentProperties;
import org.talend.core.GlobalServiceRegister;
import org.talend.core.PluginChecker;
import org.talend.core.database.EDatabaseTypeName;
import org.talend.core.hadoop.HadoopConfJarBean;
import org.talend.core.hadoop.IHadoopClusterService;
import org.talend.core.hadoop.repository.HadoopRepositoryUtil;
import org.talend.core.model.components.ComponentCategory;
@@ -512,6 +514,7 @@ public class DataProcess implements IGeneratingProcess {
((IExternalNode) dataNode).setInternalMapperModel(externalNode.getInternalMapperModel());
}
}
dataNode.setReplaceNodeHandler(graphicalNode.getReplaceNodeHandler());
dataNode.setActivate(graphicalNode.isActivate());
dataNode.setStart(graphicalNode.isStart());
@@ -778,7 +781,7 @@ public class DataProcess implements IGeneratingProcess {
DataConnection dataConnec = new DataConnection();
dataConnec.setActivate(graphicalNode.isActivate());
dataConnec.setLineStyle(EConnectionType.getTypeFromName(curConnec.getConnectionType()));
dataConnec.setConnectorName(curConnec.getConnectionType());
dataConnec.setConnectorName(curConnec.getConnectorName());
if (nodeSource.getMetadataList() != null) {
dataConnec.setMetadataTable(nodeSource.getMetadataList().get(0));
}
@@ -1011,6 +1014,7 @@ public class DataProcess implements IGeneratingProcess {
curNode.setActivate(false);
curNode.setStart(false);
}
curItem.updateNode(curNode, graphicalNode);
}
}
@@ -1948,7 +1952,7 @@ public class DataProcess implements IGeneratingProcess {
}
}
if (duplicatedProcess.getComponentsType().equals(ComponentCategory.CATEGORY_4_DI.getName()) && PluginChecker.isTIS()) {
if (duplicatedProcess.getComponentsType().equals(ComponentCategory.CATEGORY_4_DI.getName()) && PluginChecker.isTIS() && !Boolean.getBoolean("deactivate_extended_component_log")) {
final String talendJobLogComponent = "tJobStructureCatcher";
final String uid4TalendJobLogComponent = "talendJobLog";
IComponent jobStructComponent = ComponentsFactoryProvider.getInstance().get(talendJobLogComponent, ComponentCategory.CATEGORY_4_DI.getName());
@@ -3249,8 +3253,8 @@ public class DataProcess implements IGeneratingProcess {
if (!hadoopClusterService.isUseDynamicConfJar(hadoopClusterItemId)) {
return null;
}
String confsJarName = hadoopClusterService.getCustomConfsJarName(hadoopClusterItemId, false, false);
if (confsJarName == null) {
Optional<HadoopConfJarBean> confJarBean = hadoopClusterService.getCustomConfsJar(hadoopClusterItemId, false, false);
if (!confJarBean.isPresent()) {
return null;
}
IComponent component = ComponentsFactoryProvider.getInstance().get(componentName, componentCategory.getName());
@@ -3266,7 +3270,21 @@ public class DataProcess implements IGeneratingProcess {
clusterIdParam.setValue(hadoopClusterItemId);
}
IElementParameter confLibParam = confNode.getElementParameter("CONF_LIB"); //$NON-NLS-1$
confLibParam.setValue(TalendTextUtils.addQuotes(confsJarName));
confLibParam.setValue(TalendTextUtils.addQuotes(confJarBean.get().getCustomConfJarName()));
IElementParameter setConfParam = confNode.getElementParameter("SET_HADOOP_CONF"); //$NON-NLS-1$
if (setConfParam != null) {
setConfParam.setValue(Boolean.valueOf(confJarBean.get().isOverrideCustomConf()));
}
IElementParameter confPathParam = confNode.getElementParameter("HADOOP_CONF_SPECIFIC_JAR"); //$NON-NLS-1$
if (confPathParam != null) {
String jarPath = null;
if (confJarBean.get().isContextMode()) {
jarPath = confJarBean.get().getOverrideCustomConfPath();
} else {
jarPath = TalendTextUtils.addQuotes(confJarBean.get().getOriginalOverrideCustomConfPath());
}
confPathParam.setValue(jarPath);
}
return confNode;
}
return null;

View File

@@ -15,16 +15,25 @@ package org.talend.designer.core.model.process.jobsettings;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import org.apache.avro.Schema;
import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.common.util.EList;
import org.eclipse.jface.resource.ImageDescriptor;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.commons.utils.VersionUtils;
import org.talend.components.api.properties.ComponentProperties;
import org.talend.core.model.components.ComponentCategory;
import org.talend.core.model.components.EComponentType;
import org.talend.core.model.components.IComponent;
import org.talend.core.model.components.IMultipleComponentItem;
import org.talend.core.model.components.IMultipleComponentManager;
import org.talend.core.model.general.ModuleNeeded;
import org.talend.core.model.metadata.IMetadataTable;
import org.talend.core.model.metadata.MetadataToolAvroHelper;
import org.talend.core.model.metadata.builder.ConvertionHelper;
import org.talend.core.model.param.EConnectionParameterName;
import org.talend.core.model.process.EConnectionType;
import org.talend.core.model.process.EParameterFieldType;
import org.talend.core.model.process.IElementParameter;
@@ -33,11 +42,15 @@ import org.talend.core.model.process.INodeConnector;
import org.talend.core.model.process.INodeReturn;
import org.talend.core.model.process.IProcess;
import org.talend.core.model.temp.ECodePart;
import org.talend.core.runtime.services.IGenericService;
import org.talend.core.ui.component.ComponentsFactoryProvider;
import org.talend.designer.core.model.components.EParameterName;
import org.talend.designer.core.model.components.ElementParameter;
import org.talend.designer.core.model.components.EmfComponent;
import org.talend.designer.core.model.components.MultipleComponentConnection;
import org.talend.designer.core.model.components.MultipleComponentItem;
import org.talend.designer.core.model.components.MultipleComponentManager;
import org.talend.designer.core.model.components.MultipleGenricComponentManager;
import org.talend.designer.core.model.process.jobsettings.JobSettingsConstants.ContextLoadInfo;
/**
@@ -65,9 +78,22 @@ public class JobContextLoadComponent implements IComponent {
private final boolean isFile;
public JobContextLoadComponent(boolean isFile, String dbComponent) {
private IComponent component;
public JobContextLoadComponent(boolean isFile, String dbComponent, String componentType) {
this.isFile = isFile;
this.dbComponent = dbComponent;
try {
String compType = componentType;
if (StringUtils.isBlank(componentType)) {
ExceptionHandler.log(
this.getClass().getName() + ": componentType is empty, will use DI type for component " + dbComponent);
compType = ComponentCategory.CATEGORY_4_DI.getName();
}
component = ComponentsFactoryProvider.getInstance().get(dbComponent, compType);
} catch (Throwable e) {
ExceptionHandler.process(e);
}
loadMultipleComponentManager();
}
@@ -87,17 +113,46 @@ public class JobContextLoadComponent implements IComponent {
if (dbComponent == null) {
return;
}
multipleComponentManager = new MultipleComponentManager(DB_INPUT, CONTEXT_LOAD);
IMultipleComponentItem currentItem = multipleComponentManager.addItem(DB_INPUT, dbComponent);
currentItem.getOutputConnections().add(
new MultipleComponentConnection(EConnectionType.FLOW_MAIN.getName(), CONTEXT_LOAD));
MultipleComponentConnection multiCompConnection = new MultipleComponentConnection(EConnectionType.FLOW_MAIN.getName(),
CONTEXT_LOAD);
IMultipleComponentItem currentItem = null;
if (isTcompv0(component)) {
multipleComponentManager = new MultipleGenricComponentManager(DB_INPUT, CONTEXT_LOAD);
multiCompConnection.setConnectorName("MAIN");
currentItem = new MultipleComponentItem() {
public void updateNode(INode newNode, INode oldNode) {
super.updateNode(newNode, oldNode);
if (newNode != null) {
List<IMetadataTable> metadataList = newNode.getMetadataList();
if (0 < metadataList.size() && isTcompv0(newNode.getComponent())) {
IMetadataTable newMetadata = metadataList.get(0);
newMetadata.setAttachedConnector("MAIN");
ComponentProperties tcomp_properties = newNode.getComponentProperties();
Schema schema = MetadataToolAvroHelper.convertToAvro(ConvertionHelper.convert(newMetadata));
tcomp_properties.setValue("main.schema", schema);
}
}
};
};
currentItem.setName(DB_INPUT);
currentItem.setComponent(dbComponent);
((MultipleGenricComponentManager) multipleComponentManager).addItem(currentItem);
} else {
multipleComponentManager = new MultipleComponentManager(DB_INPUT, CONTEXT_LOAD);
currentItem = multipleComponentManager.addItem(DB_INPUT, dbComponent);
}
currentItem.getOutputConnections().add(multiCompConnection);
currentItem = multipleComponentManager.addItem(CONTEXT_LOAD, CONTEXTLOAD_COMPONENT);
}
multipleComponentManager.validateItems();
multipleComponentManagers.add(multipleComponentManager);
createMultipleComponentsParameters();
}
@@ -181,6 +236,11 @@ public class JobContextLoadComponent implements IComponent {
return false;
}
private boolean isTcompv0(IComponent comp) {
return comp != null
&& Optional.ofNullable(IGenericService.getService()).map(s -> s.isTcompv0(comp)).orElse(Boolean.FALSE);
}
/*
* (non-Javadoc)
*
@@ -242,10 +302,10 @@ public class JobContextLoadComponent implements IComponent {
}
protected void createMultipleComponentsParameters() {
final String self = "self."; //$NON-NLS-1$
// create parameters
if ((multipleComponentManagers != null) && (multipleComponentManagers.size() > 0)) {
IMultipleComponentManager multipleComponentManager = multipleComponentManagers.get(0);
final String self = "self" + multipleComponentManager.getParamSeperator(); //$NON-NLS-1$
if (isFile) {
String source = self + EParameterName.IMPLICIT_TCONTEXTLOAD_FILE.getName();
multipleComponentManager.addParam(source, FILE_INPUT_REGEX + ".FILENAME"); //$NON-NLS-1$
@@ -257,84 +317,140 @@ public class JobContextLoadComponent implements IComponent {
multipleComponentManager.addParam(source, FILE_INPUT_REGEX + ".IGNORE_ERROR_MESSAGE"); //$NON-NLS-1$
} else {
String source = self + JobSettingsConstants.getExtraParameterName(EParameterName.URL.getName());
multipleComponentManager.addParam(source, DB_INPUT + ".URL");
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.DRIVER_JAR.getName());
multipleComponentManager.addParam(source, DB_INPUT + ".DRIVER_JAR");
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.DRIVER_CLASS.getName());
multipleComponentManager.addParam(source, DB_INPUT + ".DRIVER_CLASS");
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.HOST.getName());
multipleComponentManager.addParam(source, DB_INPUT + ".HOST"); //$NON-NLS-1$
multipleComponentManager.addParam(source, DB_INPUT + ".SERVER"); //$NON-NLS-1$
multipleComponentManager.addParam(source, DB_INPUT + ".DSN"); //$NON-NLS-1$
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.PORT.getName());
multipleComponentManager.addParam(source, DB_INPUT + ".PORT"); //$NON-NLS-1$
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.DBNAME.getName());
multipleComponentManager.addParam(source, DB_INPUT + ".DBNAME"); //$NON-NLS-1$
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.DB_VERSION.getName());
multipleComponentManager.addParam(source, DB_INPUT + ".DB_VERSION"); //$NON-NLS-1$
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.PROPERTIES.getName());
multipleComponentManager.addParam(source, DB_INPUT + ".PROPERTIES"); //$NON-NLS-1$
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.SCHEMA_DB.getName());
multipleComponentManager.addParam(source, DB_INPUT + ".SCHEMA_DB"); //$NON-NLS-1$
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.USER.getName());
multipleComponentManager.addParam(source, DB_INPUT + ".USER"); //$NON-NLS-1$
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.PASS.getName());
multipleComponentManager.addParam(source, DB_INPUT + ".PASS"); //$NON-NLS-1$
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.DBTABLE.getName());
multipleComponentManager.addParam(source, DB_INPUT + ".DBTABLE"); //$NON-NLS-1$
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.DB_TYPE.getName());
multipleComponentManager.addParam(source, DB_INPUT + ".DB_TYPE"); //$NON-NLS-1$
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.CONNECTION_TYPE.getName());
multipleComponentManager.addParam(source, DB_INPUT + ".CONNECTION_TYPE"); //$NON-NLS-1$
source = self + JobSettingsConstants.QUERY;
multipleComponentManager.addParam(source, DB_INPUT + "." + JobSettingsConstants.QUERY); //$NON-NLS-1$
boolean initDefault = true;
if (isTcompv0(component)) {
if ("tJDBCInput".equalsIgnoreCase(dbComponent)) {
initDefault = false;
initTcompv0ParamMapping(self, multipleComponentManager);
} else {
ExceptionHandler.log(this.getClass().getName()
+ ": MultipleComponentsParameters mapping is not prepared for tcompv0 " + dbComponent);
}
}
if (initDefault) {
initDefaultParameterMapping(self, multipleComponentManager);
}
}
// context parameter
final String context = CONTEXT_LOAD + "."; //$NON-NLS-1$
String source = self + EParameterName.LOAD_NEW_VARIABLE.getName();
String target = context + EParameterName.LOAD_NEW_VARIABLE.getName();
multipleComponentManager.addParam(source, target);
source = self + EParameterName.NOT_LOAD_OLD_VARIABLE.getName();
target = context + EParameterName.NOT_LOAD_OLD_VARIABLE.getName();
multipleComponentManager.addParam(source, target);
source = self + EParameterName.PRINT_OPERATIONS.getName();
target = context + EParameterName.PRINT_OPERATIONS.getName();
multipleComponentManager.addParam(source, target);
source = self + EParameterName.DISABLE_ERROR.getName();
target = context + EParameterName.DISABLE_ERROR.getName();
multipleComponentManager.addParam(source, target);
source = self + EParameterName.DISABLE_INFO.getName();
target = context + EParameterName.DISABLE_INFO.getName();
multipleComponentManager.addParam(source, target);
source = self + EParameterName.DISABLE_WARNINGS.getName();
target = context + EParameterName.DISABLE_WARNINGS.getName();
multipleComponentManager.addParam(source, target);
initContextParamMapping(self, multipleComponentManager);
}
}
private void initTcompv0ParamMapping(final String self, IMultipleComponentManager multipleComponentManager) {
final String seperator = multipleComponentManager.getParamSeperator();
String source = self + JobSettingsConstants.getExtraParameterName(EParameterName.URL.getName());
multipleComponentManager.addParam(source, DB_INPUT + seperator + EConnectionParameterName.GENERIC_URL.getDisplayName());
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.DRIVER_JAR.getName());
multipleComponentManager.addParam(source,
DB_INPUT + seperator + EConnectionParameterName.GENERIC_DRIVER_JAR.getDisplayName());
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.DRIVER_CLASS.getName());
multipleComponentManager.addParam(source,
DB_INPUT + seperator + EConnectionParameterName.GENERIC_DRIVER_CLASS.getDisplayName());
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.DBNAME.getName());
multipleComponentManager.addParam(source,
DB_INPUT + seperator + EConnectionParameterName.GENERIC_TABLENAME.getDisplayName()); // $NON-NLS-1$
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.USER.getName());
multipleComponentManager.addParam(source,
DB_INPUT + seperator + EConnectionParameterName.GENERIC_USERNAME.getDisplayName()); // $NON-NLS-1$
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.PASS.getName());
multipleComponentManager.addParam(source,
DB_INPUT + seperator + EConnectionParameterName.GENERIC_PASSWORD.getDisplayName()); // $NON-NLS-1$
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.DBTABLE.getName());
multipleComponentManager.addParam(source,
DB_INPUT + seperator + EConnectionParameterName.GENERIC_TABLENAME.getDisplayName()); // $NON-NLS-1$
source = self + JobSettingsConstants.QUERY;
multipleComponentManager.addParam(source, DB_INPUT + seperator + "sql"); //$NON-NLS-1$
}
private void initContextParamMapping(final String self, IMultipleComponentManager multipleComponentManager) {
// context parameter
final String context = CONTEXT_LOAD + multipleComponentManager.getParamSeperator();
String source = self + EParameterName.LOAD_NEW_VARIABLE.getName();
String target = context + EParameterName.LOAD_NEW_VARIABLE.getName();
multipleComponentManager.addParam(source, target);
source = self + EParameterName.NOT_LOAD_OLD_VARIABLE.getName();
target = context + EParameterName.NOT_LOAD_OLD_VARIABLE.getName();
multipleComponentManager.addParam(source, target);
source = self + EParameterName.PRINT_OPERATIONS.getName();
target = context + EParameterName.PRINT_OPERATIONS.getName();
multipleComponentManager.addParam(source, target);
source = self + EParameterName.DISABLE_ERROR.getName();
target = context + EParameterName.DISABLE_ERROR.getName();
multipleComponentManager.addParam(source, target);
source = self + EParameterName.DISABLE_INFO.getName();
target = context + EParameterName.DISABLE_INFO.getName();
multipleComponentManager.addParam(source, target);
source = self + EParameterName.DISABLE_WARNINGS.getName();
target = context + EParameterName.DISABLE_WARNINGS.getName();
multipleComponentManager.addParam(source, target);
}
private void initDefaultParameterMapping(final String self, IMultipleComponentManager multipleComponentManager) {
String source = self + JobSettingsConstants.getExtraParameterName(EParameterName.URL.getName());
multipleComponentManager.addParam(source, DB_INPUT + ".URL");
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.DRIVER_JAR.getName());
multipleComponentManager.addParam(source, DB_INPUT + ".DRIVER_JAR");
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.DRIVER_CLASS.getName());
multipleComponentManager.addParam(source, DB_INPUT + ".DRIVER_CLASS");
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.HOST.getName());
multipleComponentManager.addParam(source, DB_INPUT + ".HOST"); //$NON-NLS-1$
multipleComponentManager.addParam(source, DB_INPUT + ".SERVER"); //$NON-NLS-1$
multipleComponentManager.addParam(source, DB_INPUT + ".DSN"); //$NON-NLS-1$
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.PORT.getName());
multipleComponentManager.addParam(source, DB_INPUT + ".PORT"); //$NON-NLS-1$
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.DBNAME.getName());
multipleComponentManager.addParam(source, DB_INPUT + ".DBNAME"); //$NON-NLS-1$
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.DB_VERSION.getName());
multipleComponentManager.addParam(source, DB_INPUT + ".DB_VERSION"); //$NON-NLS-1$
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.PROPERTIES.getName());
multipleComponentManager.addParam(source, DB_INPUT + ".PROPERTIES"); //$NON-NLS-1$
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.SCHEMA_DB.getName());
multipleComponentManager.addParam(source, DB_INPUT + ".SCHEMA_DB"); //$NON-NLS-1$
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.USER.getName());
multipleComponentManager.addParam(source, DB_INPUT + ".USER"); //$NON-NLS-1$
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.PASS.getName());
multipleComponentManager.addParam(source, DB_INPUT + ".PASS"); //$NON-NLS-1$
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.DBTABLE.getName());
multipleComponentManager.addParam(source, DB_INPUT + ".DBTABLE"); //$NON-NLS-1$
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.DB_TYPE.getName());
multipleComponentManager.addParam(source, DB_INPUT + ".DB_TYPE"); //$NON-NLS-1$
source = self + JobSettingsConstants.getExtraParameterName(EParameterName.CONNECTION_TYPE.getName());
multipleComponentManager.addParam(source, DB_INPUT + ".CONNECTION_TYPE"); //$NON-NLS-1$
source = self + JobSettingsConstants.QUERY;
multipleComponentManager.addParam(source, DB_INPUT + "." + JobSettingsConstants.QUERY); //$NON-NLS-1$
}
@Override
public List<? extends IElementParameter> createElementParameters(INode node) {
@@ -380,8 +496,17 @@ public class JobContextLoadComponent implements IComponent {
IElementParameter newParam = new ElementParameter(node);
newParam.setName(JobSettingsConstants.getExtraParameterName(EParameterName.DRIVER_JAR.getName()));
newParam.setFieldType(EParameterFieldType.TABLE);
newParam.setListItemsDisplayName(new String[] { EmfComponent.TEXT_BUILTIN, EmfComponent.TEXT_REPOSITORY });
newParam.setListItemsDisplayCodeName(new String[] { EmfComponent.BUILTIN, EmfComponent.REPOSITORY });
if (isTcompv0(component)) {
/**
* seems that tcompv0 will check the list using the display name when generating codes:
* GenericTableUtils#setTableValues
*/
newParam.setListItemsDisplayName(new String[0]);
newParam.setListItemsDisplayCodeName(new String[0]);
} else {
newParam.setListItemsDisplayName(new String[] { EmfComponent.TEXT_BUILTIN, EmfComponent.TEXT_REPOSITORY });
newParam.setListItemsDisplayCodeName(new String[] { EmfComponent.BUILTIN, EmfComponent.REPOSITORY });
}
elemParamList.add(newParam);
newParam = new ElementParameter(node);

View File

@@ -928,7 +928,7 @@ public class JobSettingsManager {
return Collections.emptyList();
}
IComponent tContextLoadComponent = new JobContextLoadComponent(fileFlag, dbInput);
IComponent tContextLoadComponent = new JobContextLoadComponent(fileFlag, dbInput, process.getComponentsType());
final String uniqueName = "Implicit_Context"; //$NON-NLS-1$
DataNode tContextLoadNode = new DataNode(tContextLoadComponent, uniqueName);
@@ -1023,7 +1023,8 @@ public class JobSettingsManager {
String dbType = getDatabaseTypeFromParameter(process);
if (dbType != null) {
// TDI-18161:the SQL script's syntax is not right because of the implicit context of General JDBC.
if (dbType.equals(EDatabaseTypeName.GENERAL_JDBC.getDisplayName())) {
if (dbType.equals(EDatabaseTypeName.GENERAL_JDBC.getDisplayName())
|| dbType.equals(EDatabaseTypeName.GENERAL_JDBC.getProduct())) {
dbType = findRealDbTypeForJDBC(process, dbType);
}

View File

@@ -36,7 +36,6 @@ import org.talend.commons.exception.SystemException;
import org.talend.commons.ui.runtime.exception.MessageBoxExceptionHandler;
import org.talend.core.model.process.IContext;
import org.talend.core.model.process.IProcess;
import org.talend.core.model.process.IProcess2;
import org.talend.core.model.process.ITargetExecutionConfig;
import org.talend.core.model.runprocess.IEclipseProcessor;
import org.talend.core.runtime.process.TalendProcessArgumentConstant;
@@ -44,7 +43,6 @@ import org.talend.core.runtime.process.TalendProcessOptionConstants;
import org.talend.designer.codegen.ICodeGenerator;
import org.talend.designer.core.ISyntaxCheckableEditor;
import org.talend.designer.core.i18n.Messages;
import org.talend.designer.maven.model.MavenSystemFolders;
import org.talend.designer.runprocess.IProcessMessageManager;
import org.talend.designer.runprocess.IProcessor;
import org.talend.designer.runprocess.ProcessorException;
@@ -361,11 +359,7 @@ public abstract class Processor implements IProcessor, IEclipseProcessor, Talend
protected Process exec(String[] cmd, String path) throws ProcessorException {
try {
if (path == null || !new File(path).exists()) {
if (getSpecialWorkingDir() != null) {
return Runtime.getRuntime().exec(cmd, null, getSpecialWorkingDir());
} else {
return Runtime.getRuntime().exec(cmd);
}
return Runtime.getRuntime().exec(cmd);
} else {
return Runtime.getRuntime().exec(cmd, null, new File(path));
}
@@ -374,23 +368,6 @@ public abstract class Processor implements IProcessor, IEclipseProcessor, Talend
}
}
/**
* (TUP-20459)For a job which dependencies resources need set the working dir DOC jding
* Comment method "getSpecialWorkingDir".
*
* @return
*/
private File getSpecialWorkingDir() {
if (!(process instanceof IProcess2)) {
return null;
}
File workingDir = project.getFile(MavenSystemFolders.EXT_RESOURCES.getPath()).getLocation().toFile();
if (workingDir.exists()) {
return workingDir;
}
return null;
}
public static Thread createProdConsThread(final InputStream input, final boolean isError, final int bufferSize,
final StringBuffer out, final StringBuffer err) {
Thread thread = new Thread() {
@@ -452,6 +429,8 @@ public abstract class Processor implements IProcessor, IEclipseProcessor, Talend
*/
@Override
public String getInterpreter() throws ProcessorException {
if (this.isLinuxTargetPlatform())
return "java";
return interpreter;
}
@@ -797,6 +776,13 @@ public abstract class Processor implements IProcessor, IEclipseProcessor, Talend
}
return false;
}
protected boolean isLinuxTargetPlatform() {
if (targetPlatform != null && Platform.OS_LINUX.equals(targetPlatform.toLowerCase())) {
return true;
}
return false;
}
public boolean shouldRunAsExport() {
return false; // by default, for standard job, run in .Java project

View File

@@ -313,9 +313,11 @@ public class GEFPasteAction extends SelectionAction {
(org.talend.designer.core.ui.editor.process.Process) editor.getProcess(), gefPoint);
mpc.setSelectedSubjobs(subjobParts);
mpc.setSelectedExpandedJoblet(expandedJobletNodes);
mpc.setCheckNodeExist(false);
execute(mpc);
} else if (nodeParts.size() != 0) {
NodesPasteCommand cmd = new NodesPasteCommand(nodeParts, editor.getProcess(), gefPoint);
cmd.setCheckNodeExist(false);
cmd.setSelectedSubjobs(subjobParts);
cmd.setSelectedExpandedJoblet(expandedJobletNodes);
execute(cmd);

View File

@@ -607,7 +607,7 @@ public final class TalendEditorPaletteFactory {
while (iter.hasNext()) {
IComponent xmlComponent = iter.next();
Matcher matcher = pattern.matcher(xmlComponent.getName().toLowerCase());
Matcher matcher = pattern.matcher(xmlComponent.getDisplayName().toLowerCase());
if (matcher.find()) {
resultByName.add(new ComponentHit(xmlComponent, matcher.start()));
continue;
@@ -643,7 +643,7 @@ public final class TalendEditorPaletteFactory {
private static void addDelegateComponents(IComponentsFactory compFac, Collection<IComponent> componentSet,
String lowerCasedKeyword) {
if (GlobalServiceRegister.getDefault().isServiceRegistered(IUnifiedComponentService.class)) {
IUnifiedComponentService service = (IUnifiedComponentService) GlobalServiceRegister.getDefault().getService(
IUnifiedComponentService service = GlobalServiceRegister.getDefault().getService(
IUnifiedComponentService.class);
service.filterUnifiedComponentForPalette(compFac, componentSet, lowerCasedKeyword);
@@ -730,13 +730,12 @@ public final class TalendEditorPaletteFactory {
return null;
}
IComponent delegateComponent = UnifiedComponentUtil.getDelegateComponent(component);
String name = component.getName();
String filter = null;
if (delegateComponent != component) {
// emf component name
filter = component.getName();
name = UnifiedComponentUtil.getComponentDisplayNameForPalette(delegateComponent, filter);
}
String name = UnifiedComponentUtil.getComponentDisplayNameForPalette(delegateComponent, filter);
ImageDescriptor imageSmall = delegateComponent.getIcon16();
IPreferenceStore store = DesignerPlugin.getDefault().getPreferenceStore();
ImageDescriptor imageLarge;

View File

@@ -19,15 +19,21 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor;
import org.eclipse.jdt.internal.ui.javaeditor.JavaSourceViewer;
import org.eclipse.jdt.internal.ui.text.JavaCompositeReconcilingStrategy;
import org.eclipse.jdt.internal.ui.text.JavaReconciler;
import org.eclipse.jdt.ui.actions.IJavaEditorActionDefinitionIds;
import org.eclipse.jdt.ui.text.IJavaPartitions;
import org.eclipse.jdt.ui.text.JavaSourceViewerConfiguration;
import org.eclipse.jdt.ui.text.JavaTextTools;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.FindReplaceDocumentAdapter;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.Region;
import org.eclipse.jface.text.source.IOverviewRuler;
import org.eclipse.jface.text.source.ISourceViewer;
import org.eclipse.jface.text.source.IVerticalRuler;
import org.eclipse.jface.text.source.SourceViewerConfiguration;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.part.FileEditorInput;
import org.talend.commons.exception.SystemException;
@@ -297,5 +303,41 @@ public class TalendJavaEditor extends CompilationUnitEditor implements ISyntaxCh
super.initializeDragAndDrop(viewer);
}
/*
* (non-Javadoc)
*
* @see org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor#createJavaSourceViewer(org.eclipse.swt.widgets.
* Composite, org.eclipse.jface.text.source.IVerticalRuler, org.eclipse.jface.text.source.IOverviewRuler, boolean,
* int, org.eclipse.jface.preference.IPreferenceStore)
*/
@Override
protected ISourceViewer createJavaSourceViewer(Composite parent, IVerticalRuler verticalRuler, IOverviewRuler overviewRuler,
boolean isOverviewRulerVisible, int styles, IPreferenceStore store) {
return new TalendAdaptedSourceViewer(parent, verticalRuler, overviewRuler, isOverviewRulerVisible, styles, store);
}
@SuppressWarnings("restriction")
protected class TalendAdaptedSourceViewer extends AdaptedSourceViewer {
public TalendAdaptedSourceViewer(Composite parent, IVerticalRuler verticalRuler, IOverviewRuler overviewRuler,
boolean showAnnotationsOverview, int styles, IPreferenceStore store) {
super(parent, verticalRuler, overviewRuler, showAnnotationsOverview, styles, store);
}
@Override
public void configure(SourceViewerConfiguration configuration) {
super.configure(configuration);
if (fReconciler == null) {
JavaCompositeReconcilingStrategy strategy = new JavaCompositeReconcilingStrategy(this, TalendJavaEditor.this,
configuration.getConfiguredDocumentPartitioning(this));
JavaReconciler reconciler = new JavaReconciler(TalendJavaEditor.this, strategy, false);
reconciler.setIsAllowedToModifyDocument(false);
reconciler.setDelay(500);
fReconciler = reconciler;
fReconciler.install(this);
}
}
}
}

View File

@@ -12,11 +12,15 @@
// ============================================================================
package org.talend.designer.core.ui.editor.cmd;
import org.apache.commons.lang3.StringUtils;
import org.eclipse.gef.commands.Command;
import org.talend.core.model.process.IConnection;
import org.talend.core.model.process.IConnectionCategory;
import org.talend.core.model.process.IElementParameter;
import org.talend.core.model.process.IExternalNode;
import org.talend.core.model.process.INode;
import org.talend.core.model.utils.ContextParameterUtils;
import org.talend.core.model.utils.TalendTextUtils;
import org.talend.designer.core.i18n.Messages;
import org.talend.designer.core.model.components.EParameterName;
import org.talend.designer.core.ui.editor.process.Process;
@@ -91,6 +95,8 @@ public class ChangeConnTextCommand extends Command {
UpgradeElementHelper.renameData(connection.getTarget(), oldName, newName);
((Process) connection.getSource().getProcess()).checkProcess();
updateELTElementParameter(connection.getSource(), newName);
}
@Override
@@ -128,4 +134,52 @@ public class ChangeConnTextCommand extends Command {
((Process) connection.getSource().getProcess()).checkProcess();
}
public void updateELTElementParameter(INode iNode, String newName) {
// TUP-29072 Solution :if link name equals the schema.tablename,when edit on the link,should update the default
// schema/default table in the input component , then the table name will updated automatically in the sql.The
// solution will only work for simple cases. For complex case with java code and global map in link/default
// schema/default table , it won't work.
if (iNode != null && iNode.isELTComponent()) {
boolean update = false;
String defaultSchemaName = null;
String defaultTableName = null;
if (StringUtils.isNotBlank(newName)) {
String newNameTemp = newName;
int newNameLength = newNameTemp.length();
// Name cases:context.a.context.b /context.a.b /a.context.b /a.b /b
if (ContextParameterUtils.isContainContextParam(newNameTemp)) {
if (newNameTemp.startsWith(ContextParameterUtils.JAVA_NEW_CONTEXT_PREFIX)) {
int index = newNameTemp.indexOf(".", //$NON-NLS-1$
ContextParameterUtils.JAVA_NEW_CONTEXT_PREFIX.length());
defaultSchemaName = newNameTemp.substring(0, index);
defaultTableName = newNameTemp.substring(index + 1, newNameLength);
update = true;
} else {
int index = newNameTemp.indexOf(".");//$NON-NLS-1$
defaultSchemaName = newNameTemp.substring(0, index);
defaultTableName = newNameTemp.substring(index + 1, newNameLength);
update = true;
}
} else {
String[] names = newNameTemp.split("\\.");//$NON-NLS-1$
if (names.length == 2) {
defaultSchemaName = names[0];
defaultTableName = names[1];
update = true;
}
}
}
if (update) {
IElementParameter schemaParam = iNode.getElementParameter("ELT_SCHEMA_NAME");//$NON-NLS-1$
IElementParameter tableParam = iNode.getElementParameter("ELT_TABLE_NAME"); //$NON-NLS-1$
if (schemaParam != null && StringUtils.isNotBlank(defaultSchemaName)) {
schemaParam.setValue(TalendTextUtils.addQuotes(defaultSchemaName));
}
if (tableParam != null && StringUtils.isNotBlank(defaultTableName)) {
tableParam.setValue(TalendTextUtils.addQuotes(defaultTableName));
}
}
}
}
}

View File

@@ -557,11 +557,12 @@ public class ChangeMetadataCommand extends Command {
}
}
MetadataToolHelper.copyTable(newInputMetadata, currentInputMetadata);
currentOutputMetadata.setOriginalColumns(newOutputMetadata.getOriginalColumns());
}
}
if (!currentOutputMetadata.sameMetadataAs(newOutputMetadata, IMetadataColumn.OPTIONS_NONE)) {
if (!currentOutputMetadata.sameMetadataAs(newOutputMetadata, IMetadataColumn.OPTIONS_IGNORE_USED)) {
if (!currentOutputMetadata.sameMetadataAs(newOutputMetadata, IMetadataColumn.OPTIONS_NONE, true)) {
if (!currentOutputMetadata.sameMetadataAs(newOutputMetadata, IMetadataColumn.OPTIONS_IGNORE_USED, true)) {
String type = (String) node.getPropertyValue(EParameterName.SCHEMA_TYPE.getName());
if (type != null && type.equals(EmfComponent.REPOSITORY) && !repositoryMode) {
// for one node has several schema_type,set mode for the current one
@@ -573,6 +574,7 @@ public class ChangeMetadataCommand extends Command {
}
}
MetadataToolHelper.copyTable(newOutputMetadata, currentOutputMetadata);
currentOutputMetadata.setOriginalColumns(newOutputMetadata.getOriginalColumns());
}
if (inputSchemaParam != null
&& inputSchemaParam.getChildParameters().get(EParameterName.SCHEMA_TYPE.getName()) != null
@@ -624,8 +626,10 @@ public class ChangeMetadataCommand extends Command {
setTableMAPPING();
if (!internal) {
updateColumnList(oldOutputMetadata, newOutputMetadata);
((Process) node.getProcess()).checkProcess();
if (!oldOutputMetadata.sameMetadataAs(newOutputMetadata, IMetadataColumn.OPTIONS_NONE)) {
updateColumnList(oldOutputMetadata, newOutputMetadata);
((Process) node.getProcess()).checkProcess();
}
}
refreshMetadataChanged();
}

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