Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a list of files and i need to know how can I test on the list of files if the period written in the name of the file corresponds to that in the file.
any help!!
Best regards
Hi,
You will have to use tFileList and tRowgenerator to parse the file names one at a time. You can pass the current file name to trowgenerator as input for further processing.
Once you get the file name, you can do all sort of string validations by passing it to a tMap.
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
hi,
thx for your reply @nthampi but m problem isnt how to get the current file, my problem is how to compare a part of the name current file to data in the file.
for exemple i have 3 files and i use the tfileliste the names of my 3 files are :
1- file1_AAAAMM
2 file 2_AAAAMM
3 file3_AAAAMM
and in each file i have tow column the first is the year and the second is the month . I want to know if the period in the name equals to the two column.
Hi,
You will have to first assign the current value of file to a context variable. Once you get the original file in a context variable, you can parse the date and month part from it and assign them to new context variables. You can then use these context variables for further comparison.
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