Copy of Component writes header but no rows

Highlighted
Nine Stars

Copy of Component writes header but no rows

Hi Group,

 

I created my first component.  It's just a copy of tPostgresqlOutputBulk called myPostgresqlOutputBulk, with no changes at this point.  I published it using the component designer.  Then added it to a test job, along with the original component.  They should product the same results at this point, but the custom component creates a header with no rows.  Any suggestions?  I'm on 6.4 TOS.  

 

Here's the Job:

2020-03-30_9-14-56.png

Output from copy of component:

id first last

 

Output from original

id first last
"cmUKXP" "HF4Siy" "rPd686"
"tnJywb" "sld1O4" "AscYHD"
"58b5fE" "0N6PYi" "idMch2"
"8xVIJT" "m1kecB" "txIcBQ"
"lsHLZ8" "jc4EIF" "kGGhGX"
"mBSj0C" "VdmigW" "OzHrHQ"
"jDFp7S" "HTNldo" "HosVQh"
"qLIHFS" "30qYzR" "AdZsis"
"LxFKit" "9aaURM" "AWsXMK"
"kOlb36" "VoQ23I" "qqOsB1"


Accepted Solutions
Highlighted
Nine Stars

Re: Copy of Component writes header but no rows

Anyone with thoughts?  It's strange.  When I run in debug, code is generated for the "begin" and "finally" sections.  But the "main" code is missing.  The main file is there, with it's code, but it's not generated.  I only get:

 

/**
* [mPostgresqlOutputBulk_1 main ] start
*/

currentComponent = "mPostgresqlOutputBulk_1";

tos_count_mPostgresqlOutputBulk_1++;

/**
* [mPostgresqlOutputBulk_1 main ] stop
*/

View solution in original post

Highlighted
Nine Stars

Re: Copy of Component writes header but no rows

Ok, I figured it out.  

 

The original Talend component main.javajet file had this line:

 

<%@ include file="../templates/Log4j/Log4jFileUtil.javajet"%>

 

The fix was to change this to:

 

<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/Log4j/Log4jFileUtil.javajet"%>

View solution in original post


All Replies
Highlighted
Moderator

Re: Copy of Component writes header but no rows

Why you want to create bulk component, which is already available?
Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.
Highlighted
Nine Stars

Re: Copy of Component writes header but no rows

It is not possible to write an empty string with the provided component.  Also, I want to learn about component development.

Highlighted
Moderator

Re: Copy of Component writes header but no rows

OK.
Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.
Highlighted
Nine Stars

Re: Copy of Component writes header but no rows

Anyone with thoughts?  It's strange.  When I run in debug, code is generated for the "begin" and "finally" sections.  But the "main" code is missing.  The main file is there, with it's code, but it's not generated.  I only get:

 

/**
* [mPostgresqlOutputBulk_1 main ] start
*/

currentComponent = "mPostgresqlOutputBulk_1";

tos_count_mPostgresqlOutputBulk_1++;

/**
* [mPostgresqlOutputBulk_1 main ] stop
*/

View solution in original post

Highlighted
Nine Stars

Re: Copy of Component writes header but no rows

Ok, I figured it out.  

 

The original Talend component main.javajet file had this line:

 

<%@ include file="../templates/Log4j/Log4jFileUtil.javajet"%>

 

The fix was to change this to:

 

<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/Log4j/Log4jFileUtil.javajet"%>

View solution in original post

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now