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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] How to delete multiple files in HDFS?

Hi,
I was trying to delete multiple files using tHDFSDelete by specifying multiple file path seperated by comma(,). but it was not working. Later I saw generated code for tHDFSDelete then I came to know that I can't enter multiple file paths.
Is there any way in Talend to delete multiple files (may be in same or in different directory ) from HDFS?

Thanks,
Bhavesh
Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi
Try to use tHDFSList to literate each file that you want to delete. For example:
tHDFSList--iterate--tHDFSDelete
There is a global variable that stores the current file path on tHDFSList:
(String)globalMap.get("tHDFSList_1_CURRENT_FILEPATH")
Set the file path of tHDFSdDelete with this variable.
Best regards
Shong

View solution in original post

1 Reply
Anonymous
Not applicable
Author

Hi
Try to use tHDFSList to literate each file that you want to delete. For example:
tHDFSList--iterate--tHDFSDelete
There is a global variable that stores the current file path on tHDFSList:
(String)globalMap.get("tHDFSList_1_CURRENT_FILEPATH")
Set the file path of tHDFSdDelete with this variable.
Best regards
Shong