Working with Drupal, often times we are required to import a large set of data in site. We have various ways to import data. Feeds module is simple and easy to use. Feeds out of the box supports many features which can cover a variety of scenarios. The module is well documented and you can access documentation here.
In this part, we are going to explain basics for how to import data using feeds.
To use feeds module, we need ctools and job scheduler module enabled.
The first step in the process is to turn required modules enabled. Enable Feeds, Feeds Admin UI. If you want an example of node importer and user importer then turn Feeds Import enabled.
Next step is to add an importer that lets you import data. To do this, go to “admin/structure/feeds” and click on “Add importer”. If you have turned Feeds Import on, you will see example importers here.
Next step is to configure importer. There are various parts in this.
- Basic Settings
Each is explained in detail below:
These are basic settings for importers:
Name and description are what you specified while creating the importer. “Attach to content type” is used to determine whether we want to attach importer to any content type form or use standalone form.
We use the standalone form if we want to import by using a form that comes with the custom drupal module development at /import path. If we go with content type then import is executed by creating a node of selected content type.
Periodic updates are used to run import periodically. Proper cron configuration is required to run periodic updates. Keep periodic updates off if you are importing data one time only.
Import on submission will start importing process as soon as the form is submitted. There is an option to run the process in the background. This is particularly helpful when importing large data.
The Fetcher is where your feed is fetched from. We have two options here: File upload and HTTP fetcher.
We get a template sample on this page which helps in CSV file construction. Upload the CSV file in required format and import content. Upon completion, a status message is displayed.
In case, we want to delete all nodes that we imported we can do so by going to “Delete Items” tab on import page.
Feeds module out of the box provides many features and is very powerful. There are various other modules available that enhances feeds module functionality.
Hope this helps you, feel free to share your valuable feedback and inputs.
For read more, Click Here