Can't write to csv or txt file with tFileOutputDelimited

Six Stars

Can't write to csv or txt file with tFileOutputDelimited

Hi,

I'm trying to read rows from a database table and write them to a csv or txt file. When I execute the job, it tells me that it has retrieved a number of rows (so I suppose it all went well), but then my .csv file is empty.

How can I check if those rows were really retrieved, or where is the problem?

immagine.png


Accepted Solutions
Nine Stars

Re: Can't write to csv or txt file with tFileOutputDelimited

Ok, how about the tLogRow settings and the mapping. Could you show the schema details too.
Also, it seems there are some warnings in your db component, what does it say?

All Replies
Six Stars

Re: Can't write to csv or txt file with tFileOutputDelimited

Hi Mary,

 

Place a tlogrow component between Oracle and fileoutput component, so that you can print what has been retrieved on to the console.'

 

thanks

Ashok 

Moderator

Re: Can't write to csv or txt file with tFileOutputDelimited

Hello,

Please try to click 'Sync columns' buttion on the basic settings of tfileoutputdelimited component to see if it works. This will take automatically the columns of the previous component.

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.
Six Stars

Re: Can't write to csv or txt file with tFileOutputDelimited

 


@ashokvv wrote:

Hi Mary,

 

Place a tlogrow component between Oracle and fileoutput component, so that you can print what has been retrieved on to the console.'

 

thanks

Ashok 


Where can I find the console? I can't see the output anywhere

Nine Stars

Re: Can't write to csv or txt file with tFileOutputDelimited

If you have tLogRow defined in your Talend job which had input flow of data that could be displayed and the job executed successfully then you could view your result here -

tLogRow-1.JPG

Six Stars

Re: Can't write to csv or txt file with tFileOutputDelimited

Ok, in my console what I have is

[statistics] connecting to socket on port 3378
[statistics] connected
*a number of blank lines equal to the number of lines read*
[statistics] disconnected

What does this mean?
Nine Stars

Re: Can't write to csv or txt file with tFileOutputDelimited

It might mean that data is not getting displayed due to incorrect mapping or due to data retrieval issue.
Screenshot of your job layout with the mapping & output would help for better diagnosis.
Six Stars

Re: Can't write to csv or txt file with tFileOutputDelimited

image.png
And this is the output in the console:

Starting job ReadFromTable at 09:54 23/08/2018.

[statistics] connecting to socket on port 3378
[statistics] connected
*798 blank rows*
[statistics] disconnected Job ReadFromTable ended at 09:54 23/08/2018. [exit code=0] 

 

 

Nine Stars

Re: Can't write to csv or txt file with tFileOutputDelimited

Ok, how about the tLogRow settings and the mapping. Could you show the schema details too.
Also, it seems there are some warnings in your db component, what does it say?