• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » [resolved] Drop output file on error

#1 2012-05-17 16:26:48

Spinwing
New member
Registered: 2012-05-17
Posts: 2

[resolved] Drop output file on error

Hello all

newbie question therefore bare with me. I've scanned the docs and the forum with no success.

Scenario:

input excel file, output CSV. The input component will check if the columns are of the expected type. As soon as it reaches a row which does not contain the expected data, it connects with a tDie.  Ascii schema below (very simple)

tFileInputExcel
\ -- main -- tFileOutputDelimited
\ -- reject -- tDie

When the job enters the tDie branch (row rejected) I need to cancel the whole job, in other words delete the output csv. Alternatively I can write to a temp folder and if the job gets to the end without errors, I can to copy the CSV to the final location for another process to pick it up.

I have added a tFileDelete at the end of the tDie, but nothing happens (I suspect file is locked). I also added a subjob with a tLogCatcher and attached the tFileDelete there, with no success as well. Last I tried to attach a tFileCopy to the tFileOutputDelimited, but that was a bad idea because it continuously copy the file while processing.

Therefore I have two questions:
1) How do I drop the file created in case of error? or
2) How can I copy the output at the end of the process in case of no error?

Suggestions, pointers etc very welcome.

Thanks

Last edited by Spinwing (2012-05-17 16:27:51)

Offline

#2 2012-05-17 16:43:47

Spinwing
New member
Registered: 2012-05-17
Posts: 2

Re: [resolved] Drop output file on error

Two hours to find a solution, post on the forum, and two minutes after I posted this message I found myself the solution....anyway....

For the records, create a tFileDelete component and link to the main component with an OnSubjobError.....

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » [resolved] Drop output file on error

Board footer

Powered by FluxBB