You are not logged in.

Unanswered posts



Important! This site has been replaced. All content here is read-only. Please visit our brand-new community at https://community.talend.com/. We look forward to hearing from you there!



#1 2012-10-05 16:16:48

Fedor
Member
83 posts

Fedor said:

[resolved] save output in run-window to txt file

Hi All

Can I save output in run-window to txt file ?

Try to do it through Stats&logs settings
but only statistics gathered (may be also log)

2012-10-05 18:10:28;TCd7dK;TCd7dK;TCd7dK;6132;THINKBI_DEV;j_java01;_b-_1UA4iEeKoMfxGjj3v1A;0.1;Default;;begin;;

and I need full output
including logrow and print in java

Offline

#2 2012-10-08 08:43:37

shong
Talend Team


shong said:

Re: [resolved] save output in run-window to txt file

Hi
Logrow? The message printed by tLogRow component? If so, you can use tFileOutputDelimited instead of tLogRow to output the result into file.


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the global leader of open source data management and application integration solutions!

Offline

#3 2012-10-08 13:20:18

Fedor
Member
83 posts

Fedor said:

Re: [resolved] save output in run-window to txt file

shong wrote:

Hi
Logrow? The message printed by tLogRow component? If so, you can use tFileOutputDelimited instead of tLogRow to output the result into file.

Hi Shong
Thanks for answer

All I need now - is to have same log as in Run window in txt file

Parent job calls  many child job  (in cycle)  and I need common log of whole work
same as it in Run window

Now it runs manually from Talend (in future seems it will not be so)

Logrow needed but it is not as important as System.out.println() - the Most important now
Is it possible to direct output in Run window simultaneously in txt file ?

Offline

#4 2012-10-08 15:16:28

shong
Talend Team


shong said:

Re: [resolved] save output in run-window to txt file

Hi
I understand you now. But it is impossible to log all the message printed on the console to a file. If the log message captured by tStatCatcher does not meet your need. Usually, we customize the log message with tFixedFlowInput and append them into an existing log file. such as "The job begin to run, the start time is:"+TalendDate.getCurrentDate()


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the global leader of open source data management and application integration solutions!

Offline

#5 2012-10-08 16:26:26

brandon_stubbs93
Member
168 posts

brandon_stubbs93 said:

Re: [resolved] save output in run-window to txt file

Hi

if your running the job on a linux machine you could edit the shellscripts that runs the job to write all messages on the console into a .txt file?

java -Xms256M -Xmx256M -cp classpath.jar: repo.jbname.jbname --context=Default "$@" > /consoleoutput/example.txt

Regards,
Brandon

Offline

#6 2012-10-09 14:37:43

Fedor
Member
83 posts

Fedor said:

Re: [resolved] save output in run-window to txt file

brandon_stubbs93 wrote:

Hi

if your running the job on a linux machine you could edit the shellscripts that runs the job to write all messages on the console into a .txt file?

java -Xms256M -Xmx256M -cp classpath.jar: repo.jbname.jbname --context=Default "$@" > /consoleoutput/example.txt

Regards,
Brandon

Thanks
I run it now from Talend on Windows PC
is there syntax for Window ?

ps Talend is installed on Linux
but I coonecr from W7 PC station

Offline

#7 2012-10-09 14:39:41

Fedor
Member
83 posts

Fedor said:

Re: [resolved] save output in run-window to txt file

shong wrote:

Hi
I understand you now. But it is impossible to log all the message printed on the console to a file. If the log message captured by tStatCatcher does not meet your need. Usually, we customize the log message with tFixedFlowInput and append them into an existing log file. such as "The job begin to run, the start time is:"+TalendDate.getCurrentDate()

Thanks for answering
tFixedFlowInput is workaround
but I can't change now ALL jobs - (some of them are not mine just called from main job)

Offline

#8 2013-04-26 19:00:12

brazabr
Member
30 posts

brazabr said:

Re: [resolved] save output in run-window to txt file

Sorry for bring this topic up, but in fact I had same issue in the past and I wrote a component that does the trick.

It allows you to redirect all the output from System.out and/or System.err to files on disk.

Check it here:
tRedirectOutput
http://www.talendforge.org/exchange/ind … ction=view

Last edited by brazabr (2013-04-26 19:01:04)

Offline

#9 2013-05-02 13:36:52

Fedor
Member
83 posts

Fedor said:

Re: [resolved] save output in run-window to txt file

Thanks
I now work with
TAkend NOW
- but some guyas DO it - so I will send them

Offline

#10 2013-05-03 07:19:43

shong
Talend Team


shong said:

Re: [resolved] save output in run-window to txt file

brazabr wrote:

Sorry for bring this topic up, but in fact I had same issue in the past and I wrote a component that does the trick.

It allows you to redirect all the output from System.out and/or System.err to files on disk.

Check it here:
tRedirectOutput
http://www.talendforge.org/exchange/ind … ction=view

Hi brazabr

