How to Delete a File DQC Reads Data from

Reported for version 10

If you want to accomplish the task of reading an input file, creating an output file and deleting the input file afterwards, workflows provide the functionality of such performance. Workflows allow chaining different atomic actions, e.g. running a plan or polling for a file. Therefore, when you want to delete a file after processing it in DQC, follow the solution below.

  1. Poll for a file using Wait for File Workflow Task to appear in the specified folder, retrying in a given frequency. In the event of a file being placed in the certain directory, continue with the next step.
  2. Call the Run DQC Process Workflow Task which uses the polled file as an input. If expected to have different naming, the name can be parameterized or renamed using additional task between step one and step two. Run DQC Process Task has two possible states it can finish with: SUCCESS or FAILURE. Depending on the state, go to step three or step four respectively.
  3. SUCCESS finish state indicates that the runtime-config.xml file, which is the file of Run DQC Process Task produces, was generated successfully and accordingly. When a SUCCESS state is present, call a Run Shell Script action, which will remove the input file you wish to delete from your specific folder.
  4. FAILURE finish state signifies that there has been an error during the processing. In this case, use a Run Shell Script task which will re-try running DQC Process or log the issue for inspection.

For more information about workflows, go to the corresponding section of Documentation portal.