You can do this using hook_feeds_presave to check the data prior to it being saved.
$item parameter contains the current feed.
Check item on some condition.
To skip an item to being import, use $entity->feeds_item->skip = TRUE;
function mymodule_feeds_presave(FeedsSource $source, $entity, $item) {
// check that this is fired only for the importer being used
if($source->importer->id=='my_custom_feeds_importer'){
if($item['mfgcode'] < '18'){
$entity->feeds_item->skip = TRUE;
drupal_set_message(t("Skipping item", 'warning');
}
}
}
Comments
Post a Comment