Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

error in regex expression for filemask

Hi Team,

 

I am getting files from sftp location in the format "radar_data-summary_6438953.json".

I am given a regular expression in the filemask as "radar_data_summary_64" + "\\d{5}.json" but this is not working at all.

 

Could anyone please help me out in this.

 

I have attached my flow and component settings for tFTPGet_1 .

Labels (3)
1 Solution

Accepted Solutions
akumar2301
Specialist II
Specialist II

sorry you misunderstood , Try this It works for me

 

"radar_data-summary_64" + "\\d{5}.json"

View solution in original post

10 Replies
DataTeam1
Creator
Creator

Try this:

radar_data-summary_64\d{5}\.json

Anonymous
Not applicable
Author

Hi DataTeam,

 

I am given the same expression as you have told me its saying me this error.

 

I am given "radar_data-summary_64\d{5}\.json" in filemask.

 

 


error.JPG
akumar2301
Specialist II
Specialist II

small error

 

radar_data-summary_6438953.json

"radar_data_summary_64"+ "\\d{5}.json"

this should work 

 

"radar_data-summary_64"+ "\\d{5}.json"

 

Anonymous
Not applicable
Author

Hi Abhishek,

 

Its not working can you please correct it.

I dont understand I have given as "radar_data_Summary_64+ "\\d{5}.json" ."s" of summary I make it as capital but it's still not working

akumar2301
Specialist II
Specialist II

sorry you misunderstood , Try this It works for me

 

"radar_data-summary_64" + "\\d{5}.json"

Anonymous
Not applicable
Author

Hi Abhishek,

 

I have given you the flow of mine and attached the screenshot for the same.

 

I am using tFTPFileList_1 and tFTPGET_1 components I am given the filemask in both the places which you have told me Please tell me did I am doing correctly If not please correct me?


error_1.JPG
akumar2301
Specialist II
Specialist II

ideally you do not need File Mask in tFTPget if you are using tFtpList.

 

you could use ((String)globalMap.get("tFtpList_1_CURRENT_FILE")) as File Mask and 

((String)globalMap.get("tFtpList_1_CURRENT_FILEDIRECTORY")) as Remote Directory

 

or Follow below link 

 

https://help.talend.com/reader/KxVIhxtXBBFymmkkWJ~O4Q/kJcGMedMkLi95gzJlsX3YQ

DataTeam1
Creator
Creator

As @uganesh wrote this is proper: "radar_data-summary_64\\d{5}.json"

 

I've checked it in tFileList

Anonymous
Not applicable
Author

Hi DataTeam and Abhishek,

 

Now my flow is working completely fine.

 

Can anyone please tell me now I have 100 files few files are different now I gave this regex how can I see these files listed which component I have to use after tFTPGet component to see the filter files as with regex

I will be really thankful to you