Hi,

I'm wondering about an option to update existing fields, not just appended ones. I'm not sure there is a need to check current data in the CVS versus the current information in the DB. I think just repopulating the fields with the current CVS information should be enough.

Is there any chance of a solution for this?

Thanks in advance.

Comments

dealancer’s picture

Hi,

currently we are working on feature you have described. It is already done but needed to be tested and uploaded to drupal.org.

It works following way:
1. Deleted previously imported nodes.
2. Imports new nodes from the beginning of file.

I'm not sure about nid is not reset. So it may differs from your request. But it is time to speak about how to hold nid.

lupus78’s picture

I helped dealancer to create the functionality he described. Hopefully we will publish it soon.

I needed a functionality to update the product nodes on a website once a day from the warehouse DB. So I have a complete backup in CSV every day on my FTP, and need to be imported into Drupal via node_import.

First I was also thinking about how can I update a node, and found this solution: #422282: Update existing nodes on import
The solution is to create a small custom module where you alter the node form and edit the [nid] value. Also you need to code the logic how to find the existing [nid]. This solution works perfectly to update nodes with node_import!

But finally I came to the conclusion, that I don't need to update the node, because I have a CSV file with all the products every day. So I can delete and recreate all nodes every day.

So the update functionality is not supported now, but I think it's possible to combine it with the above solution.

I will try to merge my code with the current version, and we try release it soon.

Lupus

dealancer’s picture

Status: Active » Fixed

This is fixed in ni_cron 6.x-1.4-beta1 release.

dealancer’s picture

Status: Fixed » Closed (fixed)

I'm closing it.