#1 2012-06-03 21:23:51

zetex
New member
Registered: 2012-06-03
Posts: 3

Problem is in converting

1. The problem is in converting p_sb(in).txt file into p_sb(out).txt. file.

2. I create the following project in Talend Open Studio for ESB program.

3. The outcome of this scheme performance is p_sb(err).txt file.

4. The output should be the following format:

-Header

-Segment_1

-Segment_2

          …

-Segment_N

-EndFile

5. However the file of the following structure is created:

-Header

-Segment_1

-Header

-Segment_2

          …

-Header

-Segment_N

-EndFile

6. What is to be done to make "Header" appear only once at the beginning of the file? Probably there is a mistake in tMap module? The separator is used to describe the format of input and output files (as in csv file). The charset is windows-1251 for all the files. Is it possible to use the expressions for getting a row number and counting the total number of rows in module tJavaRow_1?

Offline

#2 2012-06-04 08:15:46

pedro
Member
Registered: 2011-11-17
Posts: 3682

Re: Problem is in converting

Hi

Welcome to Talend Community!

For troubleshooting, please show us the image of your talend job and more details.

Regards,
Pedro


Only Paranoid Survive.

Offline

#3 2012-06-04 10:26:57

zetex
New member
Registered: 2012-06-03
Posts: 3

Re: Problem is in converting

[img]http://s2.hostingkartinok.com/uploads/images/2012/06/1303f4a123d231c56606e855144e442e.jpg[/img]
[img]http://s2.hostingkartinok.com/uploads/images/2012/06/03b9feb55c31a7b9de15fbe99f6a2e53.jpg[/img]

Offline

#4 2012-06-04 10:55:14

pedro
Member
Registered: 2011-11-17
Posts: 3682

Re: Problem is in converting

Hi

You might use a context variable to count row number.
Only add Header when the row number is 1.
In the end, use a subjob to add the Endfile by selecting 'Append' option.

Regards,
Pedro


Only Paranoid Survive.

Offline

Board footer

Powered by FluxBB