Post-Processing File Cleanup for Integrations with Flat File connections

To help maintain a secure processing environment and minimize the retention of sensitive data on the Secure Agent server, all Mappings that create or stage files on the Secure Agent should be executed within a Mapping Task and include a Post-Processing Command to remove the file once processing has completed successfully. This practice helps ensure that person data and other sensitive information do not remain on the Secure Agent beyond the lifecycle of the integration job.

When to Use This

Add a Post-Processing Command when:

  • A Mapping creates or stores a file on the Secure Agent (usually with a Flat File connection).
  • The file is only needed during the execution of the Integration.
  • The file can be safely deleted after downstream processing is complete.

Configuration Steps

  1. Open the Mapping Task.
  2. Navigate to Runtime Options.
  3. Locate the Advanced Options section.
  4. In the Post-Processing Commands field, enter a Linux rm command to remove the file after the task completes.

MappingTaskRmFile

Command Format

rm /home/agent/infaagent/apps/agentcore/partner-integrations/<Your Team Folder>/filename.csv

Replace:

  • <Your Team Folder> with your team's assigned folder.
  • filename.csv with the name of the file being generated and processed.

Important Considerations

  • Verify that all downstream processing of the file has been completed before deleting it.
  • Only remove files that are no longer needed by subsequent tasks.
  • Ensure the file path and filename are specified correctly to avoid unintended deletions.

By incorporating this simple cleanup step into your Mapping Tasks, you help maintain a secure, efficient, and well-managed integration environment. If you would like assistance with creation of this command, analyzing where within your integration to place it, or would like a more complex command (for instance, removal of files of a certain age and naming pattern), please feel free to reach out to our team through our service email integration-platform@doit.wisc.edu and we will be happy to assist.



Keywords:
Mapping, Mapping Task, Flat File, Data Security, Secure Agent 
Doc ID:
162662
Owned by:
Becky W. in Integration Platform
Created:
2026-07-15
Updated:
2026-07-21
Sites:
Integration Platform