Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
GheZaide
Contributor
Contributor

Read and Write to the Same CSV file Possible ?

0695b00000EboAQAAZ.png 

if i read and write to the same filename it is giving 0 rows

but if i write on a new file it's working

UseCase: csv1 = holds the initial value Date >>> after run the csv1 should have the updated value Current RunDate

 

if i disable the tFileOutput for the meantime i am seeing the expected value

or if i assign it to a new file

 

Labels (2)
1 Reply
Anonymous
Not applicable

Hi

The tFileOutputDelimited will create an empty file with the same file name before the file is read, that's why 0 rows are read from the file, about the code generation model, you can refer to this page on Talend Help Center.

 

As a workaround, cache the data into memory and read the data back in next subjob, eg:

tFileInputDelimited--tJavaRow--tHashOutput

|onsubjobok

tHashInput--main--tFileOutputDelimited.

 

Regards

Shong