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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

czigor’s picture

Issue summary: View changes
Status: Active » Needs review
FileSize
3.87 KB
firfin’s picture

Status: Needs review » Closed (fixed)

Maybe 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.

czigor’s picture

Status: Closed (fixed) » Needs review

Yes, 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".

firfin’s picture

Aah 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?

czigor’s picture

FileSize
4.75 KB
851 bytes

Adding a checkbox to bypass entity access when executing the EFQ.