I want to delete some zip files after my Job completition process. I am taking a Path like "C:/Users/aghosh46/Desktop/SRCFILES" in the context Variable of Parent Job. and Now Passing that Value to ChildJob for File Deletions in tpostjob. Here in tfilelist giving Directory Name as context.FilePath+"/". In tfiledelete using filelist's Global Variable Current Filepath. Strange Part is when tpostjob starting that FileDeletion Child Job is failing saying Filename.zip can not be deleted. Whereas In a testJob without any contexts The Job is deleting the Zip Files.Dont know where I am missing something.
getting error some thing like in attached.One More thing in tfilelist I gave context.filepath+"/" in my testJob. In there also it is working perfectly fine. @shong
Also, if your parent job is passing the directory, it would more than likely pass it using "\" instead of "/." Under advanced settings in the tFileList, check "Format file path to slash(/) style"
From My Parent job Directory passing like Value "C:/Users/aghosh46/Desktop/SRCFILES" which is in context.filepath. Now This will be a user given Path.One More thing In the FileWatcher Component tWaitforFile I am using FilePath as context.filepath+"/" which is working absolutely fine. I have tried using that settings also which U mentioned.I also removed "/" in the tfilelist Directory. Not working still. still that same error is coming
Exception in component tFileDelete_1 (J_CON_NADL_BRAND_EXTRACT_FILEDELETE)
java.lang.RuntimeException: File C:\Users\aghosh46\Desktop\SRCFILES\AVEENO_EMAIL_CAMP_SEND_OPENS_11012017_TO_12312017.zip can not be deleted.
It is taking the slash /, but its printing the actual path recognized by the operating system. The "/" is just a java preference because "\" is an escape character.
@abhi90, you need to verify the the folder/file does have right permessionsto delete from Talend and also can you check that zip folder has not corrupted. just for your information,you need to configure below way.
Yes when I am testing in my test job there it's perfectly working fine. Even I tried the same context settings and everything.There it is perfectly working fine.
Yes You are right. This is a Bug. when I connected it to my tpostjob of my TestJob It failed again. Where as FilePath is printing.
Please let me know How to open this Issue in Bugtracker. I have attached settings,JobLog with this Comments.One More thing I tried tfiledelete in my SubJobs of main Job. There also it is not working.
One More thing add over here.
When I am using tfilelist and tfiledelete in my Parent without creating a ChildJob then after 35 File Deletion same issue is coming in tfiledelete. which should not be the case.
One thing to update over here is,
My Delete Job is working deactivating other Child Jobs keeping old files. But when I am activating the SubJobs the .zip files Talend is creating in runtime tfiledelete is failing only that time.
The files are generating in Runtime(During JobRun) by Talend. The Delete Job should be in PostJob. and My requirement is to delete the .zip files created by Child Jobs Flows in Parent Job. So in tpostjob I have scan that Directory and iterate tfilelist current filepath.
Introduction to Talend Open Studio for Data Integration.
Practical steps to developing your data integration strategy.
Create systems and workflow to manage clean data ingestion and data transformation.