Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have multiple files on my main folder and i have to look for two files in it.
file1_140618.csv
file2_140618.csv
Please note that the date in these files keep changing.
What i actually do:
When i check the 1st file, it has to log the information (file_properties) in a file before moving and renaming it to another folder.
The same thing applies to the second file lookup; same step.
At this moment, I am not able to use one filelist because the tfilecopy does not have the regular expression option. And also i will not know which file is being taken into consideration while using ((String)globalMap.get("tFileExist_1_FILENAME")) in the tfilecopy.
Can you suggest how i can optimize this job Or is there a better way to do this?
Thank you.
Best regards,
asadasing
Is there a way to optimize this job; i meaan
A single subjob with tFileList-->tFileProperties-->tFileOutputDelimited-->tFileCopy should be enough.
You should use "tFileList_1_CURRENT_FILEPATH" instead of "tFileExist_1_FILENAME" in tFileCopy (or I miss something).
you can use:
only one tFileList
file path is globalMap.get("tFileList_1_CURRENT_FILEPATH")
tfileexist is not mandatory
onSubjobOk is Better after iterate.
Regards
Thank you for your quick reply.
Lets assume i have to rename the files mentioned as follows:
file1_140618 => client1234abc
file2_140618 => client987xyz
Then what should i put in my tfilecopy >> destination filename?
Where does the target filename come from?
Normally,
i will have only two files:
Client_xxxxx
Address_xxxxx
And my target name should be:
Client_xxxxx => customers_1806181540 (currentDateTime)
Address_xxxxx => Address_1806181540 (currentDateTime)
As at now, i am hard coding both files in the talend interface.