Compare commits

..

2 Commits

Author SHA1 Message Date
Voievidko
27c6cd357f fix(TPS-4048): add release notes 2020-05-27 10:52:22 +03:00
mbasiuk-talend
bde25031ab fix(TDI-43632): use defined pattern by user instead of static value (#4398) 2020-05-27 10:29:39 +03:00
3 changed files with 55 additions and 67 deletions

View File

@@ -5,12 +5,12 @@ product:
- https://talend.poolparty.biz/coretaxonomy/23
---
# TPS-4053
# TPS-4048
| Info | Value |
| ---------------- | ---------------- |
| Patch Name | Patch\_20200514\_TPS-4053\_v1-7.2.1 |
| Release Date | 2020-05-14 |
| Patch Name | Patch\_20200527_TPS-4048\_v1-7.2.1 |
| Release Date | 2020-05-27 |
| Target Version | 20190620\_1446-V7.2.1 |
| Product affected | Talend Studio |
@@ -24,7 +24,7 @@ This is a self-contained patch.
This patch contains the following fixes:
- TPS-4053 [7.2.1] Unable to execute the job, receiving "Failed to generate code." when using tAmazonRedshiftManage component.(TDI-44070)
- TPS-4048 [7.2.1] tBigQueryUpload operator loses fractional seconds for datetime/timestamp fields (TDI-43632)
## Prerequisites
@@ -62,5 +62,4 @@ Backup the Affected files list below. Uninstall the patch by restore the backup
## Affected files for this patch
The following files are installed by this patch:
- {Talend\_Studio\_path}/plugins/org.talend.designer.components.localprovider\_7.2.1.20190614\_0309/components/tAmazonRedshiftManage/tAmazonRedshiftManage\_begin.javajet
- {Talend\_Studio\_path}/plugins/org.talend.designer.components.localprovider\_7.2.1.20190614\_0309/components/tBigQueryOutputBulk/tBigQueryOutputBulk\_main.javajet

View File

@@ -24,9 +24,6 @@
String user = ElementParameterParser.getValue(node, "__USER__");
String node_type = ElementParameterParser.getValue(node, "__NODE_TYPE__");
String node_count = ElementParameterParser.getValue(node, "__NODE_COUNT__");
if (node_count.isEmpty()) {
node_count = "1";
}
boolean isLog4jEnabled = "true".equals(ElementParameterParser.getValue(node.getProcess(), "__LOG4J_ACTIVATE__"));
@@ -91,46 +88,52 @@
.withMasterUsername(<%=user%>)
.withMasterUserPassword(decryptedPwd_<%=cid%>)
.withNodeType(<%=node_type%>);
.withNodeType(<%=node_type%>)
if (<%=node_count%> > 1) {
request_<%=cid%> = request_<%=cid%>.withNumberOfNodes(<%=node_count%>);
} else {
request_<%=cid%> = request_<%=cid%>.withClusterType("single-node");
}
//advanced settings
<%if(parameterUtil.isValid(parameter_group_name)) {%>
request_<%=cid%> = request_<%=cid%>.withClusterParameterGroupName(<%=parameter_group_name%>);
<%}%>
<%if(parameterUtil.isValid(subnet_group_name)) {%>
request_<%=cid%> = request_<%=cid%>.withClusterSubnetGroupName(<%=subnet_group_name%>);
<%}%>
<%
if(publicly_accessible) {
%>
request_<%=cid%> = request_<%=cid%>.withPubliclyAccessible(true);
<%if(set_public_ip_address) {%>
request_<%=cid%> = request_<%=cid%>.withElasticIp(<%=elastic_ip%>);
<%
if(new Integer(node_count) > 1){
%>
.withNumberOfNodes(<%=node_count%>)
<%
} else {
%>
.withClusterType("single-node")
<%
}
%>
//advanced settings
<%if(parameterUtil.isValid(parameter_group_name)) {%>
.withClusterParameterGroupName(<%=parameter_group_name%>)
<%}%>
<%if(parameterUtil.isValid(subnet_group_name)) {%>
.withClusterSubnetGroupName(<%=subnet_group_name%>)
<%}%>
<%
} else {
%>
request_<%=cid%> = request_<%=cid%>.withPubliclyAccessible(false);
<%
}
%>
<%if(parameterUtil.isValid(availability_zone)) {%>
request_<%=cid%> = request_<%=cid%>.withAvailabilityZone(<%=availability_zone%>);
<%}%>
<%if(parameterUtil.isValid(vpc_security_groupids)) {%>
request_<%=cid%> = request_<%=cid%>.withVpcSecurityGroupIds(<%=vpc_security_groupids%>.split(","));
<%}%>
<%
if(publicly_accessible) {
%>
.withPubliclyAccessible(true)
<%if(set_public_ip_address) {%>
.withElasticIp(<%=elastic_ip%>)
<%}%>
<%
} else {
%>
.withPubliclyAccessible(false)
<%
}
%>
<%if(parameterUtil.isValid(availability_zone)) {%>
.withAvailabilityZone(<%=availability_zone%>)
<%}%>
<%if(parameterUtil.isValid(vpc_security_groupids)) {%>
.withVpcSecurityGroupIds(<%=vpc_security_groupids%>.split(","))
<%}%>
;
com.amazonaws.services.redshift.model.Cluster result_<%=cid%> = client_<%=cid%>.createCluster(request_<%=cid%>);
<%if(isLog4jEnabled) {%>

View File

@@ -21,7 +21,7 @@
if ((metadatas!=null)&&(metadatas.size()>0)) {
IMetadataTable metadata = metadatas.get(0);
if (metadata!=null) {
boolean checkDiskSpace = ("true").equals(ElementParameterParser.getValue(node,"__CHECK_DISK_SPACE__"));
boolean flushOnRow = ("true").equals(ElementParameterParser.getValue(node, "__FLUSHONROW__"));
String flushMod = ElementParameterParser.getValue(node, "__FLUSHONROW_NUM__");
@@ -35,7 +35,7 @@
if (conn.getLineStyle().hasConnectionCategory(IConnectionCategory.DATA)) {
List<IMetadataColumn> columns = metadata.getListColumns();
int sizeColumns = columns.size();
%>
%>
String[] row_<%=cid%>=new String[]{<%for(int j=0;j<sizeColumns;j++){%>"\\N",<%}%>}; //empty value must be NULL('\N' in bulk file)
<%
for (int i = 0; i < sizeColumns; i++) {
@@ -64,24 +64,10 @@
%>
row_<%=cid%>[<%=i%>] = <%=conn.getName() %>.<%=column.getLabel() %>;
<%
}else if(javaType == JavaTypesManager.DATE && pattern == null){
%>
row_<%=cid%>[<%=i%>] = FormatterUtils.format_Date(<%=conn.getName() %>.<%=column.getLabel() %>, "yyyy-MM-dd");
<%
}else if(javaType == JavaTypesManager.DATE && pattern != null){
if(pattern.length() > 12){
%>
row_<%=cid%>[<%=i%>] = FormatterUtils.format_Date(<%=conn.getName() %>.<%=column.getLabel() %>, "yyyy-MM-dd HH:mm:ss");
<%
}else if(pattern.length() == 12 || "\"\"".equals(pattern)) {
%>
row_<%=cid%>[<%=i%>] = FormatterUtils.format_Date(<%=conn.getName() %>.<%=column.getLabel() %>, "yyyy-MM-dd");
<%
}else {
%>
row_<%=cid%>[<%=i%>] = FormatterUtils.format_Date(<%=conn.getName() %>.<%=column.getLabel() %>, <%=pattern%>);
<%
}
}else if(javaType == JavaTypesManager.DATE){
%>
row_<%=cid%>[<%=i%>] = FormatterUtils.format_Date(<%=conn.getName() %>.<%=column.getLabel() %>, <%=(pattern != null && !("\"\"").equals(pattern)) ? pattern : "\"yyyy-MM-dd\""%>);
<%
}else if(javaType == JavaTypesManager.BYTE_ARRAY){
%>
row_<%=cid%>[<%=i%>] = java.nio.charset.Charset.forName(<%=encoding %>).decode(java.nio.ByteBuffer.wrap(<%=conn.getName() %>.<%=column.getLabel() %>)).toString();