What is Feeds?
•Pluggable system for importing content into drupal
•Create and update drupal entities
•one-off import and periodic aggregation of data
Common Use Cases
1. Data Migration
1. Import Users
2. Import Nodes
3. Import Taxonomy Terms
2. Data syncing
1.Feed :- A feed can appear in different forms depending on the import stage, before fetching, a feed is
the external document to be fetched(i.e. CSV file. ). After fetching, it is the raw data dump handed to
the parser. After parsing, it is the normalized PHP array that is passed to the processor.
2.Feed item : - individual item(CSV Row),
3.Feed node : - the node created after the import.
4.Mapping : source and target, which tells the importer to map feed item property to node field. A
mapping connects a Mapping Source to a Mapping Target.
5.GUID : Stands for global unique identifier. in feeds there is a unique identifier for each feed item i.e.
a.Comma separated values
b.Feeds allow us to import data into this format
7.For more visit https://drupal.org/node/622710
Migrate Data (For E.g. Nodes)
1.Build a Content Type
2.Create A CSV of required data
3.Build a feed Importer
a.Select Fetcher type (File)
b.Select Parser (CSV file) - Under CSV parser set delimiter
c.Select Processor (Node Processor)
d.Under node processor e.Specify the bundle name (this will get associated with the items which will be imported by this
f.Specify Author name for the imported nodes
g.Under Mapping : - Map the csv fields to the content type field.
h.Save the importer
4.Go to www.yoursite.com/import
5.select the created importer, upload the file and click on import
6.Data will get imported.
Feed hooks can be used to alter mapping target or mapping sources. I think Feed hooks as a point
where the code is paused, and they ask “anyone wants to add something here”, and then resume
again. Any module who replies to it get triggered and data is get processed.
Invoked after a feed source is imported
Invoked after the feed source has been parsed and before process
Alter mapping targets for feed items, this hook can also be used to create custom targets.
Invoked Before a feed item is saved in database.
•Feeds Tamper provides a small plugin architecture for Feeds to modify data before it gets saved.
oMake every letter uppercase, lowercase
oProvide the default value for a field.
oRewrite the output of a field.
•Once Feeds Tamper is enabled, the list of available Feeds importers (admin/structure/feeds) displays
a "Tamper" configuration link for each feed.
•You can create your own plugin
1.Feeds Tamper PHP
b.Provides a tamper plugin for executing php code
1.Feeds Tamper String2Id
b.Adds support for freeform Entityreference linking when using Feeds.
1.Feeds User Picture
b.Provides Target for importing User Pictures while importing users.
Case Study of one of our drupal