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: 
Aish123
Contributor
Contributor

how to delete the files present in the source after they are copied and archived using the tFileArchive component?

Hi,

I am performing a job which takes the input from the Excel file which consists of filepath location.

There are different files present in that location which are getting copied in the different folder.

By using tfileArchive i am archiving the folder and placing that folder in different location. 

 

When all the files from the source folder gets archived i want to delete the files present in the source folder.

Can someone please help me with this task? 

Labels (1)
6 Replies
Anonymous
Not applicable

Hi,

 

    Capture the output of tjavarow (which I assume is the list of files or directory) to a tHashOutput(which stores the data in memory).

 

     Then read the same data using a tHashInput and pass it as parameter to perform the copy.

 

      Once you complete the copy, use a On SubJob Ok and extract the data again using tHashInput but this time, use it as parameter to a tFileList followed by tFileDelete.

 

Note:- Please note to clear the Hash by selecting the check box when you are reading the tHashInput for the last time.

 

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 🙂

Aish123
Contributor
Contributor
Author

Hi,

Can you please create an hierarchy of the flow in job and can paste it here.

It would be really helpful.

Awaiting your response.

Aish123
Contributor
Contributor
Author

Hi,

 

Is there any other way to achieve this task as i do not have "tHash" component in the talend version which i am using.

Anonymous
Not applicable

Hi,

 

    Hash components are available in all Talend version. Please go to File -> Edit Project Properties -> Designer -> Palette and move the Hash components to your available list.

 

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 🙂

Aish123
Contributor
Contributor
Author

Yes. Thank you now i can see tHash components in my pallete.

 

Can you please show the pictorial representation of the job of how you have explained.

This would be really helpful as my new to talend.

Awaiting your response.

 

Anonymous
Not applicable

Hi,

 

   Assuming you are going to store the directory details in Hash, below will be a skeleton solution. You will have to enhance it based on your specific requirement.

 

 

0683p000009M5qy.png

 

Please make sure that you are clearing the hash in the last hashinput call and select the delete directory option in the tFileDelete.

 

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 🙂