- Training Topics
- Campus Connections
- OSU IT Policies
Importing vocabularies can be a significant time saver and can also ensure consistency between different sites. To import a vocabulary you must first have some source information for the vocabulary. Taxonomy CSV allows a user to import vocabularies from a file or from a paste entry.
To import a vocabulary from a file, you must first have a file. For instructions on how to complete a taxonomy export, please see the Export Vocabularies article. Once you have a file, to import it do the following:
Go to Admin menu > Content management > Taxonomy > CSV import.
Initially you will see a large warning message at the top of the Taxonomy Import page. This warning message seems is aimed towards imports of very large, complex vocabularies - between 1000 and 10,000 terms. CWS has tested this feature against moderately sized vocabularies. If your vocabulary is extremely large, please contact us at http://oregonstate.edu/cws/contact so we can help you out.
In the 1. What do you want to import? fieldset, select the items you wish to import from the drop down menu. If you would like to keep the order of your terms, check the Keep order of terms checkbox, otherwise the terms will be listed alpha-numerically. Please note that complex taxonomies that involve many different levels, definitions, and relationships, may not order perfectly upon import and may need some editing after the import is performed.
In the 2. Where are items to import? fieldest, select where the import information is coming from. In the example below, we are importing a file that was created by an export from another site. If you choose the In a local file option the screen will change slightly to provide an uploader tool, as shown below. Click the Browse button to connect your Drupal site to your computer and upload your import file.
In the 3. How is your source formatted? fieldset, you will be provided several different options regarding the format of the file you are importing. In this case, we have a comma separated list of items for import - which is the most common. All this means is that commas are used between each of the terms to designate them as separate items. If you are not certain what the file contains, open it and look to see what character is separating your terms.
A CSV value enclosure is punctuation, typically quotation marks, that is commonly used to surround and preserve non-English characters that may be used in a term or phrase. If you are uncertain whether your import file contains enclosures, open the file and look inside. If you see quotation marks surrounding your terms, then choose the Quotation marks option. If you see some other type of punctuation surrounding your terms, choose Custom enclosure. In our sample, there is no enclosure used in the file.
In the 4. Which vocabulary do you want to import into? fieldset, Taxonomy CSV will let you import terms into existing vocabularies if desired. If this is the case, selet the vocabulary you wish to import into. In our case, we will create a brand new vocabulary by selecting the Autocreate a new vocab option.
The 5. When a term exists, what to do with it? fieldset determines how to handle duplicate terms. In the sample below, the option to update the existing term is chosen.
The final fieldset, 6. Information on process, determines how to handle the display of statistics regarding the import, logging activity, and how to display report elements. Typically the default settings will suffice here for normal use.
Once all desired settings have been made, click the Import button at the bottom of the screen.
After the import has processed, a large yellow report will appear at the top of the screen. Since we are automatically creating a new vocabulary from this import, a generic vocabulary name will be assigned by the system. A link is provided, as shown below, whereby you can go in and edit the vocabulary. Just click the link.
You will be redirected into the vocabulary's edit screen.
Change the vocabulary name and description, if desired. You can also associate this vocabulay with any existing content types, if needed, as well. When you're finished, just click the Save button at the bottom of the screen.
Upon saving you will be redirected to Taxonomy's main overview screen. A yellow message will appear at the top informing you that the filter cache has been cleared and there may be a temporary performance degredation while it's being rebuilt. This is normal.