Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
user_kmt
Contributor
Contributor

check the file corresponds well to the data in using the period in the file name and the period in it

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

Labels (1)
  • v7.x

3 Replies
Anonymous
Not applicable

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.

0683p000009M6gw.png

 

0683p000009M6h1.png

 

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 🙂

user_kmt
Contributor
Contributor
Author

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.

 

 

 

Anonymous
Not applicable

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 🙂