Problem/Motivation
I import products and product display nodes from two XMLs. I have several product types and each has a corresponding node type. First I import nodes from nodes.xml. This contains the node type information. Now my products.xml only contains a uuid reference to the node, and does not contain the product type information. So during product import I would like to fetch the node and convert its type to the appropriate product type.
Proposed resolution
The EFQ finder tamper plugin is almost good for this. Currently it can only return the entity id. We just need to add a 'Field to return' and a 'Column to return' setting.
To prevent feeds already using EFQ finder from breaking, we default to return the entity id.
User interface changes
The EFQ finder plugin will have some more options.
Comment | File | Size | Author |
---|---|---|---|
#5 | interdiff-1-5.txt | 851 bytes | czigor |
#5 | feeds_tamper-EFQ_finder-2540324-5.patch | 4.75 KB | czigor |
|
Comments
Comment #1
czigor CreditAttribution: czigor at Liip commentedComment #2
firfin CreditAttribution: firfin as a volunteer and commentedMaybe I am mistaken, but this functionality is already in Feeds Tamper (at least in the current version) ?
At least using the 1.1 version I am able to select Entity Type -> Bundle -> Field -> Column and choose from available columns...
Marking this as fixed, please reopen and elaborate if this is incorrect.
Comment #3
czigor CreditAttribution: czigor at Liip commentedYes, you are able to do that but you can only select which entity id to return, not which field of that entity to return.
For example: right now you can say "I want the nid of the node that has '2' in the target_id column of its field_news". But you cannot say "I want the value column of the field_text of the node that has '2' in the target_id column of its field_news".
Comment #4
firfin CreditAttribution: firfin as a volunteer and commentedAah ok, I get you now. Sorry for the confusion and mistakenly closing the issue.
But I think this is out of scope for this particular tamper. EFQ finder uses (as the name implies) EntitityFieldQuery and thus only returns entity IDs.
I can see some use cases for this functionality, but I think you would have to write a new plugin for this. Just like 'find and replace' is extended by 'find and replace REGEX'. I am pretty sure the maintainers would accept this a a new well written plugin.
Maybe the feeds tamper php module is also an option?
Or it may be an option to change your input / data structure?
Comment #5
czigor CreditAttribution: czigor at Liip commentedAdding a checkbox to bypass entity access when executing the EFQ.