Feeds Tamper is an add-on module for Feeds that lets you modify data before it gets saved. It provides numerous plugins to transform the data that Feeds pulls in. See the full list of plugins. Creating new plugins is easy, see the developer docs.

Basic Configuration

Enable the modules Feeds Tamper and Feeds Tamper Admin UI. (Additionally, D8 onwards introduces a dependency on the "Tamper" module. This provides shared functionality but does not alter the UI.)

Next, configure the plugins you want to use to modify Feeds data before it gets saved. Each Feeds import mapping can be manipulated individually.

Once Feeds Tamper is enabled, the list of available Feeds importers (admin/structure/feeds) displays a "Tamper" configuration link for each feed.

CSV example

Visit the mapping page for your import mapper (admin/structure/feeds/edit/[your-feed-importer]/mapping and click on "Configure Feeds Tamper", or visit admin/structure/feeds/tamper/list/[your-feed-importer].

For each mapped field, click "Add plugin" to enable one of the available plugins for that mapped field. Select the plugin to add from the available plugins drop-down, select your desired configuration options for the plugin, and click "Add".

You can look here with more details.Feed Tamper Example

Comments

a.kahn’s picture

Can anyone help me? I am trying to import data from a csv file. All goes well with text fields but no data is being imported into a selectbox. For example I have a selectbox field Yes/No and in csv I have data Yes but it does not work. Same with Male/Female selectbox it does not import any data.

Any suggestion?

bdparker’s picture

Wow, this looks like a handy plugin! I have something I'm trying to do which is a little tricky and haven't figured out.

I'm trying to read from an RSS (which I'm doing now with Feeds, every half hour) and I'd like each article I import to go to a specific category. I added a custom field called "category" in my articles so I can differentiate which ones should show on which pages.

How would I go about doing this? It seems this is the right plugin to do it, but the logic is a bit tricky. Maybe I'm overlooking an obvious thing (because this seems like something everybody needs), so feel free to make fun of me if it's an obvious overlook. I'm new to Drupal.

Thanks!
Brendan

jrix’s picture

Did you make any progress on your issue? I am trying to figure this out as well.

EdPhillis’s picture

Hi, if your source field is a taxonomy field it is relatively straightforward, if you have an equivalent taxonomy vocabulary on destination then you can explode a comma seperated list. If the field is a predefined list then the key and not the values will need to match.

jrix’s picture

Thank you for your answer. That makes perfect sense for a taxonomy source field.

I have a need that maybe you could provide some pointers. Hypothetical scenario: I import a general soccer news rss feed. The news feed does not have a taxonomy field. I would like to use a keyword filter on the source description field for say "manchester united" and assign that keyword value to a target field "team". I would like to do this for every premier league team. So this would allow me to categorize the news per team.

Please disregard. Due to a lack of sleep I wasn't thinking logically about my needs. This is a simple solution using views and a 'search terms' contextual filter with fixed value. Thanks for your time.