I have 4 columns in a CSV which need to all combine as multiple values into a term reference field.
I would very much like to avoid having to modify the CSV myself before upload, as this will be a regular activity by the client, and so the less I need to ask of them the better.
I currently have it set up as per the attached screenshot, which does seem to happily create the terms present in each column, but the final result is that only the last mapping for that field is saved, so they seem to be overwriting each other rather than grouping.
From other issues I gather this is a hot topic so apologies if this is a duplicate issue however I wasn't able to find the appropriate issue to subscribe to, even though I'm certain I've seen it before!
Thanks!
Comment | File | Size | Author |
---|---|---|---|
Screen shot 2011-09-07 at 4.42.28 PM.png | 54.85 KB | carn1x |
Comments
Comment #1
Pocketpain CreditAttribution: Pocketpain commentedsub
Comment #2
Agileware CreditAttribution: Agileware commentedConsider using http://drupal.org/project/feeds_tamper
Comment #3
carn1x CreditAttribution: carn1x commentedUnfortunately Feeds Tamper doesn't seem to provide any method of merging multiple columns, only splitting a single column. But I hope/suspect Feeds Tamper will grow to incorporate such behaviour :)
Comment #4
Agileware CreditAttribution: Agileware commentedFeeds Tamper has plugins, Impode and Explode which does exactly that.
We are using it to import a CSV file containing multi-value entries separated by pipe eg. "ABC | DEF | GHI", "JKL|MNO|PQR" etc.
Comment #5
Agileware CreditAttribution: Agileware commented@carn1x sorry, I stand corrected. I had missed the key part which was "multiple columns". So Feeds Tamper won't do this for you as it only acts on individual columns.
Having said that, if you configure Feeds to import each column into the same node field, does this not work already? I am pretty confident that Feeds will just append the values, I faintly recall having done this to import a XML feed into a multivalue field.
Comment #6
carn1x CreditAttribution: carn1x commented@Agileware Tried this before, mapping multiple columns to the same field. It ended up simply setting the field to the last column that was mapped. Maybe it depends on the widget used, as I only tried this will Term Reference Autocomplete?
Comment #7
johnvDoes the patch over here (comment #1) help you? #1231522: Having multiple values in a CSV imported into one target value.
Comment #8
MegaChriz CreditAttribution: MegaChriz at WebCoo commentedYou can do this easily with using the Feeds Tamper plugins "Rewrite" and "Explode" in combination.
|
). For example, if you have four columns called "term_1", "term_2", "term_3" and "term_4", configure the rewrite like this:|
).