Skip to content

Data Retention

DQS includes automated data purging to prevent unbounded growth of scan results and error logs. Retention policies are configured via Custom Metadata Types and can be adjusted by administrators.

All retention settings are stored in DQS_Configuration__mdt (Category: “Retention”):

SettingDefaultDescription
Error Log Retention7 daysDays before error logs are deleted
Scan Result Retention30 daysDays before dimension results are purged
Purge Batch Size2,000Records processed per batch chunk
Purge CRON Expression0 0 2 * * ?When the purge job runs (default: daily at 2 AM)

The purge process runs as a chained batch job:

DQS_DataPurgeScheduler (CRON trigger)
└── DQS_ErrorLogPurgeBatch
(deletes error logs where Expires_At <= NOW)
└── DQS_ResultPurgeBatch
(deletes dimension results older than retention window)
└── Cascade: Field Results + Metric Results
(deleted automatically via master-detail relationship)

When a DQS_Dimension_Result__c record is deleted:

  • All child DQS_Field_Result__c records are automatically deleted
  • All grandchild DQS_Metric_Result__c records are automatically deleted

This happens via Salesforce’s master-detail cascade — no additional batch processing is needed.

To change retention periods, edit the values directly from the Configuration panel on the DQS Home page:

Configuration panel on DQS Home — editable default parameters for retention and purge settings

Alternatively, you can update them via Salesforce Setup:

  1. Navigate to Setup → Custom Metadata Types → DQS Configuration
  2. Find the relevant record (e.g., Scan_Result_Retention_Days)
  3. Edit the value
  4. Changes take effect on the next purge run
  • Check the Error Management Console for purge job errors
  • Review DQS_DataPurgeScheduler in Setup → Scheduled Jobs to verify the purge is running
  • Use Salesforce reports to monitor result volume over time