I have trying to test your component tRedirectOutput and it does not redirect the log message to a text file, it seems the component don't generate any Java code in the job generated code, am I missing something?  Can you share a demo job?
Shong
mini_108031_1.png


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the global leader of open source data management and application integration solutions!

Offline

#11 2013-05-03 13:31:19

brazabr
Member
30 posts

brazabr said:

Re: [resolved] save output in run-window to txt file

Hi shong,

Please check attached image. You need to execute tRedirectOutput as first component or use a PreJob like I did.

Best,
Thiago Benvenuto
mini_108078_tRedirect.jpg

Last edited by brazabr (2013-05-03 13:31:40)

Offline

#12 2013-05-03 15:28:06

shong
Talend Team


shong said:

Re: [resolved] save output in run-window to txt file

Hi Thiago

Thanks for your demo job, I test and it works fine. Well,  I have the following suggestion about this component, it may make the component more useful in real case.
1. Add the append option to this component.
2. Add the job execution time before the log message, and the job end time after the log message

Shong


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the global leader of open source data management and application integration solutions!

Offline

#13 2013-05-03 17:44:59

brazabr
Member
30 posts

brazabr said:

Re: [resolved] save output in run-window to txt file

Hi Shong,

Thanks for your feedback.

I'll add the "append" option as well as an option to output the start time of the job.

I don't know how to write my component in a way I can bind to some kind of event or action in the end of the job to display the execution time. Also don't think this is a problem because the component tChronometerStop can do this trick well. It will output to the console the execution time and other things, which will be redirect properly to the file.

Offline

#14 2013-05-03 17:58:00

brazabr
Member
30 posts

brazabr said:

Re: [resolved] save output in run-window to txt file

I updated the component with the options suggested by Shong. Thank you man.

Feel free to suggest other additions if you think it may help others.

You can download it here:
http://www.talendforge.org/exchange/ind … ction=view

Check attached image for the new options.
mini_108102_tRedirect2.jpg

Offline

#15 2013-05-04 10:07:33

shong
Talend Team


shong said:

Re: [resolved] save output in run-window to txt file

Hi Thiago

I tested your new component and find the following problem:
If I check both 'Append system.out output' and 'Append system.error output' option, the job start time appears two times. For example:

the job starts at: 2013-05-04 17:02:43
the job starts at: 2013-05-04 17:02:43
1|shong
Exception in component tFileInputDelimited_1
java.lang.NumberFormatException: For input string: "a"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
	at java.lang.Integer.parseInt(Integer.java:449)
	at java.lang.Integer.parseInt(Integer.java:499)
	at routines.system.ParserUtils.parseTo_int(ParserUtils.java:87)
	at routines.system.ParserUtils.parseTo_Integer(ParserUtils.java:94)
	at community.tredirectoutputdemo_0_1.tredirectOutputDemo$1RowHelper_tFileInputDelimited_1.valueToConn(tredirectOutputDemo.java:539)
	at community.tredirectoutputdemo_0_1.tredirectOutputDemo.tFileInputDelimited_1Process(tredirectOutputDemo.java:588)
	at community.tredirectoutputdemo_0_1.tredirectOutputDemo.runJobInTOS(tredirectOutputDemo.java:1102)
	at community.tredirectoutputdemo_0_1.tredirectOutputDemo.main(tredirectOutputDemo.java:954)
[statistics] disconnected

To me, I would like to have only one 'append' option both for system.out and system.err output. If I check the 'append' option, all the log message, including system.out and system.err output will be redirected and appended to an existing file.

In addition, you can add the 'create directory if not exists' option to tRedirectOutput component, refer to tFileOutputDelimited component.


Shong
mini_108119_1.png


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the global leader of open source data management and application integration solutions!

Offline

#16 2013-07-05 15:08:46

Fedor
Member
83 posts

Fedor said:

Re: [resolved] save output in run-window to txt file

Hi Everybody
I was a topic starter (really surpirised that I can't ctach output in txtx file - for test purposes
If complex job failed - imho it is really must have information - to find quickily where error happened
)

in New project seems we are going to use Talend
?1) Does this component included Now in Talend
?2) Does somebody use it now ?


ps Check - on 5.2 - seems OK
see in description : 5.0.2, 5.1.0, 5.1.1, 5.1.2, 5.1.3, 5.2.0, 5.2.1, 5.2.2, 5.3.0

Latest version is 5.3.1 - does it mean it will not work with it (or just it is Not tested yet) ?

pps
@brazabr - RESPECT  - GOOD JOB !!  smile
I m DB programmer - so Java is my weakest point
seems it is good to have this skill when working with Talend

@Shong - desicion is up yo you - but this functionality is good candidate to include in standart components

Last edited by Fedor (2013-07-05 16:22:02)

Offline

#17 2013-07-08 10:45:56

shong
Talend Team


shong said:

Re: [resolved] save output in run-window to txt file

Hi Fedor

Glad to see you come back to your topic near one year later.;)

This component is not included in Talend now, but I agree with you that this component is very useful, we will consider to add it to Talend components family in future.

I am sure this component do also works in v5.3.1, brazabr don't update the extension on Talend Exchange yet.

