4

I'm trying to use the feeds module to import structured data from a CSV file and map the values to node. I'm having an issue with a CSV field that contains multiple values.

e.g. ingredients['peanut butter', 'jelly',]

Is there a good way accomplish this with feeds, or would I be better off writing my own custom mapping engine module? I'd prefer to find a way to get the Feeds module to work to avoid having to spend excess time on something that is already done.

7

I spent a couple hours working on this, and it seems as soon as I posted the question I found an answer. The Feeds Tamper module will do the trick. It provides a lot of preprocessing functionality before the data is mapped to the entity fields. When configuring the data mapping, select the feeds tamper link. The explode plugin will explode the values into an array. Fields can have multiple values within an array map to a single field.

I hope that anyone else that has this problem finds this to save them some time.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.