Compare commits
22 Commits
slemoing/c
...
release/7.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2794802ab6 | ||
|
|
04c0190688 | ||
|
|
fb98946610 | ||
|
|
39f004bed9 | ||
|
|
ab14f088a9 | ||
|
|
d9936600da | ||
|
|
828d04212a | ||
|
|
3105881419 | ||
|
|
5a588a024f | ||
|
|
69b40cb2bd | ||
|
|
7f68ae0662 | ||
|
|
f5232f79e2 | ||
|
|
20989e1a22 | ||
|
|
84c778d7d0 | ||
|
|
b7ab10293e | ||
|
|
520f904dcf | ||
|
|
ffab5918e7 | ||
|
|
33e40904dd | ||
|
|
8726904c7e | ||
|
|
276d3cd6d8 | ||
|
|
332853c5c8 | ||
|
|
feeea8220a |
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
<%
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
<%
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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')" />
|
||||
|
||||
@@ -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()) {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
@@ -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')" />
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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%>";
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 %>);
|
||||
|
||||
@@ -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 %>);
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
@@ -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 %>);
|
||||
|
||||
@@ -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 %>);
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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 %>);
|
||||
|
||||
@@ -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 %>);
|
||||
|
||||
@@ -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());
|
||||
<%
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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%>";
|
||||
|
||||
@@ -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')" />
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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')" />
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
<%
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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){
|
||||
|
||||
@@ -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')" />
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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')" />
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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')" />
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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%>");
|
||||
|
||||
@@ -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')" />
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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')" />
|
||||
|
||||
@@ -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
Reference in New Issue
Block a user