Five Stars

FileOutputDelimited writes to a wrong file

Hi,

I once more need help with a Talend Job Im writing. The Task of it is to check if certain Files are in a directory, rename those and to write a log.txt if there are any problems. The log is written by a tFileOutputDelimited with informations given by a tJavaRow-Code. After testing the Job Ive run into a big and for me strange Problem. Lets say there are 3 Statements to be written in the log (a, b and c). The log in the end contains only b and c, while a is missing. Its always the first one that is not there, the other are normally written to the log in the exact directory. By Accident Ive found the missing Statements on my desktop in a File called "testnull.dat" where the Job has written all the missing statments from the last 2 days I tested this Job.

I really have no clue how to solve this or where it could come from. I hope I could explain my problem properly. If there are any additional informations needed, I will try to provide them.

1 ACCEPTED SOLUTION

Accepted Solutions
Seventeen Stars

Re: FileOutputDelimited writes to a wrong file

Do you mean the output is wrong or the component fills a wrong file (e.g. the wrong path + file name)?

What you cannot do is to use a value from the flow and use it as output file name.

The output file will be created tight at the start of the process just at the first iteration between tFileList and the 2 component.

15 REPLIES
Six Stars

Re: FileOutputDelimited writes to a wrong file

Hi Bamsen..

 

Before writing into delimited file just check with tLogRow .

Five Stars

Re: FileOutputDelimited writes to a wrong file

I already have a TlogRow before the output and i can see nothing suspicious.

Six Stars

Re: FileOutputDelimited writes to a wrong file

Send your screen shots I will look once
Five Stars

Re: FileOutputDelimited writes to a wrong file

So this is how my Job looks likeSo this is how my Job looks likeAnd this is the tLogRow, logfile is the name of the log (Timestamp), output is the String written to the log and fall is just the case, just something for testingAnd this is the tLogRow, logfile is the name of the log (Timestamp), output is the String written to the log and fall is just the case, just something for testing

Six Stars

Re: FileOutputDelimited writes to a wrong file

Use another one logrow after the delimitedfile .If it's give same log output ..The problem may be in schema of our delimited file.

Five Stars

Re: FileOutputDelimited writes to a wrong file

Ive tried your suggestion, the new tLogRow prints the same as the one in front of the FileOutputDelimited. 

Six Stars

Re: FileOutputDelimited writes to a wrong file

check your schema of logrow and delimitedfile..

 

if you pass three values you must have three fields in schema.Capture.PNG

Five Stars

Re: FileOutputDelimited writes to a wrong file

Unbasdfsadsfgdsfghngfdresrfghjgretghjkuzrtehjenannt.png

all the fields are in every schema :/

Six Stars

Re: FileOutputDelimited writes to a wrong file

Check your column value contain any delimited character?

Your input values to delimited file must not contain specified delimited character. 

Five Stars

Re: FileOutputDelimited writes to a wrong file

Im sorry, but i dont understand what you mean? what should i check?

Six Stars

Re: FileOutputDelimited writes to a wrong file

Capture.PNG

Your input column (logfile,output,fall) values (which you got in logrow output)  to the delimited file must not contain that 'Field Separator' character. In this case you may get problem.

Five Stars

Re: FileOutputDelimited writes to a wrong file

ive made some changes so that what you meant shouldnt happen. But i still got the same problem... Thank you anyway!

Seventeen Stars

Re: FileOutputDelimited writes to a wrong file

Do you mean the output is wrong or the component fills a wrong file (e.g. the wrong path + file name)?

What you cannot do is to use a value from the flow and use it as output file name.

The output file will be created tight at the start of the process just at the first iteration between tFileList and the 2 component.

Five Stars

Re: FileOutputDelimited writes to a wrong file

Hey,

I´ve just read your comment (weekend Smiley Wink ). Now I understand what is going wrong. As you described, I´m using a variable from the process for the created File, so this seams to be the problem. Thank you! Now I can think of how I can avoid this Problem

Moderator

Re: FileOutputDelimited writes to a wrong file

Hello,

Can we consider this topic as "Solved"? Feel free mark solution as accepted if this solution is OK with you.

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.