Delete HDFS File Based on Creation Date

Delete HDFS File Based on Creation Date

Good morning,
I'm attempting to delete files from a HDFS directory based on creation date.  I'm using something similar to the solution found here: 
My problem is rather than using tFileList/tFileDelete, I need to use tHDFSList/tHDFSDelete.  However tFilterRow does not connect to tHDFSDelete.
I'm somewhat of a novice in Talend, teaching myself little by little.  Any help or ideas on how I can change this flow to work is greatly appreciated!
Moderator

Re: Delete HDFS File Based on Creation Date

Hi,
The tfilterrow component requires an output component. Could you please try this work flow to see if it is Ok with you?
tHDFSConnection-->tHDFSList-->tHDFSProperties-->tMap-->tFilterRow-->tfileoutputxxx-->tHDFSDelete
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.
Highlighted
Ten Stars

Re: Delete HDFS File Based on Creation Date

If the output of tFilterRow is the list of files to delete, inserting a tFlowToIterate between it and tHDFSDelete should let you loop over the files and delete each one.

Tutorial

Introduction to Talend Open Studio for Data Integration.

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.