Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi i have a problem and i need help please, first we start with the screenshoots and after i will explain my problem.
so my job is for exctracting from a file lines containing link to another files, to do that i used csplitter and cprocessor, and after getting lines of that file. i want to read or move those files with the second cfile but the problem with the second cfile istead of read the files it writes in those files the body of the first cfile.
second question i want to know if it's possible to pass to the parameter path of cfile a var like "${in.header.path}"
thanks a lot
In which case you will need to identify what you want to do in a cProcessor and set a header for each message (each message after the splitter) to identify what you want to do (read or move). The you will have to use a cRecipientList to pass the message to the required messaging endpoint to read or move the file.
This will be a lot harder to implement than using a cTalendJob, but it is possible.
This might be of use: http://people.apache.org/~dkulp/camel/file2.html
You need to do this in a different way. The cFile components are behaving in exactly the way they are supposed to. Your consumer cFile (the one at the beginning) is reading as you would expect. The producer cFile (the ones at the end) is writing content. If you want to read and move (or read or move) files by the data received from a file, you might want to try using a cTalendJob component and writing a Talend job to do this. This will be far easier.
In which case you will need to identify what you want to do in a cProcessor and set a header for each message (each message after the splitter) to identify what you want to do (read or move). The you will have to use a cRecipientList to pass the message to the required messaging endpoint to read or move the file.
This will be a lot harder to implement than using a cTalendJob, but it is possible.
This might be of use: http://people.apache.org/~dkulp/camel/file2.html
I'm not sure move will be as easy as that. I think you *may* have to read the contents of the file to a new file (in your new location) and then subsequently delete the source file.
that's i did last week and it works fine, also another solution is that we can move files using java code.
thanks a lot rhall and have a nice day.