Import hierarchical taxonomy with synonyms - example?

tanoshimi - September 28, 2009 - 15:47
Project:Taxonomy CSV import/export
Version:7.x-4.5
Component:Documentation
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

Firstly, congratulations for being one of the first modules to have a Drupal 7.x release! I'm already starting to plan a new site for release in about 6 months that will be based on D7, and it's really great to see modules supporting it already.

I have an issue, however, and I'm not sure if it's my failure to understand or whether I'm trying to do the impossible. I have a relatively modest (300 odd terms) hierarchical taxonomy, but each term contains not only a parent, but several synonyms and related terms, description etc.
I've read the advanced help, but I'm having problems understanding how to structure my .csv file to contain all the necessary information for each term. It seems that taxonomy_csv can either use the columns in the .csv file to define the hierarchical structure of the taxonomy, or to define synonyms, or to define related terms, weight etc. But how do I import a .csv file that contains all this information in one go? Do I have to import each piece of information on a separate pass through the import process?

I'm used to using taxonomy_xml in D6, where the xml structure makes it easy for each taxonomy item to have all of its related information contained within the element. Perhaps taxonomy_csv could come with some supplied example .csv files that demonstrate such a structure?

#1

Daniel_KM - September 28, 2009 - 18:42

Hi,

Thanks for your congratulations.

I use too a lot Taxonomy xml, but the object of this module is to use with standardized vocabularies. Taxonomy csv is more unstandardized centric.

Currently, Taxonomy csv for Drupal 7 is a beta release. All work as in Drupal 6, except import of related terms, because they have been removed and replaced by fields (http://drupal.org/node/224333#related_terms).

For your request, wait for release at the end of the week. I am going to add a full term import choice.
I think format will be something as:

vocabulary id or name, term id or empty, name, weight, description, number of synonyms, list of synonyms if any, number of related terms, list of related terms if any, number of first level parents, list of first level parents if any, number of first level children, list of first level children if any.

or something like that, with or without use of id (needed only when there are duplicates).

An important problem to resolve is how to import related terms. I prefer to keep Drupal 6 schema (specific table with related terms) because it's a standard in documentation management (structured vocabularies) and I hope somebody will write a conversion or a specific module (perhaps myself next month).

Sincerely,

Daniel Berthereau
Knowledge manager

#2

Daniel_KM - September 28, 2009 - 18:54

An addition to previous message.

Currently, there is an option to import fields of a term, but I just saw that it was not mentioned in the help.
Indeed, you can choose the "full term definition", which format is:

term name, weight, description, list of synonyms

It's only partial (related and parents terms aren't imported), but it can help.

Sincerley,

Daniel Berthereau
Knowledge manager

#3

Daniel_KM - October 5, 2009 - 10:34

Hi,

New release 4.6 allows now to import full term definitions and links. Used format is:

term name, term id, vocabulary name or id, term description, weight, number of synonyms, number of first level parents, number of first level children, number of related terms, list of synonyms, list of first level parents, list of first level children, list of related terms, list of vocabulary ids or names of related terms

Only term name should be defined. Other values can be empty. Term ids need to be set only for duplicate terms.

Notice that currently, related terms and duplicate terms are not managed. You will be able to import them with taxonomy csv next week. I will add an export button too in order to exchange easily taxonomies from Drupal 6.x to Drupal 7.x.

Sincerely,

Daniel Berthereau
Knowledge manager

 
 

Drupal is a registered trademark of Dries Buytaert.