For a site I'm building, I need to do some exporting/importing. Nodes are added to the site normally through the UI and some of the fields are filled in at that time. Once all the nodes for that month are added, the data is exported to a file, likely XML or CSV. So I'll end up with something like this:
NID,TITLE,FILENAME,SCORE1,SCORE2,SCORE3,PLACE
42,"a pretty picture","a/nature/xyz.jpg",0,0,0,""
An external judging program will fill in the scoring information so now the file looks like this:
NID,TITLE,FILENAME,SCORE1,SCORE2,SCORE3,PLACE
42,"a pretty picture","a/nature/xyz.jpg",25,30,28,"HM"
I then need to go back to the existing nodes and take the new data from the file and fill in the appropriate fields. This will be done once each month, after the judging, and only be run once per node.
When I asked on IRC, someone said this could be done with Feeds. I've been looking at the documentation and all I'm finding is making new nodes from import files. I haven't found anything that will look at the NID in the file and go find that node and import the data from that line.
Before I spend more time on this, could you tell me if this is something Feeds can do? If so, I'd appreciate any general pointers. I'm willing to RTFM and do digging on my own but I'd like to avoid chasing wild geese if I can. :)
Thanks,
Michelle
Comments
Comment #1
michelleNevermind. I've found that doing this in custom code isn't that hard and I don't have any other use for Feeds on this site so that saves me a module. Thanks anyway. :)
Michelle
Comment #2
daniboy commentedI'd like to get an answer on that, I can manipulate the data in advance to contain the NID of the node I want to import into, but I'm in need of the Feeds module due to the complexity and volume of the data. Is there a way to get Feeds to import into an existing node?
(I can get my hands dirty and write some code, but some pointers would be helpful)
Comment #3
johnvFeeds uses GUID to identify a unique node. You can use that. Problem is that GUID is only filled when creating a node via Feeds. If you need unique ID's for manually added nodes, you need something like #661606: Support unique targets in mappers
Comment #4
johnvIMO the other issue contains lots of info.