Shong


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the global leader of open source data management and application integration solutions!

Offline

#18 2013-10-07 08:34:37

rogierlommers
Member
136 posts

rogierlommers said:

Re: [resolved] save output in run-window to txt file

Here's an email from brazabr; I asked him about redirect to a variable:

To achieve your needs we would require a new component, It may be possible
but it would work a little bit different than what you want. The redirection of outputs
can only be done to Streams, not to Variables. In this case we would need to open a
memory stream and expose some fake Talend variables in the component for you to
get the content logged so far.

To achieve what you need I strongly suggest to write a "top" job and put the main
logic inside a subjob. This subjob would use the component to redirect the output to a
file. Then you read the file in the top job, after returning from subjob, and email the
result. This way you avoid access problems trying to read the stream while the program
could be trying to write to it. This is the way I use this component to notify my team of
errors in ETL jobs with this component.

Hope this can help you.

Last edited by rogierlommers (2013-10-07 08:36:04)

Offline

#19 2013-11-21 17:43:40

MayerElyashiv
Member
14 posts

MayerElyashiv said:

Re: [resolved] save output in run-window to txt file

Thank you brazabr, i was very helped by your Components.

For those who needs them i was helped with tPreJob and how to add a Component (becouse i wasn't able to use the Exchange feature) here:

http://deepinopensource.blogspot.it/201 … -open.html
http://www.talendforge.org/forum/postga … name=1.png
https://help.talend.com/display/TalendC … EN/tPrejob

Offline

#20 2014-02-14 12:23:49

reut.cz
Member
1 post

reut.cz said:

Re: [resolved] save output in run-window to txt file

shong wrote:

Hi Fedor

Glad to see you come back to your topic near one year later.;)

This component is not included in Talend now, but I agree with you that this component is very useful, we will consider to add it to Talend components family in future.

I am sure this component do also works in v5.3.1, brazabr don't update the extension on Talend Exchange yet.

Shong

Hello all, hi Shong.
Is the component availble now?
I'm new in Talent and I will defiantly be happy to use it.
Thanks.

Offline

#21 2014-02-16 13:38:47

jlolling
Member
3186 posts

jlolling said:

Re: [resolved] save output in run-window to txt file

Hi shong

I do not agree with you in the matter of redirecting the standard output to file as component.
I would suggest to integrate a fully up-to-date Log4J in Talend.
This would be much more helpful because we are very flexible. Unlike no it is a mess to switch debugging output on without changing the job.

Cheers
Jan

Last edited by jlolling (2014-02-16 13:39:22)


Talend Certified working for cimt objects AG in Berlin

Offline

#22 2014-02-17 20:09:45

rogierlommers
Member
136 posts

rogierlommers said:

Re: [resolved] save output in run-window to txt file

Totally agree, full Log4J integration would be perfect and allows us to redirect to whatever we want, in whatever format we want.

Offline

#23 2014-09-08 09:38:50

Roberto Gonzalez
Guest

Roberto Gonzalez said:

Re: [resolved] save output in run-window to txt file

I'm trying to use 'tRedirectOutput' and it is not working fine for me. I can't redirect the "System.setOut" or "System.setError" to another file that is not the default configuration file defined in the component:

  • Exception in component tRedirectOutput_1

  • java.io.FileNotFoundException: /talend/opt/talend-jobs/ESPThunderheadBatchInput/C:/Talend/components/out (No such file or directory)

That path is defined in the component as "__COMP_DEFAULT_FILE_DIR__" and I'm trying to use a context variable that is being ignored.

Any idea? Any comment?

Btw: I'm using version 0.2 of the component.

#24 2014-09-08 10:35:32

Roberto Gonzalez
Guest

Roberto Gonzalez said:

Re: [resolved] save output in run-window to txt file

Roberto Gonzalez wrote:

I'm trying to use 'tRedirectOutput' and it is not working fine for me. I can't redirect the "System.setOut" or "System.setError" to another file that is not the default configuration file defined in the component:

  • Exception in component tRedirectOutput_1

  • java.io.FileNotFoundException: /talend/opt/talend-jobs/ESPThunderheadBatchInput/C:/Talend/components/out (No such file or directory)

That path is defined in the component as "__COMP_DEFAULT_FILE_DIR__" and I'm trying to use a context variable that is being ignored.

Any idea? Any comment?

Btw: I'm using version 0.2 of the component.

You can ignore my previous comment. It was another process running at the same time, that was creating the chaos.

#25 2015-08-06 16:28:20

balu2124
Member
2 posts

balu2124 said:

Re: [resolved] save output in run-window to txt file

Hi,
I am trying to download tRedirectOutput component from the link provided above. Download generated one file tRedirectOuput without any extension. Is it a ZIP file? or Do I need to use any software to extract this? Can any one let me know how to open this please?
Sorry this might be basic query but this is the first time I am downloading a new component.
Thanks in advance for your help!
Please see the file that is downloaded.

Offline

Board footer

Talend Contributor Agreement - Talend Website Privacy Policy