One Star

[resolved] Deleting S3 file iteratively

Hi 
I have a requirement of deleting a S3 bucket but that bucket is not empty.So how i can delete that bucket by iteratively deleting object under this bucket using tS3Delete component and then deleting the bucket using tS3BucketDelete.
With Regards
Sanjay BD
6 REPLIES
Four Stars

Re: [resolved] Deleting S3 file iteratively

hi Sanjay,
In following scenario, use tS3Delete in place of tLogRow and with OnSubjobOk from root component you can use tS3BucketDelete.
https://help.talend.com/search/all?query=tS3List&content-lang=en
Have you tried above?
Thanks
Vaibhav
One Star

Re: [resolved] Deleting S3 file iteratively

Hi sanvaibhav
Thanks for your reply,I have already gone through it,done what you have specified but it doesn't help as you can't connect tS3Delete from tIterateToFlow as a main component,so i tried to connect it through "on component ok",but it didn't help me.I want to delete each file in a folder along with folder(if any) dynamically.How i should pass file name coming through iterate to tS3Delete so as it delete each file one by one.How i use global variable in that case.
Moderator

Re: [resolved] Deleting S3 file iteratively

Hi,
Have you tried work flow like:
tS3list---iterate---tS3Delete
---OnSubjobOK---tS3BucketList
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: [resolved] Deleting S3 file iteratively

Hi xdshi 
I have tried that but no success.I have explained in my previous post what i followed.Please go through it again and provide me solution.
With Regards
Sanjay BD
One Star

Re: [resolved] Deleting S3 file iteratively

Hi 
I got the solution.I did same as explained by xdshi and in tS3Delete component i provided key name using global variable and it works like charm.It first deleted file and then deleted bucket.
Thanks to all of you.
With Regards
Sanjay BD
Moderator

Re: [resolved] Deleting S3 file iteratively

Hi Sanjay BD,
Thanks for your feedback. Could you please mark this post as resolved?

Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.