[resolved] writing to a txt file

One Star

[resolved] writing to a txt file

I need a component to write messages/info to separate text files.
For example, writing error messages to a txt log file and warning to a different log file.
Can anyone help me please?

Accepted Solutions
One Star

Re: [resolved] writing to a txt file

Then you have not tried e.g. the tFileOutputDelimited or tFileOutputPositional
regards,
Walter

All Replies
One Star

Re: [resolved] writing to a txt file

Hi
Maybe what you need is tLogCatcher.
There are three options on this component: Catch Java Exception, Catch tDie, Catch tWarn.
If you want to do this separately, put two tLogCatcher in your job.
The first tLogCatcher: only check "Catch Java Exception". Then link it with output component.
The second tLogCatcher: only check "Catch tWarn". Then link it with output component.
I hope the error and warning you mentioned is Java Exception and tWarn..
Regards,
Pedro
One Star

Re: [resolved] writing to a txt file

Hi Pedro,
Thanks for your quick response!
But the problem is that if i use a tLogCatcher, i cannot specify the name of a txt file to which i want to output the warnings.
I want to be able to specify the txt file names and be able to output warnings to a txt file named warning.txt and output the errors to a txt file named errors.txt.
kind regards.
One Star

Re: [resolved] writing to a txt file

Hi
But you can.
tLogCatcher_1(only check "Catch Java Exception") --main-->tFileoutput_1(error.txt)
tLogCatcher_2(only check "Catch tWarn") --main-->tFileoutput_2(warning.txt)
Regards,
Pedro
One Star

Re: [resolved] writing to a txt file

can you please tell me which component i must use to output in the format .txt?
because among the tFileOutputXXXX components i have access to on talend, none output in the .txt format.
thanks.
One Star

Re: [resolved] writing to a txt file

Then you have not tried e.g. the tFileOutputDelimited or tFileOutputPositional
regards,
Walter
One Star

Re: [resolved] writing to a txt file

Thanks it works!

2019 GARNER 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

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Agile Data lakes & Analytics

Accelerate your data lake projects with an agile approach

Watch