I am trying to delete some json files after they are pushed into ActiveMQ in the below subjob but the files are not getting deleted.
Attached is the screenshot of the talend job please have a look.
Could you please guide me how to solve this.
Did you want to delete json files from your local machine after they are pushed into ActiveMQ or from MQ server?
Please make sure you tick on check box ("Delete File or Folder") in tFileDelete.
Hello @shong ,
After doing the suggested changes still we are unable to delete the files.
Attached is the screenshot after modification.
Please let us know your tfilelist_2 and tfiledelete component setting screenshots.
Could you please try to do tfilelist-->tfiledelete in a child job and the main job calls the child job with option 'independent process' checked to see if it works?
Hello @xdshi ,
I tried the way suggested by you, but this option is still not working for me.
Below are the screenshots of the modified job.
Please have a look.
Are you sure there is no other applications or program are accessing the file at the same time. In this job, only tfileinputRaw component is reading the file, for testing, remove tMOMOutput component from the job to see if tfiledelete can delete the file in the end.
Hello @shong ,
Apologies for the late reply.
I tried the same suggested by you it did not work.
Let me explain the complete scenario:
1] JSON files are created in this particular job by reading an excel.
2] Those JSON files are fetched by tFileOutputRaw -> .. -> tMomOutput
3] Need to delete those JSON files
When the files are sent to tMomOutput the files are consumed by a JMS consumer in our application.
I have made a small configuration change in tFileDelete and selected the Fail on error checkbox.
It gave me the error that I have attached in the attachments, please have a look.
1] So since the files are used by the JMS consumer is the reason to unable to delete those files.
2] I tried changing the directory from [C to D] because due to admin rights if it's not allowing to delete the files but this scenario also didn't worked.
Please guide me how can we achieve this task.
Thanks and Regards,
in tJava Component the logic to read an excel and convert a row into a json file has been written.
After tJava ->onSubJobOk ->tfilelist->tfileinputraw fetches the JSON files created in a folder on the local system and pushes them to a queue.
Talend named a Leader.
Kickstart your first data integration and ETL projects.
Watch the recorded webinar!
Pick up some tips and tricks with Context Variables
Learn how media organizations have achieved success with Data Integration
Learn how and why companies are moving to the Cloud