About Feed Import

Feed Import allows to import content into entities (like nodes, users, taxonomy terms, ...)
from various file or database types.

Also can monitor feed items for changes to update imported entities,
can set an expire time to entities to deleted expired ones when cron runs
or can be used as one time import.
All settings can be made from an easy to use interface.

By default, six methods of import (also named readers) are provided by Feed Import:

  1. XML document - import content from XML files using XPATH
  2. XML chunked - import content from huge XML files using XPATH
  3. DOM document HTML/XML - import content from HTML/XML files using XPATH (you can use php functios in xpaths)
  4. SQL query - import content from SQL query result using column names
  5. CSV file - import content from CSV files using column names or indexes (php >= 5.3)
  6. JSON file - import content from JSON files using path to value

If you want to import content from other file types please post a feature request in issue queue or read the tutorial on how to make your own reader.


This version (3.x) is not compatible with 2.x. Please follow this tutorial in order to upgrade from 2 to 3.


The php 5.4 xpath problem was fixed (anyway, the real problem exists in libxml extension, but doesn't affect this module).

I'm looking for co-maintainers (from writing code to provide support on issue queue and writing documentation) to help the development of this module.

Features

  • easy to use interface
  • detailed reports (if enabled)
  • schedule cron import to run only in a specified time interval or from time to time (if enabled)
  • auto-delete expired entities when cron runs
  • protected entities
  • delete protection on source error
  • drush commands
  • import/export feed configuration as JSON
  • groups: multiple feeds can update same entities if belong to same group
  • alternative path support
  • add pre-filters to check if an alternative path is needed
  • add filters for fetched content
  • some useful filters (like save file/image, create taxonomy term, ...)
  • provide an action if no content was fetched, like providing a default value, skipping item, ...
  • static field support for a faster import
  • dynamic created php filter functions (mainly for testing)
  • supports all entity types

Dependencies

This project has no module dependencies. However, having the entity module installed can be useful for some special entities.

How to use Feed Import

First download the module. The folder contains two modules:

  • Feed Import - only provides the UI
  • Feed Import Base - provides all import functionality


When you are in production and don't need the UI you can disable the Feed Import module
(has a lot of menu items, forms, code, ...) and leave enabled only Feed Import Base.

Install the Feed Import module and go to Administer settings >> Web serices >> Feed Import
(admin/config/services/feed_import) and you are ready to create your first feed configuration.
But before, you can edit general settings.

Click the "Add feed" link, select a name & entity and save it. You'll be redirected to edit
feed settings. There are four main tabs (anothers can appear if provided by other modules):

  1. Edit feed - edit feed name, entity and other options. Secondary tabs:
    • Feed - same as main tab
    • Processor - select your processor and edit its settings.
      The processors handles entity create/update/save
    • Hash Manager - select your hash manager and edit its settings.
      Hash Managers monitor your items for update/delete/skip
  2. Edit source - select reader type and edit its settings.
    Here you select the file to import
  3. Edit fields - add/remove fields to import. Secondary tabs:
    • Edit fields - same as main tab
    • Re-order fields - change fields order.
      This is very important if you have fields with
      default action as "Skip importing this entity",
      since it can can reduce import time.
      As a simple rule, move these kind of fields to the top
    • Edit static fields - add/remove static fields.
      A static field is not imported from source.
      Useful for specifying bundles (like node type)
      or field properties (like body text format)
  4. Edit filters - add/remove filters. Secondary tabs:
    • Edit filters - same as main tab
    • Edit pre-filters - add/remove pre-filters
    • Dynamic filters - create php function filters from interface
    • Filter settings - change filter settings as param placeholder or included files

Set your desired options and go back to Feed Import menu.
You'll see your feed listed there. Click process to import, and check imported items and reports (if enabled).

For more detailed instructions check the step by step examples.

Project Information

Downloads