You are not logged in.
Announcement
Unanswered posts
|
I knew there was likely a simple solution to this. Thank you very much Shong!
Hello
What I would like is to have the output file look like "File1_Out.xls" or something similar. Is there a way to do this?
Yes, cut the file name via global variable: ((String)globalMap.get("tFileList_1_CURRENT_FILE")), eg:
"D:/file/output/"+((String)globalMap.get("tFileList_1_CURRENT_FILE")).substring(0,((String)globalMap.get("tFileList_1_CURRENT_FILE")).lastIndexOf("."))+".xls"Also, is there a way to output them to a different folder than the input files came from?
Yes, set the output folder dynamically as your file name. eg:
"D:/dynamicFolderName/dynamicFileName.xls", if the folder doesn't exist, it will be created automatically.
Best regards
shong
Hello everyone,
Recently I have been working on (what I have found to be) a very interesting Talend project. I am glad to say that I managed to get a skeleton version of the project completed and working very well! I managed to solve all of my big difficulties, but now I need some help to add the final touches and make it feel like a finished product.
The first job in my project starts with a tFilelist and iterates into tFileInputDelimited (there are 15 files). From this point, the data passes through a tFilterRow and tMap and then it finishes at a tFileOutputExcel (there are some other components that branch off, but they are all in their finished state). The tFileOutputExcel sends the data to 15 separate files (which correspond to the input files).
I have accomplished this by having:
-tFileInputDelimited Filename: ((String)globalMap.get("tFileList_1_CURRENT_FILEPATH"))
-tFileOutputExcel Filename: ((String)globalMap.get("tFileList_1_CURRENT_FILEPATH")) + ".xls"
So if the first file in the filelist was named "File1.dat", the data from this file would be output to a file called "File1.dat.xls". This works, but it is not ideal. I believe that I need to use the same filelist in the output as in the input because the whole idea works on the premise that each complete iteration runs to a separate file, but I could be wrong and am open to alternative suggestions.
What I would like is to have the output file look like "File1_Out.xls" or something similar. Is there a way to do this? Also, is there a way to output them to a different folder than the input files came from?
I haven't posted any pictures of my project because I don't think they would help with this problem. If you would like to see some screenshots let me know and I will post some.
Thank you for taking the time to read this! Best Regards,
Matt