Index: plugins/FeedsDataProcessor.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/feeds/plugins/Attic/FeedsDataProcessor.inc,v
retrieving revision 1.24.2.3
diff -u -p -r1.24.2.3 FeedsDataProcessor.inc
--- plugins/FeedsDataProcessor.inc	16 Nov 2010 21:42:40 -0000	1.24.2.3
+++ plugins/FeedsDataProcessor.inc	16 Feb 2011 23:46:21 -0000
@@ -20,6 +20,12 @@ class FeedsDataProcessor extends FeedsPr
     $inserted  = $updated = 0;
     $expiry_time = $this->expiryTime();
 
+    if ($this->config['purge_existing']) {
+      // Truncate table before saving data.
+      $this->handler()->truncate();
+      drupal_set_message(t('Deleted previous data.'));
+    }
+
     while ($item = $batch->shiftItem()) {
       $id = $this->existingItemId($batch, $source);
 
@@ -233,6 +239,7 @@ class FeedsDataProcessor extends FeedsPr
   public function configDefaults() {
     return array(
       'update_existing' => FEEDS_SKIP_EXISTING,
+      'purge_existing' => FALSE,
       'expire' => FEEDS_EXPIRE_NEVER, // Don't expire items by default.
       'mappings' => array(),
       'delete_with_source' => FALSE,
@@ -257,6 +264,12 @@ class FeedsDataProcessor extends FeedsPr
       '#description' => t('If an existing record is found for an imported record, replace it. Existing records will be determined using mappings that are a "unique target".'),
       '#default_value' => $this->config['update_existing'],
     );
+    $form['purge_existing'] = array(
+      '#type' => 'checkbox',
+      '#title' => t('Purge existing records'),
+      '#description' => t('Purge all existing records before import.'),
+      '#default_value' => $this->config['purge_existing'],
+    );
     $form['delete_with_source'] = array(
       '#type' => 'checkbox',
       '#title' => t('Delete items with source'),
