Compare commits

...

22 Commits

Author SHA1 Message Date
Jenkins Continuous Build server
2794802ab6 Set version to 7.1.1 M4 2018-09-25 15:02:47 +02:00
Roman
04c0190688 Rvoievidko/tdi 41085 failed tuj after updating postgre to v10 (#2727)
* fix(TDI-41085): change Postgre version to prior v9
2018-09-25 13:12:13 +03:00
Yu
fb98946610 feat(TBD-7591) Add job name & tags for qubole hive components (#2715)
Adding more detailed information like job name, tags etc. for qubole hive job.
Components included:
    tHiveInput
    tHiveRow
2018-09-25 10:32:26 +02:00
wang wei
39f004bed9 fix(TDI-40720): support tSAPHanaConnection work with tELTMap (#2729) 2018-09-25 14:55:20 +08:00
wang wei
ab14f088a9 fix(TDI-40790): improve the s3 get performance and retry way (#2728) 2018-09-25 14:02:51 +08:00
Stéphane Bouchet
d9936600da fix(TESB-23560) : display correct url in console for ESB implementations (#2726) 2018-09-24 16:15:41 +02:00
Ivan Gonchar
828d04212a fix(TCOMP-1078): fix guess schema button visibility (#2725) 2018-09-24 16:11:54 +03:00
Anas KHABALI
3105881419 TCOMP-1063 : integrate Record API from tacokit to the studio (#2709) 2018-09-21 18:02:20 +02:00
Dmytro Sylaiev
5a588a024f fix(TDI-41043): SFTP tFTPFileList full file info fix (#2723) 2018-09-21 17:16:40 +03:00
Nicolas Rousseau
69b40cb2bd feat(TUP-20636) fix duplicate uri 2018-09-21 13:25:29 +08:00
Romain Manni-Bucau
7f68ae0662 guess schema now uses json in tacokit (#2720)
* TCOMP-1071 healthcheck button text

* ensure guess schema uses the new tacokit parsing format

* upgrading tacokit
2018-09-20 17:37:55 +02:00
Emmanuel GALLOIS
f5232f79e2 fix(TDI-40875): cast as Object for primitive boxing (#2721) 2018-09-20 16:29:29 +02:00
qiongli
20989e1a22 feat(TDQ-15611) Add tDataShuffling to this migration (#2694) 2018-09-20 17:46:00 +08:00
Dmytro Sylaiev
84c778d7d0 Dsylaiev/tdi 37336 add error message when context value set to null (#2716)
* fix(TDI-37336): Add error message for setting null context value

* fix(TDI-37336): Add same changes for Date conversion

* fix(TDI-37336): Add logger message support

* fix(TDI-37336): Unite 2 messages in one

* Use common string format to warning messages
2018-09-20 12:13:32 +03:00
Dmytro Sylaiev
b7ab10293e fix(TDI-40963): Disable codegen for unused socks proxy (#2719) 2018-09-20 12:00:45 +03:00
Roman
520f904dcf Rvoievidko/tdi 40953 support my sql 8 (#2669)
* feat(TDI-40953): upgrade Connection and Output cmpnts

* feat(TDI-40953): upgrade Input component

* feat(TDI-40953): upgrade rest of MySQL components

* feat(TDI-40953): change template for MySQL

* feat(TDI-40953): add logic to choose class for driver

* feat(TDI-40953): change default version of DB

* feat(TDI-40953): update condition for MySQL_8

* feat(TDI-40953): update MySQL to v8 in tCreateTable

* feat(TDI-40953): upgdate tMySQLConnection component

* feat(TDI-40953): upgdate tCreateTable component

* feat(TDI-40953): upgdate MySQLBulk component

* feat(TDI-40953): upgdate MySQLSCD component

* feat(TDI-40953): add else if

* feat(TDI-40953): fix process missing

* feat(TDI-40953): fix ELT

* feat(TDI-40953): rename connection to connectionMySQL to avoid collision
2018-09-20 11:09:08 +03:00
Roman
ffab5918e7 Rvoievidko/tdi 40954 support postgres 10 (#2677)
* feat(TDI-40954): postgresql family supports v10 db

* feat(TDI-40954): postgresPLUS family supports v10 db

* feat(TDI-40954): tCreateTable supports postgre v10 db

* feat(TDI-40954): change DB version by default
2018-09-20 10:37:09 +03:00
Dmytro Sylaiev
33e40904dd fix(TDI-40965): Fix compile error in tFTPPut (#2676) 2018-09-20 10:18:52 +03:00
Anas KHABALI
8726904c7e TCOMP-991 : fix condition creation for activeif in the studio (#2713)
* TCOMP-991 : fix condition creation for activeif in the studio
* TCOMP-991 : activation conditions, handle widget context
* remove AbsolutePathResolver duplication. use the one from component-form-core
2018-09-19 17:22:20 +02:00
Denis Sergent
276d3cd6d8 TESB-23382 Managing JSON API storage for TDM use (#2714)
* TESB-22605 Moving OAS tools from teb projects to tdi projects

* Revert "TESB-22605 Moving OAS tools from teb projects to tdi projects"

This reverts commit 54c66c5a09.

* TESB-22605 Moving OAS tools from tesb projects to tdi projects

* TESB-22605 Add node as context parameter for REST component mgmt

Current process node is added to existing context map in order to manage
REST components parameters update from API.

* TESB-23369 OAS Validation messages management

* DS metadata node (#2615)

* fix(TBD-7296): Fix duplicate variable

* TCOMP-903 : remove unused attributes (#2503)

* fix(TUP-20140)Checked status of items listed in Project Settings (#2504)

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

* TESB-22605 Moving OAS tools from tesb projects to tdi projects

* fix(TUP-20385)Run job with using dynamic tRunJob throw compile error (#2498)

* fix(TUP-20385)Run job with using dynamic tRunJob throw compile error
https://jira.talendforge.org/browse/TUP-20385

* required would be ok

* TUP-20433 - tHMap throw npe when connect to output but haven't config it (#2505)

* fix(TUP-20091):teltmssqlmap: show alias for columns from a middle table. (#2473)

* fix(TUP-20091):teltmssqlmap: show alias for columns from a middle table.

* fix(TUP-20091):teltmssqlmap: show alias for columns from a middle table.

* fix(TUP-20364):Audit can't set database "H2 Local","H2 Remote" when (#2489)

studio logon on git remote mode.

* feat(TDI-38814): tCreateTable support snowflake (#2475)

* feat(TDI-40559): Fix appName parameter in jdbc url (#2397)

* Add Commandline test product (#2242)

* Add Commandline test product

* feat(TUP-20037):update version

* fix(TUP-20438) fix export with war for tdm (#2506)

* fix(TUP-20361):the report path is not correct. (#2491)

* fix(TUP-20361):the report path is not correct.

* fix(TUP-20361):show full name of the report file on message dialog.

* kjwang/feat(TUP-20080)Create migration task for all modificatios of (#2465)

kjwang/feat(TUP-20080)Create migration task for all modificatios of  talend.project.

* fix(TBD7343): fix variable name (#2512)

* Fix Qubole cluster label for Hive components (#2513)

Previously set the cluster label is not taken into consideration, part of modifications is done in qubole spark batch commit 4597627b2b

* fix(TDI-32435): VerticaBulkExec codegen error (#2493)

* fix(TDI-32435): VerticaBulkExec codegen error

* Avoid ArrayIndexOfBoundsException when schema is empty

* fix(TDI-32435): Add null-check

* fix(TDI-32435): Init string with null instead of empty String

* fix(TDI-32435): Throw runtime exception if schema is empty

* Use StringBuilder to build result String

* TUP-20427 : integrate maxBatchSize from component model (#2507)

Fix guess schema (force maxbatchSize to 1) and handle null values
Fix multischema connector creation

* fix(TDQ-15455): using getUniqueName().indexOf("tRecordMatching")>-1 insdead of getComponent().getName().equals("tRecordMatching") to judge the component is tRecordMatching or not (#2508)

* Revert "fix(TDI-36144):SCD deactivates for type 2 records even if an inserting record is rejected(#2425)" (#2517)

This reverts commit 10826518c8.

* fix(TDI-40467):New icon for tDB components. (#2518)

* fix(TUP-20391): Migration tasks are re-executed and encrypting passwords (#2519)

fix(TUP-20391): Migration tasks are re-executed and encrypting passwords
https://jira.talendforge.org/browse/TUP-20391

* fix(TDI-40760): Error Connecting Aurora database using existing connection (#2523)

* fix(TDI-40757): Fix Job compilation error related to tJMSInput component (#2525)

* TUP-20448 exception show in error log when i export a job contain (#2516)

connection then import it again
https://jira.talendforge.org/browse/TUP-20448

* fix(TDI-40722):Upgrade xstream.jar to avoid CVE-2017-7957 issue (#2524)

* fix(TDI-40722):Upgrade xstream.jar to avoid CVE-2017-7957 issue

* fix(TDI-40722):correct the mvn path

* TMDM-11319 MDM components should not displayed using DI license. (#2521)

Move mdm components and mdm trigger resource and  related config from localprovider to mdm plugin.

* Remove unnecessary com.sun import (#2526)

* TUP-20332:Change new branding images for 7.1 (#2514)

* chore: bump tacokit version to 1.0.3 (#2527)

* fix(TDI-40757): fix the tjmsoutput (#2528)

* fix(TCOMP-921): boolean fields in tables (#2530)

* Convert Object to boolean for CheckElementParameter on update

* fix(TUP-20463) add tacokit lib repository to job run scripts (#2529)

* fix(TDI-40760): add more condition to fix the stats and logs issue (#2531)

* Fix/tbd 7269 winutils problem (#2520)

* TBD-7269: fix

* mvn uri fix

* review fix

* fix(TESB-22628): fixed NPE during test execution (#2474)

* TCOMP-918 : use component-studio pom to handle some dependencies versions (#2532)

* fix(TUP-20411):Adding context environment in the reference project, they (#2522)

do not get updated in the main project.

* fix(TUP-20425): Cannot load BD node after logging on DI project (#2533)

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

* TDI-39567 improve performance in log4j code (#1655)

* Igonchar/tcomp 859 (#2538)

* fix(TCOMP-859) use the same AbsolutePathResolver implementation as in component-form-core

* fix(TCOMP-859): remove old path resolution implementation

* fix(TCOMP-859): move all parameter resolvers to ...parameter.resolver package

* fix(TCOMP-859): implement resolveParameters() method

* fix(TCOMP-859): fix multiple root handling and multiple parameters based on the same ElementParameter

* fix(TCOMP-859): remove unused method

* fix(TCOMP-859): fix javadoc in AbsolutePathResolver

* Igonchar/tcomp 934 (#2539)

* fix(TCOMP-934): remove unused fields in ComponentModel

* fix(TCOMP-934): ensure palette value uses only categories

*  feat(TDI-39599): rename ELT JDBC components (#2535)

* fix(TUP-20492):When doing extract as context for a tsalesforceinput, (#2544)

* fix(TUP-20492):When doing extract as context for a tsalesforceinput,
getting "UNEXPECTED_EXCEPTION" upon selecting the same connection
created.

* fix(TUP-20492):When doing extract as context for a tsalesforceinput,
getting "UNEXPECTED_EXCEPTION" upon selecting the same connection
created.

* fix(TDI-39567): add tabs / improve code redability (#2546)

* TUP-20332:Change new branding images for 7.1 (#2550)

* fix(TDI-40729): tCreateTable spelling error (#2547)

* Fix spelling error in messages

* TUP-20482 : active if with new legth strategy for comparing values. (#2548)

This work still having issue with Tables

* TMC-13491 [TIC to TMC] Remove flow builder and actions (#2553)

* feat(TDI-40574): tSnowflakeOB and tSnowflakeBE (#2537)

* registered new components in unifier

* fix(TDI-40815): Compilation issue with tSalesforceOutput component with reject link(#2557)

* all tcomp v0 components with muilt reject should have same issue.

* fix(TUP-20507):File format should be Unix. (#2551)

* fix(TDI-40722):remove xstream1.2.2 in bonita component. (#2549)

* fix(TDI-40722):remove xstream1.2.2 in bonita component.

* fix(TDI-40722):Eliminate xstream.jar from production.

* fix(TCOMP-961): set default value to SuggestionsAction parameters (#2559)

* fix(TESB-22825): Avoid to generate standalone pom for service provider (#2560)

* fix(TDI-40806): tS3Copy Component does not allow large file (like 8GB) copy from one bucket to another (#2562)

* fix(TESB-22826): Handling of cMessagingEndpoint additional libraries in OSGI. (#2561)

Additional libraries defined for CMessagingEndpoint components can be set as part of the bundle classpath, i.e. physically included, or as OSGi dependency. This fix ensures that these libraries are no longer physically included if not set as part of the bundle classpath.

* TESB-22605 DS Metadata node first impl. (under construction)

* fix(TCOMP-1047): make Text control in Suggestable editable (#2673)

* fix(TDI-40994): SnowflakeInput incorrect date (#2668)

* Fix Date conversion in IncomingSchemaEnforcer

* Fix tests

* Bump talend-codegen-utils lib version

* fix(TDI-40963): Hide socks proxy properties when use existing connection (#2675)

* fix(TESB-23376):Runtime cannot install REST artifact because redundant (#2679)

'-bundle' in features

* fix(TBD-7678): Migrate tMatchModel (#2682)

* feat(TDI-40875): give to writer all incoming columns (#2617)

* feat(TDI-40875): give to writer all incoming columns even if there're not in the component's schema.
* feat(TDI-40875): add incoming node columns for creating new RT schema

* feat(TESB-23431): add REST endpoint url when deploying

* Add Link to API Tester in console for tRESTRequests components

* feat(TESB-23431): add REST endpoint url when deploying

* Merges

* TESB-23382 Update extension point for OAS decoder

* TESB-23382 Managing JSON API storage for TDM use

* Merge branch 'master' of git@github.com:Talend/tdi-studio-se.git into
talend/TESB-22605_DS_metadata_node

Conflicts:
	main/plugins/org.talend.designer.oas/src/org/talend/designer/oas/external/IOASDecoder.java
2018-09-19 15:48:07 +02:00
Ivan Gonchar
332853c5c8 Igonchar/tcomp 1039 tests (#2710)
* fix(TCOMP-1039): move classes related to Update feature to corresponding packages

* fix(TCOMP-1039): reduce UpdateCommand class visibility

* feat(TCOMP-1039): implement UpdateCommand unit-tests

* fix(TCOMP-1039): fix non string value for TextElementParameter

* feat(TCOMP-1039): add test for TableElementParameter.setValueFromAction() method

* fix(TCOMP-1039): fix UpdateCommand to update nested configuration correctly

* feat(TCOMP-1039): add UpdateResolver test
2018-09-18 15:57:47 +02:00
Emmanuel GALLOIS
feeea8220a feat(TDI-40875): bumped codegen-utils to 0.25.3 (#2712) 2018-09-18 11:56:03 +02:00
275 changed files with 1477 additions and 606 deletions

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>7.1.1-SNAPSHOT</version>
<version>7.1.1-M4</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.1.1-SNAPSHOT</version>
<version>7.1.1-M4</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.1.1-SNAPSHOT</version>
<version>7.1.1-M4</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.1.1-SNAPSHOT</version>
<version>7.1.1-M4</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.1.1-SNAPSHOT</version>
<version>7.1.1-M4</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.1.1-SNAPSHOT</version>
<version>7.1.1-M4</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.1.1-SNAPSHOT</version>
<version>7.1.1-M4</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.1.1-SNAPSHOT</version>
<version>7.1.1-M4</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.1.1-SNAPSHOT</version>
<version>7.1.1-M4</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.1.1-SNAPSHOT</version>
<version>7.1.1-M4</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.1.1-SNAPSHOT</version>
<version>7.1.1-M4</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.1.1-SNAPSHOT</version>
<version>7.1.1-M4</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.1.1-SNAPSHOT</version>
<version>7.1.1-M4</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.1.1-SNAPSHOT</version>
<version>7.1.1-M4</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.runprocess.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tdi-studio-se</artifactId>
<version>7.1.1-SNAPSHOT</version>
<version>7.1.1-M4</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.1.1-SNAPSHOT</version>
<version>7.1.1-M4</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.1.1-SNAPSHOT</version>
<version>7.1.1-M4</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.1.1-SNAPSHOT</version>
<version>7.1.1-M4</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.1.1-SNAPSHOT</version>
<version>7.1.1-M4</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.1.1-SNAPSHOT</version>
<version>7.1.1-M4</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.1.1-SNAPSHOT</version>
<version>7.1.1-M4</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.1.1-SNAPSHOT</version>
<version>7.1.1-M4</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.1.1-SNAPSHOT</version>
<version>7.1.1-M4</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.1.1-SNAPSHOT</version>
<version>7.1.1-M4</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.1.1-SNAPSHOT</version>
<version>7.1.1-M4</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.1.1-SNAPSHOT</version>
<version>7.1.1-M4</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.1.1-SNAPSHOT</version>
<version>7.1.1-M4</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.1.1-SNAPSHOT</version>
<version>7.1.1-M4</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.1.1-SNAPSHOT</version>
<version>7.1.1-M4</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.1.1-SNAPSHOT</version>
<version>7.1.1-M4</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.1.1-SNAPSHOT</version>
<version>7.1.1-M4</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.1.1-SNAPSHOT</version>
<version>7.1.1-M4</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.1.1-SNAPSHOT</version>
<version>7.1.1-M4</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.1.1-SNAPSHOT</version>
<version>7.1.1-M4</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.1.1-SNAPSHOT</version>
<version>7.1.1-M4</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.1.1-SNAPSHOT</version>
<version>7.1.1-M4</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.1.1-SNAPSHOT</version>
<version>7.1.1-M4</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.1.1-SNAPSHOT</version>
<version>7.1.1-M4</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.1.1-SNAPSHOT</version>
<version>7.1.1-M4</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.1.1-SNAPSHOT</version>
<version>7.1.1-M4</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.1.1-SNAPSHOT</version>
<version>7.1.1-M4</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.business.diagram</artifactId>

View File

@@ -526,7 +526,9 @@
}
}
<% for (IContextParameter ctxParam :params)
<%
String warningMessageFormat = "Null value will be used for context parameter %s: %s";
for (IContextParameter ctxParam :params)
{
%>
context.setContextType("<%=ctxParam.getName()%>", "<%=ctxParam.getType()%>");
@@ -575,6 +577,17 @@
}catch(ParseException e)
{
<%
if (isLog4jEnabled) {
%>
log.warn(String.format("<%=warningMessageFormat %>", "<%=ctxParam.getName() %>", e.getMessage()));
<%
} else {
%>
System.err.println(String.format("<%=warningMessageFormat %>", "<%=ctxParam.getName() %>", e.getMessage()));
<%
}
%>
context.<%=ctxParam.getName()%>=null;
}
<%
@@ -593,6 +606,17 @@
try{
context.<%=ctxParam.getName()%>=routines.system.ParserUtils.parseTo_<%=typeToGenerate%> (context.getProperty("<%=ctxParam.getName()%>"));
}catch(NumberFormatException e){
<%
if (isLog4jEnabled) {
%>
log.warn(String.format("<%=warningMessageFormat %>", "<%=ctxParam.getName() %>", e.getMessage()));
<%
} else {
%>
System.err.println(String.format("<%=warningMessageFormat %>", "<%=ctxParam.getName() %>", e.getMessage()));
<%
}
%>
context.<%=ctxParam.getName()%>=null;
}
<%

View File

@@ -89,7 +89,7 @@ if(hasInput){
if(!input_columnList.get(i).getTalendType().equals("id_Dynamic")) {
%>
if (incomingEnforcer_<%=cid%>.getDesignSchema().getField("<%=input_columnList.get(i)%>") == null){
incomingEnforcer_<%=cid%>.addIncomingNodeField("<%=input_columnList.get(i)%>", <%=inputConn.getName()%>.<%=input_columnList.get(i)%>.getClass().getCanonicalName());
incomingEnforcer_<%=cid%>.addIncomingNodeField("<%=input_columnList.get(i)%>", ((Object) <%=inputConn.getName()%>.<%=input_columnList.get(i)%>).getClass().getCanonicalName());
shouldCreateRuntimeSchemaForIncomingNode = true;
}
<%

View File

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

View File

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

View File

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

View File

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

View File

@@ -467,7 +467,8 @@
NUM_ROW="50"
REPOSITORY_VALUE="DB_VERSION"
SHOW_IF="(DBTYPE=='MYSQL') and (USE_EXISTING_CONNECTION == 'false')">
<ITEMS DEFAULT="MYSQL_5">
<ITEMS DEFAULT="MYSQL_8">
<ITEM NAME="MYSQL_8" VALUE="MYSQL_8" />
<ITEM NAME="MYSQL_5" VALUE="MYSQL_5" />
<ITEM NAME="MYSQL_4" VALUE="MYSQL_4" />
<ITEM NAME="MARIADB" VALUE="MARIADB" />
@@ -551,7 +552,7 @@
NUM_ROW="50"
REPOSITORY_VALUE="DB_VERSION"
SHOW_IF="((DBTYPE=='POSTGRE') or (DBTYPE=='POSTGREPLUS')) and (USE_EXISTING_CONNECTION == 'false')">
<ITEMS DEFAULT="PRIOR_TO_V9">
<ITEMS DEFAULT="V9_X">
<ITEM NAME="PRIOR_TO_V9" VALUE="PRIOR_TO_V9" />
<ITEM NAME="V9_X" VALUE="V9_X" />
</ITEMS>
@@ -835,6 +836,7 @@
<IMPORT NAME="Driver-MSSQL-prop" MODULE="mssql-jdbc.jar" MVN="mvn:org.talend.libraries/mssql-jdbc/6.0.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND (DBTYPE=='MSSQL') AND (MSSQL_DRIVER=='MSSQL_PROP')" />
<IMPORT NAME="Driver-MYSQL4" MODULE="mysql-connector-java-3.1.14-bin.jar" MVN="mvn:org.talend.libraries/mysql-connector-java-3.1.14-bin/6.0.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') and (DBTYPE=='MYSQL') and (DB_MYSQL_VERSION=='MYSQL_4')"/>
<IMPORT NAME="Driver-MYSQL5" MODULE="mysql-connector-java-5.1.30-bin.jar" MVN="mvn:org.talend.libraries/mysql-connector-java-5.1.30-bin/6.0.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') and (DBTYPE=='MYSQL') and (DB_MYSQL_VERSION=='MYSQL_5')"/>
<IMPORT NAME="Driver-MYSQL8" MODULE="mysql-connector-java-8.0.12.jar" MVN="mvn:mysql/mysql-connector-java/8.0.12" REQUIRED_IF="(DB_MYSQL_VERSION == 'MYSQL_8') AND (USE_EXISTING_CONNECTION == 'false') AND (DBTYPE=='MYSQL')" />
<IMPORT NAME="Driver-MARIADB" MODULE="mariadb-java-client-2.2.1.jar" MVN="mvn:org.mariadb.jdbc/mariadb-java-client/2.2.1" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') and (DBTYPE=='MYSQL') and (DB_MYSQL_VERSION=='MARIADB')" />
<IMPORT NAME="Driver-Oracle8i" MODULE="ojdbc12.jar" MVN="mvn:org.talend.libraries/ojdbc12/6.0.0" REQUIRED_IF="(DBTYPE=='DBORACLE') AND (DB_VERSION == 'ORACLE_8') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="Driver-Oracle9i" MODULE="ojdbc14-9i.jar" MVN="mvn:org.talend.libraries/ojdbc14-9i/6.0.0" REQUIRED_IF="(DBTYPE=='DBORACLE') AND (DB_VERSION == 'ORACLE_9') AND (USE_EXISTING_CONNECTION == 'false')" />
@@ -843,7 +845,7 @@
<IMPORT NAME="Driver-Oracle11g-2" MODULE="ojdbc6.jar" MVN="mvn:org.talend.libraries/ojdbc6/6.0.0" REQUIRED_IF="(DBTYPE=='DBORACLE') AND (DB_VERSION == 'ORACLE_11-6') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="Driver-Oracle12c" MODULE="ojdbc7.jar" MVN="mvn:org.talend.libraries/ojdbc7/6.0.0" REQUIRED_IF="(DBTYPE=='DBORACLE') AND (DB_VERSION == 'ORACLE_12') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="Driver-POSTGRESQL" MODULE="postgresql-8.4-703.jdbc4.jar" MVN="mvn:postgresql/postgresql/8.4-703.jdbc4" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND ((((DBTYPE=='POSTGRE') or (DBTYPE=='POSTGREPLUS')) AND (DB_POSTGRE_VERSION =='PRIOR_TO_V9')) or (DBTYPE=='GREENPLUM'))" />
<IMPORT NAME="Driver-Postgres9" MODULE="postgresql-9.4-1201.jdbc41.jar" MVN="mvn:org.talend.libraries/postgresql-9.4-1201.jdbc41/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.jdbc.postgresql/lib/postgresql-9.4-1201.jdbc41.jar" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND (((DBTYPE=='POSTGRE') or (DBTYPE=='POSTGREPLUS')) AND (DB_POSTGRE_VERSION =='V9_X'))" />
<IMPORT NAME="Driver-Postgres9" MODULE="postgresql-42.2.5.jar" MVN="mvn:org.postgresql/postgresql/42.2.5" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND (((DBTYPE=='POSTGRE') or (DBTYPE=='POSTGREPLUS')) AND (DB_POSTGRE_VERSION =='V9_X'))" />
<IMPORT NAME="Driver-FIREBIRD" MODULE="jaybird-full-2.1.1.jar" MVN="mvn:org.talend.libraries/jaybird-full-2.1.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.jdbc.firebird/lib/jaybird-full-2.1.1.jar" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND (DBTYPE=='FIREBIRD')" />
<IMPORT NAME="Driver-HSQLDb" MODULE="hsqldb.jar" MVN="mvn:org.talend.libraries/hsqldb/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.jdbc.hsql/lib/hsqldb.jar" REQUIRED_IF="DBTYPE=='HSQLDB'"/>
<IMPORT NAME="Driver-INFORMIX-JDBC" MODULE="ifxjdbc.jar" MVN="mvn:org.talend.libraries/ifxjdbc/6.0.0" REQUIRED_IF="(USE_EXISTING_CONNECTION == 'false') AND (DBTYPE=='INFORMIX')" />

View File

@@ -923,10 +923,12 @@ class MysqlManager extends Manager {
}
protected String getDriver() {
if("MARIADB".equals(dbVersion)){
return "org.mariadb.jdbc.Driver";
}else{
return "org.gjt.mm.mysql.Driver";
}
return "org.mariadb.jdbc.Driver";
} else if ("MYSQL_8".equals(dbVersion)){
return "com.mysql.cj.jdbc.Driver";
} else {
return "com.mysql.jdbc.Driver";
}
}
public String getConnectionURL() {
String jdbcURL = "\"jdbc:mysql\"";
@@ -2420,8 +2422,30 @@ if(columnList != null && columnList.size() > 0) {
whetherExist_<%=cid%> = true;
}
<%
} else if("MYSQL".equalsIgnoreCase(dbType)) {
List< ? extends INode> nodes = node.getProcess().getNodesOfType("tMysqlConnection");
String dbnameMySQL = ElementParameterParser.getValue(node, "__DBNAME__");
if (dbnameMySQL == null || "\"\"".equals(dbnameMySQL) || "".equals(dbnameMySQL)) {
String connectionMySQL = ElementParameterParser.getValue(node,"__CONNECTION__");
for (INode ne : nodes) {
if (connectionMySQL.equals(ne.getUniqueName())) {
dbnameMySQL = ElementParameterParser.getValue(ne, "__DBNAME__");
}
}
}
%>
java.sql.DatabaseMetaData dbMetaData_<%=cid%> = conn_<%=cid%>.getMetaData();
java.sql.ResultSet rsTable_<%=cid%> = dbMetaData_<%=cid%>.getTables(<%=dbnameMySQL%>, null, null, new String[]{"TABLE"});
while(rsTable_<%=cid%>.next()) {
String table_<%=cid%> = rsTable_<%=cid%>.getString("TABLE_NAME");
if(table_<%=cid%>.equals<%if(!tableNameCaseSensitive){%>IgnoreCase<%}%>(<%=tableName%>)) {
whetherExist_<%=cid%> = true;
break;
}
}
<%
} else {
%>
%>
java.sql.DatabaseMetaData dbMetaData_<%=cid%> = conn_<%=cid%>.getMetaData();
java.sql.ResultSet rsTable_<%=cid%> = dbMetaData_<%=cid%>.getTables(null, null, null, new String[]{"TABLE"});
while(rsTable_<%=cid%>.next()) {

View File

@@ -101,6 +101,7 @@ DB_AS400_VERSION.ITEM.V6R1_V7R2=V6R1 to V7R2
DB_MYSQL_VERSION.NAME=DB Version
DB_MYSQL_VERSION.ITEM.MYSQL_4=Mysql 4
DB_MYSQL_VERSION.ITEM.MYSQL_5=Mysql 5
DB_MYSQL_VERSION.ITEM.MYSQL_8=Mysql 8
DB_MYSQL_VERSION.ITEM.MARIADB=MariaDB
DB_VERTICA_VERSION.NAME=DB Version
DB_VERTICA_VERSION.ITEM.VERTICA_3=Vertica 3
@@ -116,7 +117,7 @@ DB_VERTICA_VERSION.ITEM.VERTICA_7_1_X=Vertica 7.1.X
DB_POSTGRE_VERSION.NAME=DB Version
DB_POSTGRE_VERSION.ITEM.PRIOR_TO_V9=Prior to v9
DB_POSTGRE_VERSION.ITEM.V9_X=v9.X
DB_POSTGRE_VERSION.ITEM.V9_X=v9 and later
QUERY.NAME=Query
CREATE_TABLE_TYPE.NAME = Create

View File

@@ -83,6 +83,7 @@ CREATE_TABLE_TYPE.ITEM.MULTISET=MULTISET TABLE
DB_MYSQL_VERSION.NAME=DB Version
DB_MYSQL_VERSION.ITEM.MYSQL_4=Mysql 4
DB_MYSQL_VERSION.ITEM.MYSQL_5=Mysql 5
DB_MYSQL_VERSION.ITEM.MYSQL_8=Mysql 8
CONNECTION_TYPE.ITEM.ORACLE_OCI=Oracle OCI
CONNECTION_TYPE.ITEM.ORACLE_WALLET=WALLET
JDBC_URL.NAME=URL
@@ -102,7 +103,7 @@ CASESENSITIVE.NAME=Case Sensitive
DB_VERTICA_VERSION.ITEM.VERTICA_5_1=Vertica 5.1
DB_POSTGRE_VERSION.NAME=DB Version
DB_POSTGRE_VERSION.ITEM.PRIOR_TO_V9=Prior to v9
DB_POSTGRE_VERSION.ITEM.V9_X=v9.X
DB_POSTGRE_VERSION.ITEM.V9_X=v9 and later
DB_VERTICA_VERSION.ITEM.VERTICA_6_1_X=Vertica 6.1.X
DB_VERTICA_VERSION.ITEM.VERTICA_7_0_X=Vertica 7.0.X
DB_VERSION.ITEM.ORACLE_12=Oracle 12-7

View File

@@ -56,7 +56,7 @@
<PARAMETER
NAME="CONNECTION"
FIELD="COMPONENT_LIST"
REQUIRED="true" FILTER="REGEXP:^tJDBCConnection|tSnowflakeConnection$"
REQUIRED="true" FILTER="REGEXP:^tJDBCConnection|tSnowflakeConnection|tSAPHanaConnection$"
NUM_ROW="2"
SHOW_IF="(#LINK@CONNECTOR.OUT.TABLE_REF == '0') AND (USE_EXISTING_CONNECTION == 'true')"
DYNAMIC_SETTINGS="true"/>

View File

@@ -49,7 +49,8 @@
NUM_ROW="1"
REPOSITORY_VALUE="DB_VERSION"
SHOW_IF="(#LINK@CONNECTOR.OUT.TABLE_REF == '0') AND (USE_EXISTING_CONNECTION == 'false')">
<ITEMS DEFAULT="MYSQL_5">
<ITEMS DEFAULT="MYSQL_8">
<ITEM NAME="MYSQL_8" VALUE="MYSQL_8" />
<ITEM NAME="MYSQL_5" VALUE="MYSQL_5" />
<ITEM NAME="MYSQL_4" VALUE="MYSQL_4" />
<ITEM NAME="MARIADB" VALUE="MARIADB" />
@@ -183,6 +184,7 @@
<CODEGENERATION>
<IMPORTS>
<IMPORT NAME="MYSQL_8" MODULE="mysql-connector-java-8.0.12.jar" MVN="mvn:mysql/mysql-connector-java/8.0.12" REQUIRED_IF="(DB_VERSION == 'MYSQL_8') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="MYSQL_5" MODULE="mysql-connector-java-5.1.30-bin.jar" MVN="mvn:org.talend.libraries/mysql-connector-java-5.1.30-bin/6.0.0" REQUIRED_IF="(DB_VERSION == 'MYSQL_5') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="MYSQL_4" MODULE="mysql-connector-java-3.1.14-bin.jar" MVN="mvn:org.talend.libraries/mysql-connector-java-3.1.14-bin/6.0.0" REQUIRED_IF="(DB_VERSION == 'MYSQL_4') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="MARIADB" MODULE="mariadb-java-client-2.2.1.jar" MVN="mvn:org.mariadb.jdbc/mariadb-java-client/2.2.1" REQUIRED_IF="(DB_VERSION == 'MARIADB') AND (USE_EXISTING_CONNECTION == 'false')" />

View File

@@ -45,6 +45,7 @@ LINK_STYLE.ITEM.LINE=Line (fastest)
DB_VERSION.NAME=DB Version
DB_VERSION.ITEM.MYSQL_4=Mysql 4
DB_VERSION.ITEM.MYSQL_5=Mysql 5
DB_VERSION.ITEM.MYSQL_8=Mysql 8
DB_VERSION.ITEM.MARIADB=MariaDB
CONNECTION.NAME=Component List

View File

@@ -39,6 +39,7 @@ LINK_STYLE.ITEM.LINE=Line (fastest)
DB_VERSION.NAME=DB Version
DB_VERSION.ITEM.MYSQL_4=Mysql 4
DB_VERSION.ITEM.MYSQL_5=Mysql 5
DB_VERSION.ITEM.MYSQL_8=Mysql 8
CONNECTION.NAME=Component List
DB_VERSION.ITEM.MARIADB=MariaDB
DBNAME.NAME=Database

View File

@@ -85,11 +85,13 @@ imports="
<%
log4jCodeGenerateUtil.useExistConnection(node);
} else {
String drverClass= "org.gjt.mm.mysql.Driver";
String drverClass= "org.mysql.jdbc.Driver";
String jdbcURL = "jdbc:mysql";
if("MARIADB".equals(dbVersion)){
drverClass = "org.mariadb.jdbc.Driver";
jdbcURL = "jdbc:mariadb";
} else if ("MYSQL_8".equals(dbVersion)) {
drverClass = "com.mysql.cj.jdbc.Driver";
}
%>
String driverClass_<%=cid%> = "<%=drverClass%>";

View File

@@ -92,7 +92,7 @@ skeleton="../templates/db_output_bulk.skeleton"
String conn = "conn_" + connection;
String username = "username_" + connection;
String connectionKey=null;
if(connNode.getComponent().getName().indexOf("tJDBCConnection")<0){
if("tSnowflakeConnection".equals(connNode.getComponent().getName())){
connectionKey=connection+"_Connection";
}else{
connectionKey=conn;

View File

@@ -62,7 +62,7 @@ String passwordFieldName = "";
//The following part support the socks proxy for FTP and SFTP (Socks V4 or V5, they are all OK).
//And it can not work with the FTP proxy directly, only support the socks proxy.
if(useProxy){
if(useProxy && !("true").equals(useExistingConn)){
%>
java.util.Properties props_<%=cid%> = System.getProperties();
props_<%=cid%>.put("socksProxyPort", <%=proxyPort %>);

View File

@@ -64,7 +64,7 @@ String passwordFieldName = "";
//The following part support the socks proxy for FTP and SFTP (Socks V4 or V5, they are all OK).
//And it can not work with the FTP proxy directly, only support the socks proxy.
if (useProxy) {
if (useProxy && !("true").equals(useExistingConn)) {
%>
java.util.Properties props_<%=cid%> = System.getProperties();
props_<%=cid%>.put("socksProxyPort", <%=proxyPort %>);

View File

@@ -79,7 +79,7 @@ if (files.size() == 0) {
//The following part support the socks proxy for FTP, FTPS and SFTP (Socks V4 or V5, they are all OK).
//And it can not work with the FTP proxy directly, only support the socks proxy.
if (useProxy) {
if (useProxy && !("true").equals(useExistingConn)) {
%>
java.util.Properties props_<%=cid%> = System.getProperties();
props_<%=cid%>.put("socksProxyPort", <%=proxyPort %>);
@@ -220,38 +220,60 @@ if (sftp) {// *** sftp *** //
com.jcraft.jsch.ChannelSftp.LsEntry[] sftpFiles_<%=cid %> = vector_<%=cid %>.toArray(new com.jcraft.jsch.ChannelSftp.LsEntry[0]);
int nb_file_<%=cid%> = 0;
List<String> fileListTemp_<%=cid %> = new java.util.ArrayList<String>();
<%
if (dirFull) {
%>
List<String> fullFileInfoList_<%=cid %> = new java.util.ArrayList<String>();
<%
}
%>
for (String filemask_<%=cid %> : maskList_<%=cid %>) {
java.util.regex.Pattern fileNamePattern_<%=cid %> = java.util.regex.Pattern.compile(filemask_<%=cid %>.replaceAll("\\.", "\\\\.").replaceAll("\\*", ".*"));
for (com.jcraft.jsch.ChannelSftp.LsEntry filemaskTemp_<%=cid %> : sftpFiles_<%=cid %>) {
if (fileNamePattern_<%=cid %>.matcher(filemaskTemp_<%=cid %>.getFilename()).matches()) {
fileListTemp_<%=cid %>.add(filemaskTemp_<%=cid %>.getFilename());
}
String fileName_<%=cid %> = filemaskTemp_<%=cid %>.getFilename();
if ((".").equals(fileName_<%=cid %>) || ("..").equals(fileName_<%=cid %>)) {
continue;
}
if (fileNamePattern_<%=cid %>.matcher(fileName_<%=cid %>).matches()) {
<%
if (dirFull) {
%>
fullFileInfoList_<%=cid %>.add(filemaskTemp_<%=cid %>.getLongname());
<%
}
%>
fileListTemp_<%=cid %>.add(fileName_<%=cid %>);
}
}
}
<%if(isLog4jEnabled){%>
log.info("<%=cid%> - Listing files from server.");
<%}%>
for (String sftpFile_<%=cid %> : fileListTemp_<%=cid %>) {
if ((".").equals(sftpFile_<%=cid %>) || ("..").equals(sftpFile_<%=cid %>)) {
continue;
}
String currentFileName_<%=cid%> = sftpFile_<%=cid %>;
String currentFilePath_<%=cid%> = remotedir_<%=cid %>;
if(!remotedir_<%=cid%>.endsWith("/")&&!remotedir_<%=cid%>.endsWith("\\")){
currentFilePath_<%=cid%> += "/";
}
currentFilePath_<%=cid%> += sftpFile_<%=cid %>;
<%if(isLog4jEnabled){%>
log.debug("<%=cid%> - List file : '" + currentFilePath_<%=cid%> + "' .");
<%}%>
globalMap.put("<%=cid %>_CURRENT_FILE", currentFileName_<%=cid%>);
globalMap.put("<%=cid %>_CURRENT_FILEPATH", currentFilePath_<%=cid%>);
nb_file_<%=cid%>++;
for (int counter_<%=cid %> = 0; counter_<%=cid %> < fileListTemp_<%=cid %>.size(); counter_<%=cid %>++) {
String currentFileName_<%=cid%> = fileListTemp_<%=cid %>.get(counter_<%=cid %>);
String currentFilePath_<%=cid%> = remotedir_<%=cid %>;
if(!remotedir_<%=cid%>.endsWith("/")&&!remotedir_<%=cid%>.endsWith("\\")){
currentFilePath_<%=cid%> += "/";
}
currentFilePath_<%=cid%> += currentFileName_<%=cid%>;
<%if(isLog4jEnabled){%>
log.debug("<%=cid%> - List file : '" + currentFilePath_<%=cid%> + "' .");
<%}
if (dirFull) {
%>
globalMap.put("<%=cid %>_CURRENT_FILE", fullFileInfoList_<%=cid %>.get(counter_<%=cid %>));
<%
} else {
%>
globalMap.put("<%=cid %>_CURRENT_FILE", currentFileName_<%=cid%>);
<%
}
%>
globalMap.put("<%=cid %>_CURRENT_FILEPATH", currentFilePath_<%=cid%>);
nb_file_<%=cid%>++;
<%
} else if (ftps) { // *** ftps *** //
if (("false").equals(useExistingConn)) {

View File

@@ -66,7 +66,7 @@ if (("true").equals(useExistingConn)) {
boolean isLog4jEnabled = ("true").equals(ElementParameterParser.getValue(node.getProcess(), "__LOG4J_ACTIVATE__"));
String passwordFieldName = "";
if (useProxy) {
if (useProxy && !("true").equals(useExistingConn)) {
%>
java.util.Properties props_<%=cid%> = System.getProperties();
props_<%=cid%>.put("socksProxyPort", <%=proxyPort %>);

View File

@@ -73,7 +73,7 @@ int nb_file_<%=cid%> = 0;
//The following part support the socks proxy for FTP and SFTP (Socks V4 or V5, they are all OK).
//And it can not work with the FTP proxy directly, only support the socks proxy.
if (useProxy){
if (useProxy && !("true").equals(useExistingConn)){
%>
java.util.Properties props_<%=cid%> = System.getProperties();
props_<%=cid%>.put("socksProxyPort", <%=proxyPort %>);

View File

@@ -67,7 +67,7 @@ if (("true").equals(useExistingConn)) {
//The following part support the socks proxy for FTP and SFTP (Socks V4 or V5, they are all OK).
//And it can not work with the FTP proxy directly, only support the socks proxy.
if (useProxy) {
if (useProxy && !("true").equals(useExistingConn)) {
%>
java.util.Properties props_<%=cid%> = System.getProperties();
props_<%=cid%>.put("socksProxyPort", <%=proxyPort %>);
@@ -282,7 +282,6 @@ if (sftp) { // *** sftp *** //
%>
ftp_<%=cid %> = (com.enterprisedt.net.ftp.FTPClient)globalMap.get("<%=conn %>");
String rootDir_<%=cid %> = ftp_<%=cid %>.pwd();
<%if(isLog4jEnabled){%>
if(ftp_<%=cid %>!=null) {
log.info("<%=cid%> - Uses an existing connection. Connection hostname: " + ftp_<%=cid %>.getRemoteHost() + ", Connection port: " + ftp_<%=cid %>.getRemotePort() + ".");
@@ -320,6 +319,7 @@ if (sftp) { // *** sftp *** //
<%}%>
<%}%>
String rootDir_<%=cid %> = ftp_<%=cid %>.pwd();
// msg_<%=cid%> likes a String[] to save the message from transfer.
com.enterprisedt.net.ftp.TransferCompleteStrings msg_<%=cid%> = ftp_<%=cid %>.getTransferCompleteMessages();
msg_<%=cid%>.clearAll();

View File

@@ -64,7 +64,7 @@ String passwordFieldName = "";
//The following part support the socks proxy for FTP and SFTP (Socks V4 or V5, they are all OK).
//And it can not work with the FTP proxy directly, only support the socks proxy.
if (useProxy) {
if (useProxy && !("true").equals(useExistingConn)) {
%>
java.util.Properties props_<%=cid%> = System.getProperties();
props_<%=cid%>.put("socksProxyPort", <%=proxyPort %>);

View File

@@ -62,7 +62,7 @@ String passwordFieldName = "";
//The following part support the socks proxy for FTP and SFTP (Socks V4 or V5, they are all OK).
//And it can not work with the FTP proxy directly, only support the socks proxy.
if (useProxy) {
if (useProxy && !("true").equals(useExistingConn)) {
%>
java.util.Properties props_<%=cid%> = System.getProperties();
props_<%=cid%>.put("socksProxyPort", <%=proxyPort %>);

View File

@@ -33,6 +33,8 @@ imports="
String theDistribution = ElementParameterParser.getValue(node, "__DISTRIBUTION__");
String theVersion = ElementParameterParser.getValue(node, "__HIVE_VERSION__");
final String studioVersion = org.talend.commons.utils.VersionUtils.getDisplayVersion();
String quboleClusterLabel = null;
String quboleEndpoint = null;
@@ -380,34 +382,23 @@ imports="
for (String command : connectionCommandList_<%=cid%>) {
queries_<%=cid%> += command;
<% if (isLog4jEnabled) { %>
log.info("<%=cid%> - query added: " + command);
log.info("<%=cid%> - configuration properties set: " + command);
<% } %>
}
}
String query_<%=cid %> = <%=dbquery%>;
<%
if (isLog4jEnabled) {
%>
log.info("<%=cid%> - query added: " + query_<%=cid %>.replaceAll("\n", " ").replaceAll(" +", " ") + ";");
log.info("<%=cid%> - queries sent to cluster, waiting for execution result ...");
<%
}
if (quboleClusterLabel != null) {
%>
String execution_result_<%=cid%> = instance_<%=cid%>.execute(queries_<%=cid%> + query_<%=cid %> + ";", <%=quboleClusterLabel%>).getResults();
<%
} else {
%>
String execution_result_<%=cid%> = instance_<%=cid%>.execute(queries_<%=cid%> + query_<%=cid %> + ";").getResults();
<%
}
if (isLog4jEnabled) {
%>
log.info("<%=cid%> - execution finished.");
<%
}
%>
queries_<%=cid%> = queries_<%=cid%> + query_<%=cid %>;
org.talend.bigdata.launcher.qubole.QuboleHiveClient.Job job_<%=cid%> =
new org.talend.bigdata.launcher.qubole.QuboleHiveClient.Job(queries_<%=cid%>);
job_<%=cid%>.setJobName("<%=cid%>");
job_<%=cid%>.setUserAgent(routines.system.Constant.getUserAgent("<%=studioVersion%>"));
<% if (quboleClusterLabel != null) { %>
job_<%=cid%>.setClusterLabel(<%=quboleClusterLabel%>);
<% } %>
String execution_result_<%=cid%> = instance_<%=cid%>.execute(job_<%=cid%>);
java.io.InputStream <%=ElementParameterParser.getValue(node, "__INPUT_STREAM_NAME__")%> = new java.io.ByteArrayInputStream(execution_result_<%=cid%>.getBytes());
<%
}

View File

@@ -151,8 +151,7 @@ imports="
<%
}
// Register jars to handle the parquet format.
// TODO: add jar possible on qubole ?
// Register jars to handle parquet format.
java.util.List<String> jarsToRegister = null;
java.util.List<String> jars = null;
@@ -221,7 +220,7 @@ imports="
<%
} else if (hiveDistrib.isQuboleDistribution()) {
%>
// Qubole hive 1.2 supports parquet by default.
// Qubole hive 2.1 supports parquet by default.
<%
} else { // dataproc
if(isLog4jEnabled) {

View File

@@ -33,6 +33,8 @@ dbquery = org.talend.core.model.utils.NodeUtil.replaceCRLFInMEMO_SQL(dbquery);
String theDistribution = ElementParameterParser.getValue(node, "__DISTRIBUTION__");
String theVersion = ElementParameterParser.getValue(node, "__HIVE_VERSION__");
final String studioVersion = org.talend.commons.utils.VersionUtils.getDisplayVersion();
String quboleClusterLabel = null;
String quboleEndpoint = null;
String encryptedToken = null;
@@ -143,29 +145,18 @@ if(hiveDistrib.isExecutedThroughWebHCat()) {
<% } %>
}
}
query_<%=cid %> = <%=dbquery%>;
<%
if (isLog4jEnabled) {
%>
log.info("<%=cid%> - query added: " + query_<%=cid %>.replace("';'", "'\\;'").replaceAll("\n", " ").replaceAll(" +", " ") + ";");
log.info("<%=cid%> - queries sent to cluster, waiting for execution result ...");
<%
}
if (quboleClusterLabel != null) {
%>
String execution_result_<%=cid%> = instance_<%=cid%>.execute(queries_<%=cid%> + query_<%=cid %>.replace("';'", "'\\;'") + ";", <%=quboleClusterLabel%>).getResults();
<%
} else {
%>
String execution_result_<%=cid%> = instance_<%=cid%>.execute(queries_<%=cid%> + query_<%=cid %>.replace("';'", "'\\;'") + ";").getResults();
<%
}
if (isLog4jEnabled) {
%>
log.info("<%=cid%> - execution finished.");
queries_<%=cid%> = queries_<%=cid%> + query_<%=cid %>.replace("';'", "'\\;'") + ";";
org.talend.bigdata.launcher.qubole.QuboleHiveClient.Job job_<%=cid%> =
new org.talend.bigdata.launcher.qubole.QuboleHiveClient.Job(queries_<%=cid%>);
job_<%=cid%>.setJobName("<%=cid%>");
job_<%=cid%>.setUserAgent(routines.system.Constant.getUserAgent("<%=studioVersion%>"));
<% if (quboleClusterLabel != null) { %>
job_<%=cid%>.setClusterLabel(<%=quboleClusterLabel%>);
<% } %>
String execution_result_<%=cid%> = instance_<%=cid%>.execute(job_<%=cid%>);
<%
}
} else { // normal mode
List<Map<String, String>> prepareStatementParameters = (List<Map<String,String>>)ElementParameterParser.getObjectValue(node, "__SET_PREPAREDSTATEMENT_PARAMETERS__");
@@ -184,7 +175,7 @@ if(hiveDistrib.isExecutedThroughWebHCat()) {
List<IMetadataColumn> rejectColumnList = null;
IMetadataTable metadataTable = node.getMetadataFromConnector("REJECT");
if(metadataTable != null) {
rejectColumnList = metadataTable.getListColumns();
rejectColumnList = metadataTable.getListColumns();
}
List<? extends IConnection> outgoingConns = node.getOutgoingSortedConnections();

View File

@@ -72,6 +72,8 @@ java.sql.Connection conn_<%=cid%> = null;
if("MARIADB".equals(dbVersion)){
drverClass = "org.mariadb.jdbc.Driver";
jdbcURL = "jdbc:mariadb";
} else if ("MYSQL_8".equals(dbVersion)){
drverClass = "com.mysql.cj.jdbc.Driver";
}
%>
String driverClass_<%=cid%> = "<%=drverClass%>";

View File

@@ -50,7 +50,8 @@
NUM_ROW="10"
REPOSITORY_VALUE="DB_VERSION"
SHOW_IF="USE_EXISTING_CONNECTION == 'false'">
<ITEMS DEFAULT="MYSQL_5">
<ITEMS DEFAULT="MYSQL_8">
<ITEM NAME="MYSQL_8" VALUE="MYSQL_8" />
<ITEM NAME="MYSQL_5" VALUE="MYSQL_5" />
<ITEM NAME="MYSQL_4" VALUE="MYSQL_4" />
<ITEM NAME="MARIADB" VALUE="MARIADB" />
@@ -286,6 +287,7 @@
<CODEGENERATION>
<IMPORTS>
<IMPORT NAME="Mysql_Driver8" MODULE="mysql-connector-java-8.0.12.jar" MVN="mvn:mysql/mysql-connector-java/8.0.12" REQUIRED_IF="(DB_VERSION == 'MYSQL_8') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="Mysql_Driver5" MODULE="mysql-connector-java-5.1.30-bin.jar" MVN="mvn:org.talend.libraries/mysql-connector-java-5.1.30-bin/6.0.0" REQUIRED_IF="(DB_VERSION == 'MYSQL_5') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="Mysql_Driver4" MODULE="mysql-connector-java-3.1.14-bin.jar" MVN="mvn:org.talend.libraries/mysql-connector-java-3.1.14-bin/6.0.0" REQUIRED_IF="(DB_VERSION == 'MYSQL_4') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="Mysql_MARIADB" MODULE="mariadb-java-client-2.2.1.jar" MVN="mvn:org.mariadb.jdbc/mariadb-java-client/2.2.1" REQUIRED_IF="(DB_VERSION == 'MARIADB') AND (USE_EXISTING_CONNECTION == 'false')" />

View File

@@ -48,4 +48,5 @@ CONNECTION.NAME=Component List
DB_VERSION.NAME=DB Version
DB_VERSION.ITEM.MYSQL_4=Mysql 4
DB_VERSION.ITEM.MYSQL_5=Mysql 5
DB_VERSION.ITEM.MYSQL_8=Mysql 8
DB_VERSION.ITEM.MARIADB=MariaDB

View File

@@ -42,6 +42,7 @@ DATA_ACTION.ITEM.IGNORE=Ignore records in table
DB_VERSION.NAME=DB Version
DB_VERSION.ITEM.MYSQL_4=Mysql 4
DB_VERSION.ITEM.MYSQL_5=Mysql 5
DB_VERSION.ITEM.MYSQL_8=Mysql 8
TABLE_ACTION.ITEM.DROP_IF_EXISTS_AND_CREATE=Drop table if exists and create
DB_VERSION.ITEM.MARIADB=MariaDB
DBNAME.NAME=Database

View File

@@ -42,8 +42,10 @@ imports="
String dbVersion = ElementParameterParser.getValue(node, "__DB_VERSION__");
if("MARIADB".equals(dbVersion)){
return "org.mariadb.jdbc.Driver";
}else{
return "org.gjt.mm.mysql.Driver";
} else if ("MYSQL_8".equals(dbVersion)){
return "com.mysql.cj.jdbc.Driver";
} else {
return "com.mysql.jdbc.Driver";
}
}
}//end class

View File

@@ -49,7 +49,8 @@
FIELD="CLOSED_LIST"
NUM_ROW="10"
REPOSITORY_VALUE="DB_VERSION">
<ITEMS DEFAULT="MYSQL_5">
<ITEMS DEFAULT="MYSQL_8">
<ITEM NAME="MYSQL_8" VALUE="MYSQL_8" />
<ITEM NAME="MYSQL_5" VALUE="MYSQL_5" />
<ITEM NAME="MYSQL_4" VALUE="MYSQL_4" />
<ITEM NAME="MARIADB" VALUE="MARIADB" />
@@ -191,6 +192,7 @@
<CODEGENERATION>
<IMPORTS>
<IMPORT NAME="Mysql_Driver8" MODULE="mysql-connector-java-8.0.12.jar" MVN="mvn:mysql/mysql-connector-java/8.0.12" REQUIRED_IF="(DB_VERSION == 'MYSQL_8')" />
<IMPORT NAME="Mysql_Driver5" MODULE="mysql-connector-java-5.1.30-bin.jar" MVN="mvn:org.talend.libraries/mysql-connector-java-5.1.30-bin/6.0.0" REQUIRED_IF="(DB_VERSION == 'MYSQL_5')" />
<IMPORT NAME="Mysql_Driver4" MODULE="mysql-connector-java-3.1.14-bin.jar" MVN="mvn:org.talend.libraries/mysql-connector-java-3.1.14-bin/6.0.0" REQUIRED_IF="(DB_VERSION == 'MYSQL_4')" />
<IMPORT NAME="Mysql_MARIADB" MODULE="mariadb-java-client-2.2.1.jar" MVN="mvn:org.mariadb.jdbc/mariadb-java-client/2.2.1" REQUIRED_IF="(DB_VERSION == 'MARIADB')" />

View File

@@ -41,4 +41,5 @@ PROPERTY.NAME=Property Type
DB_VERSION.NAME=DB Version
DB_VERSION.ITEM.MYSQL_4=Mysql 4
DB_VERSION.ITEM.MYSQL_5=Mysql 5
DB_VERSION.ITEM.MYSQL_8=Mysql 8
DB_VERSION.ITEM.MARIADB=MariaDB

View File

@@ -30,6 +30,7 @@ PROPERTY.NAME=Property Type
DB_VERSION.NAME=DB Version
DB_VERSION.ITEM.MYSQL_4=Mysql 4
DB_VERSION.ITEM.MYSQL_5=Mysql 5
DB_VERSION.ITEM.MYSQL_8=Mysql 8
SPECIFY_DATASOURCE_ALIAS.NAME=Specify a data source alias
DATASOURCE.NAME=Data source
DATASOURCE_ALIAS.NAME=Data source alias

View File

@@ -48,8 +48,10 @@ imports="
String dbVersion = ElementParameterParser.getValue(node, "__DB_VERSION__");
if("MARIADB".equals(dbVersion)){
return "org.mariadb.jdbc.Driver";
}else{
return "org.gjt.mm.mysql.Driver";
} else if ("MYSQL_8".equals(dbVersion)){
return "com.mysql.cj.jdbc.Driver";
} else {
return "com.mysql.jdbc.Driver";
}
}
@@ -57,13 +59,21 @@ imports="
super.createStatement(node);
String enableStream = ElementParameterParser.getValue(node, "__ENABLE_STREAM__");
String dbVersion = ElementParameterParser.getValue(node, "__DB_VERSION__");
if(("true").equals(enableStream)&&(!"MARIADB".equals(dbVersion))) {
if(("true").equals(enableStream)&&(!"MARIADB".equals(dbVersion))&&(!"MYSQL_8".equals(dbVersion))) {
%>
if(stmt_<%=cid %> instanceof com.mysql.jdbc.Statement){
((com.mysql.jdbc.Statement)stmt_<%=cid %>).enableStreamingResults();
}else if(stmt_<%=cid %> instanceof com.mysql.jdbc.jdbc2.optional.JDBC4StatementWrapper){
((com.mysql.jdbc.jdbc2.optional.JDBC4StatementWrapper)stmt_<%=cid %>).enableStreamingResults();
}
<%
} else if (("true").equals(enableStream) && ("MYSQL_8".equals(dbVersion))){
%>
if(stmt_<%=cid %> instanceof com.mysql.cj.jdbc.StatementImpl){
((com.mysql.cj.jdbc.StatementImpl)stmt_<%=cid %>).enableStreamingResults();
}else if(stmt_<%=cid %> instanceof com.mysql.cj.jdbc.StatementWrapper){
((com.mysql.cj.jdbc.StatementWrapper)stmt_<%=cid %>).enableStreamingResults();
}
<%
}
}

View File

@@ -49,7 +49,8 @@
NUM_ROW="10"
REPOSITORY_VALUE="DB_VERSION"
SHOW_IF="USE_EXISTING_CONNECTION == 'false'">
<ITEMS DEFAULT="MYSQL_5">
<ITEMS DEFAULT="MYSQL_8">
<ITEM NAME="MYSQL_8" VALUE="MYSQL_8" />
<ITEM NAME="MYSQL_5" VALUE="MYSQL_5" />
<ITEM NAME="MYSQL_4" VALUE="MYSQL_4" />
<ITEM NAME="MARIADB" VALUE="MARIADB" />
@@ -268,11 +269,12 @@
</ADVANCED_PARAMETERS>
<CODEGENERATION>
<IMPORTS>
<IMPORT NAME="Mysql_Driver5" MODULE="mysql-connector-java-5.1.30-bin.jar" MVN="mvn:org.talend.libraries/mysql-connector-java-5.1.30-bin/6.0.0" REQUIRED_IF="(DB_VERSION == 'MYSQL_5') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="Mysql_Driver4" MODULE="mysql-connector-java-3.1.14-bin.jar" MVN="mvn:org.talend.libraries/mysql-connector-java-3.1.14-bin/6.0.0" REQUIRED_IF="(DB_VERSION == 'MYSQL_4') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="Mysql_MARIADB" MODULE="mariadb-java-client-2.2.1.jar" MVN="mvn:org.mariadb.jdbc/mariadb-java-client/2.2.1" REQUIRED_IF="(DB_VERSION == 'MARIADB') AND (USE_EXISTING_CONNECTION == 'false')" />
</IMPORTS>
<IMPORTS>
<IMPORT NAME="Mysql_Driver8" MODULE="mysql-connector-java-8.0.12.jar" MVN="mvn:mysql/mysql-connector-java/8.0.12" REQUIRED_IF="(DB_VERSION == 'MYSQL_8') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="Mysql_Driver5" MODULE="mysql-connector-java-5.1.30-bin.jar" MVN="mvn:org.talend.libraries/mysql-connector-java-5.1.30-bin/6.0.0" REQUIRED_IF="(DB_VERSION == 'MYSQL_5') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="Mysql_Driver4" MODULE="mysql-connector-java-3.1.14-bin.jar" MVN="mvn:org.talend.libraries/mysql-connector-java-3.1.14-bin/6.0.0" REQUIRED_IF="(DB_VERSION == 'MYSQL_4') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="Mysql_MARIADB" MODULE="mariadb-java-client-2.2.1.jar" MVN="mvn:org.mariadb.jdbc/mariadb-java-client/2.2.1" REQUIRED_IF="(DB_VERSION == 'MARIADB') AND (USE_EXISTING_CONNECTION == 'false')" />
</IMPORTS>
</CODEGENERATION>
<RETURNS>

View File

@@ -42,6 +42,7 @@ MAPPING.NAME=Mapping
DB_VERSION.NAME=DB Version
DB_VERSION.ITEM.MYSQL_4=Mysql 4
DB_VERSION.ITEM.MYSQL_5=Mysql 5
DB_VERSION.ITEM.MYSQL_8=Mysql 8
DB_VERSION.ITEM.MARIADB=MariaDB
SPECIFY_DATASOURCE_ALIAS.NAME=Specify a data source alias

View File

@@ -36,6 +36,7 @@ PROPERTY.NAME=Property Type
DB_VERSION.NAME=DB Version
DB_VERSION.ITEM.MYSQL_4=Mysql 4
DB_VERSION.ITEM.MYSQL_5=Mysql 5
DB_VERSION.ITEM.MYSQL_8=Mysql 8
MAPPING.NAME=Mapping
SPECIFY_DATASOURCE_ALIAS.NAME=Specify a data source alias
DATASOURCE.NAME=Data source

View File

@@ -172,7 +172,7 @@ if(useExistingConnection) {
conn += "_in";
dbVersion = "MYSQL_5";
}else{
List<? extends INode> nodes = process.getNodesOfType("tMysqlConnection");
List< ? extends INode> nodes = process.getNodesOfType("tMysqlConnection");
for (INode ne:nodes) {
if (connection.equals(ne.getUniqueName())) {
dbVersion = ElementParameterParser.getValue(ne, "__DB_VERSION__");
@@ -201,11 +201,13 @@ if(useExistingConnection) {
<%
}
dbVersion = ElementParameterParser.getValue(node, "__DB_VERSION__");
String drverClass = "org.gjt.mm.mysql.Driver";
String drverClass = "com.mysql.jdbc.Driver";
String jdbcURL = "jdbc:mysql";
if("MARIADB".equals(dbVersion)){
drverClass = "org.mariadb.jdbc.Driver";
jdbcURL = "jdbc:mariadb";
} else if ("MYSQL_8".equals(dbVersion)) {
drverClass = "com.mysql.cj.jdbc.Driver";
}
%>
String dbProperties_<%=cid%> = <%=dbproperties%>;
@@ -256,7 +258,7 @@ if(!useExistingConnection) {
dbLog.commit().logAutoCommit("conn_"+cid+".getAutoCommit()");
%>
<%
if (useBatchSize && ("MYSQL_5".equals(dbVersion) || "MARIADB".equals(dbVersion)) && (("UPDATE").equals(dataAction)||("DELETE").equals(dataAction))) {
if (useBatchSize && ("MYSQL_8".equals(dbVersion) || "MYSQL_5".equals(dbVersion) || "MARIADB".equals(dbVersion)) && (("UPDATE").equals(dataAction)||("DELETE").equals(dataAction))) {
if(!("").equals(batchSize)&&!("0").equals(batchSize)) {
%>
int batchSize_<%=cid%> = <%=batchSize%>;
@@ -454,7 +456,7 @@ if(columnList != null && columnList.size() > 0) {
String insertColValue<%=cid%> = "<%=insertValueStmt.toString()%>";
int rowCount<%=cid%> = 0;
<%
} else if ("MYSQL_5".equals(dbVersion) || "MARIADB".equals(dbVersion)) {
} else if ("MYSQL_8".equals(dbVersion) || "MYSQL_5".equals(dbVersion) || "MARIADB".equals(dbVersion)) {
%>
String insert_<%=cid%> = "INSERT INTO `" + <%=table%> + "` (<%=insertColName.toString()%>) VALUES (<%=insertValueStmt.toString()%>)";
<%
@@ -621,7 +623,7 @@ if(isDynamic) {
String insertColName<%=cid%>="";
int counter<%=cid%>=1;
<%
}else if (("MYSQL_5".equals(dbVersion) || "MARIADB".equals(dbVersion)) && extendedInsert){
}else if (("MYSQL_8".equals(dbVersion) || "MYSQL_5".equals(dbVersion) || "MARIADB".equals(dbVersion)) && extendedInsert){
%>
int batchSizeCounter_<%=cid%>=0;
int batchSize_<%=cid%>=0;

View File

@@ -370,7 +370,7 @@ skeleton="../templates/db_output_bulk.skeleton"
}
}
<%
} else if ("MYSQL_5".equals(dbVersion) ||"MARIADB".equals(dbVersion)) {
} else if ("MYSQL_8".equals(dbVersion) || "MYSQL_5".equals(dbVersion) || "MARIADB".equals(dbVersion)) {
//////////batch execute by batch size///////
if(!("").equals(numPerInsert ) && !("0").equals(numPerInsert)) {
%>
@@ -452,7 +452,7 @@ skeleton="../templates/db_output_bulk.skeleton"
<%
} else {
%>
<%if ((rejectConnName==null && ("MYSQL_5".equals(dbVersion) || "MARIADB".equals(dbVersion)) && useBatchSize) && (("UPDATE").equals(dataAction) || ("DELETE").equals(dataAction))) {
<%if ((rejectConnName==null && ("MYSQL_8".equals(dbVersion) || "MYSQL_5".equals(dbVersion) || "MARIADB".equals(dbVersion)) && useBatchSize) && (("UPDATE").equals(dataAction) || ("DELETE").equals(dataAction))) {
%>
try {
if(pstmt_<%=cid %> != null){

View File

@@ -54,7 +54,8 @@
NUM_ROW="10"
REPOSITORY_VALUE="DB_VERSION"
SHOW_IF="USE_EXISTING_CONNECTION == 'false'">
<ITEMS DEFAULT="MYSQL_5">
<ITEMS DEFAULT="MYSQL_8">
<ITEM NAME="MYSQL_8" VALUE="MYSQL_8" />
<ITEM NAME="MYSQL_5" VALUE="MYSQL_5" />
<ITEM NAME="MYSQL_4" VALUE="MYSQL_4" />
<ITEM NAME="MARIADB" VALUE="MARIADB" />
@@ -451,6 +452,7 @@
<CODEGENERATION>
<IMPORTS>
<IMPORT NAME="Mysql_Driver8" MODULE="mysql-connector-java-8.0.12.jar" MVN="mvn:mysql/mysql-connector-java/8.0.12" REQUIRED_IF="(DB_VERSION == 'MYSQL_8') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="Mysql_Driver5" MODULE="mysql-connector-java-5.1.30-bin.jar" MVN="mvn:org.talend.libraries/mysql-connector-java-5.1.30-bin/6.0.0" REQUIRED_IF="(DB_VERSION == 'MYSQL_5') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="Mysql_Driver4" MODULE="mysql-connector-java-3.1.14-bin.jar" MVN="mvn:org.talend.libraries/mysql-connector-java-3.1.14-bin/6.0.0" REQUIRED_IF="(DB_VERSION == 'MYSQL_4') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="Mysql_MARIADB" MODULE="mariadb-java-client-2.2.1.jar" MVN="mvn:org.mariadb.jdbc/mariadb-java-client/2.2.1" REQUIRED_IF="(DB_VERSION == 'MARIADB') AND (USE_EXISTING_CONNECTION == 'false')" />

View File

@@ -77,7 +77,7 @@ skeleton="../templates/db_output_bulk.skeleton"
}
String rejectConnName = null;
List<? extends IConnection> rejectConns = node.getOutgoingConnections("REJECT");
List< ? extends IConnection> rejectConns = node.getOutgoingConnections("REJECT");
IMetadataTable metadataTable = null;
if(rejectConns != null && rejectConns.size() > 0) {
@@ -298,7 +298,7 @@ if(columnList != null && columnList.size() > 0) {
int rowCount<%=cid%> = 0;
<%
}
} else if ("MYSQL_5".equals(dbVersion) || "MARIADB".equals(dbVersion)) {
} else if ("MYSQL_8".equals(dbVersion) || "MYSQL_5".equals(dbVersion) || "MARIADB".equals(dbVersion)) {
List< ? extends IConnection> conns_dynamic = node.getIncomingConnections();
if(conns_dynamic!=null && conns_dynamic.size()>0){
IConnection conn = conns_dynamic.get(0);
@@ -628,7 +628,7 @@ if(columnList != null && columnList.size() > 0) {
<%
}
}
if ("MYSQL_5".equals(dbVersion) || "MARIADB".equals(dbVersion)) {
if ("MYSQL_8".equals(dbVersion) || "MYSQL_5".equals(dbVersion) || "MARIADB".equals(dbVersion)) {
if ((extendedInsert&&"INSERT".equals(dataAction)) || (useBatchSize&&("UPDATE".equals(dataAction)||"DELETE".equals(dataAction)))) {
if((!("").equals(numPerInsert)&&!("0").equals(numPerInsert))
||(!("").equals(batchSize)&&!("0").equals(batchSize))) {
@@ -737,7 +737,7 @@ if(columnList != null && columnList.size() > 0) {
counter<%=cid%>=1;
}
<%
} else if ("MYSQL_5".equals(dbVersion) || "MARIADB".equals(dbVersion)) {
} else if ("MYSQL_8".equals(dbVersion) || "MYSQL_5".equals(dbVersion) || "MARIADB".equals(dbVersion)) {
int counter = 1;
for(Column column : colStruct) {
if(column.isInsertable()) {
@@ -994,7 +994,7 @@ if(columnList != null && columnList.size() > 0) {
}
%>
<%if (rejectConnName == null && useBatchSize && ("MYSQL_5".equals(dbVersion) || "MARIADB".equals(dbVersion))) { // whether use batch
<%if (rejectConnName == null && useBatchSize && ("MYSQL_8".equals(dbVersion) || "MYSQL_5".equals(dbVersion) || "MARIADB".equals(dbVersion))) { // whether use batch
%>
pstmt_<%=cid %>.addBatch();
nb_line_<%=cid%>++;
@@ -1498,7 +1498,7 @@ if(columnList != null && columnList.size() > 0) {
<%
}
%>
<%if (rejectConnName == null && useBatchSize && ("MYSQL_5".equals(dbVersion) || "MARIADB".equals(dbVersion))) { // whether use batch
<%if (rejectConnName == null && useBatchSize && ("MYSQL_8".equals(dbVersion) || "MYSQL_5".equals(dbVersion) || "MARIADB".equals(dbVersion))) { // whether use batch
%>
pstmt_<%=cid %>.addBatch();
nb_line_<%=cid%>++;
@@ -1806,7 +1806,7 @@ if(columnList != null && columnList.size() > 0) {
<%
}
//////////batch execute by batch size///////
if (extendedInsert && ("MYSQL_5".equals(dbVersion) || "MARIADB".equals(dbVersion)) && ("INSERT").equals(dataAction)) {
if (extendedInsert && ("MYSQL_8".equals(dbVersion) || "MYSQL_5".equals(dbVersion) || "MARIADB".equals(dbVersion)) && ("INSERT").equals(dataAction)) {
if(!("").equals(numPerInsert ) && !("0").equals(numPerInsert )) {
%>
if ( batchSize_<%=cid%> <= batchSizeCounter_<%=cid%>) {
@@ -1856,7 +1856,7 @@ if(columnList != null && columnList.size() > 0) {
}
}
if (useBatchSize && ("MYSQL_5".equals(dbVersion) || "MARIADB".equals(dbVersion)) &&(rejectConnName==null)&& (("UPDATE").equals(dataAction) || ("DELETE").equals(dataAction))) {
if (useBatchSize && ("MYSQL_8".equals(dbVersion) || "MYSQL_5".equals(dbVersion) || "MARIADB".equals(dbVersion)) &&(rejectConnName==null)&& (("UPDATE").equals(dataAction) || ("DELETE").equals(dataAction))) {
if(!("").equals(batchSize) && !("0").equals(batchSize)) {
%>
if ( batchSize_<%=cid%> <= batchSizeCounter_<%=cid%>) {
@@ -1919,7 +1919,7 @@ if(columnList != null && columnList.size() > 0) {
if(commitEvery_<%=cid%> <= commitCounter_<%=cid%>) {
<%if ((rejectConnName==null && useBatchSize && ("MYSQL_5".equals(dbVersion) || "MARIADB".equals(dbVersion))) && (("INSERT").equals(dataAction) || ("UPDATE").equals(dataAction) || ("DELETE").equals(dataAction)) ) {
<%if ((rejectConnName==null && useBatchSize && ("MYSQL_8".equals(dbVersion) || "MYSQL_5".equals(dbVersion) || "MARIADB".equals(dbVersion))) && (("INSERT").equals(dataAction) || ("UPDATE").equals(dataAction) || ("DELETE").equals(dataAction)) ) {
%>
try {
int countSum_<%=cid%> = 0;

View File

@@ -110,6 +110,7 @@ HINT_OPTIONS.ITEM.SQL_STMT.ITEM.DELETE=DELETE
DB_VERSION.NAME=DB Version
DB_VERSION.ITEM.MYSQL_4=Mysql 4
DB_VERSION.ITEM.MYSQL_5=Mysql 5
DB_VERSION.ITEM.MYSQL_8=Mysql 8
DB_VERSION.ITEM.MARIADB=MariaDB
SUPPORT_NULL_WHERE.NAME=Support null in "SQL WHERE" statement

View File

@@ -100,6 +100,7 @@ DATA_ACTION.ITEM.INSERT_IGNORE=Insert Ignore
DB_VERSION.NAME=DB Version
DB_VERSION.ITEM.MYSQL_4=Mysql 4
DB_VERSION.ITEM.MYSQL_5=Mysql 5
DB_VERSION.ITEM.MYSQL_8=Mysql 8
SUPPORT_NULL_WHERE.NAME=Support null in "SQL WHERE" statement
USE_BATCH_SIZE.NAME=Use Batch Size
BATCH_SIZE.NAME=Batch Size

View File

@@ -46,7 +46,8 @@
FIELD="CLOSED_LIST"
NUM_ROW="10"
REPOSITORY_VALUE="DB_VERSION">
<ITEMS DEFAULT="MYSQL_5">
<ITEMS DEFAULT="MYSQL_8">
<ITEM NAME="MYSQL_8" VALUE="MYSQL_8" />
<ITEM NAME="MYSQL_5" VALUE="MYSQL_5" />
<ITEM NAME="MYSQL_4" VALUE="MYSQL_4" />
<ITEM NAME="MARIADB" VALUE="MARIADB" />
@@ -289,6 +290,7 @@
<TEMPLATE_PARAM SOURCE="self.DB_VERSION" TARGET="tMBE.DB_VERSION" />
</TEMPLATES>
<IMPORTS>
<IMPORT NAME="Mysql_Driver8" MODULE="mysql-connector-java-8.0.12.jar" MVN="mvn:mysql/mysql-connector-java/8.0.12" REQUIRED_IF="(DB_VERSION == 'MYSQL_8') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="Mysql_Driver5" MODULE="mysql-connector-java-5.1.30-bin.jar" MVN="mvn:org.talend.libraries/mysql-connector-java-5.1.30-bin/6.0.0" REQUIRED_IF="(DB_VERSION == 'MYSQL_5')" />
<IMPORT NAME="Mysql_Driver4" MODULE="mysql-connector-java-3.1.14-bin.jar" MVN="mvn:org.talend.libraries/mysql-connector-java-3.1.14-bin/6.0.0" REQUIRED_IF="(DB_VERSION == 'MYSQL_4')" />
<IMPORT NAME="Mysql_MARIADB" MODULE="mariadb-java-client-2.2.1.jar" MVN="mvn:org.mariadb.jdbc/mariadb-java-client/2.2.1" REQUIRED_IF="(DB_VERSION == 'MARIADB') AND (USE_EXISTING_CONNECTION == 'false')" />

View File

@@ -54,4 +54,5 @@ MAPPING.NAME=Mapping
DB_VERSION.NAME=DB Version
DB_VERSION.ITEM.MYSQL_4=Mysql 4
DB_VERSION.ITEM.MYSQL_5=Mysql 5
DB_VERSION.ITEM.MYSQL_8=Mysql 8
DB_VERSION.ITEM.MARIADB=MariaDB

View File

@@ -47,6 +47,7 @@ DATA_ACTION.ITEM.IGNORE=Ignore records in table
DB_VERSION.NAME=DB Version
DB_VERSION.ITEM.MYSQL_4=Mysql 4
DB_VERSION.ITEM.MYSQL_5=Mysql 5
DB_VERSION.ITEM.MYSQL_8=Mysql 8
TABLE_ACTION.ITEM.DROP_IF_EXISTS_AND_CREATE=Drop table if exists and create
DB_VERSION.ITEM.MARIADB=MariaDB
DBNAME.NAME=Database

View File

@@ -36,8 +36,10 @@ imports="
String dbVersion = ElementParameterParser.getValue(node, "__DB_VERSION__");
if("MARIADB".equals(dbVersion)){
return "org.mariadb.jdbc.Driver";
}else{
return "org.gjt.mm.mysql.Driver";
} else if ("MYSQL_8".equals(dbVersion)){
return "com.mysql.cj.jdbc.Driver";
} else {
return "com.mysql.jdbc.Driver";
}
}
}

View File

@@ -51,7 +51,8 @@
NUM_ROW="10"
REPOSITORY_VALUE="DB_VERSION"
SHOW_IF="USE_EXISTING_CONNECTION == 'false'">
<ITEMS DEFAULT="MYSQL_5">
<ITEMS DEFAULT="MYSQL_8">
<ITEM NAME="MYSQL_8" VALUE="MYSQL_8" />
<ITEM NAME="MYSQL_5" VALUE="MYSQL_5" />
<ITEM NAME="MYSQL_4" VALUE="MYSQL_4" />
<ITEM NAME="MARIADB" VALUE="MARIADB" />
@@ -309,6 +310,7 @@
<CODEGENERATION>
<IMPORTS>
<IMPORT NAME="Mysql_Driver8" MODULE="mysql-connector-java-8.0.12.jar" MVN="mvn:mysql/mysql-connector-java/8.0.12" REQUIRED_IF="(DB_VERSION == 'MYSQL_8') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="Mysql_Driver5" MODULE="mysql-connector-java-5.1.30-bin.jar" MVN="mvn:org.talend.libraries/mysql-connector-java-5.1.30-bin/6.0.0" REQUIRED_IF="(DB_VERSION == 'MYSQL_5') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="Mysql_Driver4" MODULE="mysql-connector-java-3.1.14-bin.jar" MVN="mvn:org.talend.libraries/mysql-connector-java-3.1.14-bin/6.0.0" REQUIRED_IF="(DB_VERSION == 'MYSQL_4') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="Mysql_MARIADB" MODULE="mariadb-java-client-2.2.1.jar" MVN="mvn:org.mariadb.jdbc/mariadb-java-client/2.2.1" REQUIRED_IF="(DB_VERSION == 'MARIADB') AND (USE_EXISTING_CONNECTION == 'false')" />

View File

@@ -43,6 +43,7 @@ QUERYSTORE.NAME=Query Type
DB_VERSION.NAME=DB Version
DB_VERSION.ITEM.MYSQL_4=Mysql 4
DB_VERSION.ITEM.MYSQL_5=Mysql 5
DB_VERSION.ITEM.MYSQL_8=Mysql 8
DB_VERSION.ITEM.MARIADB=MariaDB
USE_PREPAREDSTATEMENT.NAME=Use PreparedStatement

View File

@@ -37,6 +37,7 @@ QUERYSTORE.NAME=Query Type
DB_VERSION.NAME=DB Version
DB_VERSION.ITEM.MYSQL_4=Mysql 4
DB_VERSION.ITEM.MYSQL_5=Mysql 5
DB_VERSION.ITEM.MYSQL_8=Mysql 8
USE_PREPAREDSTATEMENT.NAME=Use PreparedStatement
SET_PREPAREDSTATEMENT_PARAMETERS.NAME=Set PreparedStatement Parameters
SET_PREPAREDSTATEMENT_PARAMETERS.ITEM.PARAMETER_INDEX=Parameter Index

View File

@@ -25,7 +25,7 @@ List<IMetadataColumn> inputSchema = getInputSchema(node);
List<IMetadataColumn> outputSchema = getOutputSchema(node);
String incomingConnName = null;
List<? extends IConnection> incomingConnections = node.getIncomingConnections();
List< ? extends IConnection> incomingConnections = node.getIncomingConnections();
if(incomingConnections != null && incomingConnections.size() > 0) {
for(IConnection incomingConnection : incomingConnections) {
if(incomingConnection.getLineStyle().hasConnectionCategory(IConnectionCategory.DATA)) {
@@ -72,11 +72,13 @@ if(inputSchema != null && inputSchema.size() > 0 && outputSchema != null && outp
<%
} else {
String dbVersion = ElementParameterParser.getValue(node, "__DB_VERSION__");
String drverClass= "org.gjt.mm.mysql.Driver";
String drverClass= "com.mysql.jdbc.Driver";
String jdbcURL = "jdbc:mysql";
if("MARIADB".equals(dbVersion)){
drverClass = "org.mariadb.jdbc.Driver";
jdbcURL = "jdbc:mariadb";
} else if ("MYSQL_8".equals(dbVersion)){
drverClass= "com.mysql.cj.jdbc.Driver";
}
%>
java.lang.Class.forName("<%=drverClass%>");

View File

@@ -54,7 +54,8 @@
NUM_ROW="10"
REPOSITORY_VALUE="DB_VERSION"
SHOW_IF="USE_EXISTING_CONNECTION == 'false'">
<ITEMS DEFAULT="MYSQL_5">
<ITEMS DEFAULT="MYSQL_8">
<ITEM NAME="MYSQL_8" VALUE="MYSQL_8" />
<ITEM NAME="MYSQL_5" VALUE="MYSQL_5" />
<ITEM NAME="MYSQL_4" VALUE="MYSQL_4" />
<ITEM NAME="MARIADB" VALUE="MARIADB" />
@@ -524,6 +525,7 @@
<CODEGENERATION>
<IMPORTS>
<IMPORT NAME="Mysql_Driver8" MODULE="mysql-connector-java-8.0.12.jar" MVN="mvn:mysql/mysql-connector-java/8.0.12" REQUIRED_IF="(DB_VERSION == 'MYSQL_8') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="Mysql_Driver5" MODULE="mysql-connector-java-5.1.30-bin.jar" MVN="mvn:org.talend.libraries/mysql-connector-java-5.1.30-bin/6.0.0" REQUIRED_IF="(DB_VERSION == 'MYSQL_5') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="Mysql_Driver4" MODULE="mysql-connector-java-3.1.14-bin.jar" MVN="mvn:org.talend.libraries/mysql-connector-java-3.1.14-bin/6.0.0" REQUIRED_IF="(DB_VERSION == 'MYSQL_4') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="Mysql_MARIADB" MODULE="mariadb-java-client-2.2.1.jar" MVN="mvn:org.mariadb.jdbc/mariadb-java-client/2.2.1" REQUIRED_IF="(DB_VERSION == 'MARIADB') AND (USE_EXISTING_CONNECTION == 'false')" />

View File

@@ -100,6 +100,7 @@ NOTE.NAME=Note
DB_VERSION.NAME=DB Version
DB_VERSION.ITEM.MYSQL_4=Mysql 4
DB_VERSION.ITEM.MYSQL_5=Mysql 5
DB_VERSION.ITEM.MYSQL_8=Mysql 8
DB_VERSION.ITEM.MARIADB=MariaDB
DIE_ON_ERROR.NAME=Die on error

View File

@@ -90,6 +90,7 @@ NOTE.NAME=Note
DB_VERSION.NAME=DB Version
DB_VERSION.ITEM.MYSQL_4=Mysql 4
DB_VERSION.ITEM.MYSQL_5=Mysql 5
DB_VERSION.ITEM.MYSQL_8=Mysql 8
DIE_ON_ERROR.NAME=Die on error
REJECT.LINK=Rejects
REJECT.MENU=Rejects

View File

@@ -50,11 +50,13 @@ if(columnList != null && columnList.size() > 0) {
String dbproperties = ElementParameterParser.getValue(node, "__PROPERTIES__");
String dbVersion = ElementParameterParser.getValue(node, "__DB_VERSION__");
String drverClass= "org.gjt.mm.mysql.Driver";
String drverClass= "com.mysql.jdbc.Driver";
String jdbcURL = "jdbc:mysql";
if("MARIADB".equals(dbVersion)){
drverClass = "org.mariadb.jdbc.Driver";
jdbcURL = "jdbc:mariadb";
} else if ("MYSQL_8".equals(dbVersion)){
drverClass= "com.mysql.cj.jdbc.Driver";
}
%>
java.lang.Class.forName("<%=drverClass%>");
@@ -106,9 +108,19 @@ if(columnList != null && columnList.size() > 0) {
stmtCreate_<%=cid%>.close();
<%
} else if(("CREATE_IF_NOT_EXISTS").equals(tableAction) || ("DROP_IF_EXISTS_AND_CREATE").equals(tableAction)) {
List< ? extends INode> nodes = node.getProcess().getNodesOfType("tMysqlConnection");
String dbnameMySQL = ElementParameterParser.getValue(node, "__DBNAME__");
if (dbnameMySQL == null || "\"\"".equals(dbnameMySQL) || "".equals(dbnameMySQL)) {
String connectionMySQL = ElementParameterParser.getValue(node,"__CONNECTION__");
for (INode ne : nodes) {
if (connectionMySQL.equals(ne.getUniqueName())) {
dbnameMySQL = ElementParameterParser.getValue(ne, "__DBNAME__");
}
}
}
%>
java.sql.DatabaseMetaData dbMetaData_<%=cid%> = conn_<%=cid%>.getMetaData();
java.sql.ResultSet rsTable_<%=cid%> = dbMetaData_<%=cid%>.getTables(null, null, null, new String[]{"TABLE"});
java.sql.ResultSet rsTable_<%=cid%> = dbMetaData_<%=cid%>.getTables(<%=dbnameMySQL%>, null, null, new String[]{"TABLE"});
boolean whetherExist_<%=cid%> = false;
while(rsTable_<%=cid%>.next()) {
String table_<%=cid%> = rsTable_<%=cid%>.getString("TABLE_NAME");

View File

@@ -50,7 +50,8 @@
NUM_ROW="10"
REPOSITORY_VALUE="DB_VERSION"
SHOW_IF="USE_EXISTING_CONNECTION == 'false'">
<ITEMS DEFAULT="MYSQL_5">
<ITEMS DEFAULT="MYSQL_8">
<ITEM NAME="MYSQL_8" VALUE="MYSQL_8" />
<ITEM NAME="MYSQL_5" VALUE="MYSQL_5" />
<ITEM NAME="MYSQL_4" VALUE="MYSQL_4" />
<ITEM NAME="MARIADB" VALUE="MARIADB" />
@@ -343,6 +344,7 @@
<CODEGENERATION>
<IMPORTS>
<IMPORT NAME="Mysql_Driver8" MODULE="mysql-connector-java-8.0.12.jar" MVN="mvn:mysql/mysql-connector-java/8.0.12" REQUIRED_IF="(DB_VERSION == 'MYSQL_8') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="Mysql_Driver5" MODULE="mysql-connector-java-5.1.30-bin.jar" MVN="mvn:org.talend.libraries/mysql-connector-java-5.1.30-bin/6.0.0" REQUIRED_IF="(DB_VERSION == 'MYSQL_5') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="Mysql_Driver4" MODULE="mysql-connector-java-3.1.14-bin.jar" MVN="mvn:org.talend.libraries/mysql-connector-java-3.1.14-bin/6.0.0" REQUIRED_IF="(DB_VERSION == 'MYSQL_4') AND (USE_EXISTING_CONNECTION == 'false')" />
<IMPORT NAME="Mysql_MARIADB" MODULE="mariadb-java-client-2.2.1.jar" MVN="mvn:org.mariadb.jdbc/mariadb-java-client/2.2.1" REQUIRED_IF="(DB_VERSION == 'MARIADB') AND (USE_EXISTING_CONNECTION == 'false')" />

View File

@@ -84,4 +84,5 @@ FIELD_VALUE_INC_NULL.NAME=Source fields value include Null
DB_VERSION.NAME=DB Version
DB_VERSION.ITEM.MYSQL_4=Mysql 4
DB_VERSION.ITEM.MYSQL_5=Mysql 5
DB_VERSION.ITEM.MYSQL_8=Mysql 8
DB_VERSION.ITEM.MARIADB=MariaDB

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