Importing tags from text files

Contents

Importing tags from text files

Overview

Importing tags from a file is a semi-automatic way of tagging objects. Tagging with the help of a text file with CSV format is particularly useful in situations where the classification of objects depends on an external source of information. In such cases, you cannot use automatic tagging because the classification is independent of the attributes of the object and using manual tagging can take too long if the number of objects to tag is high.

The result of importing tags from a file is the same as if the objects were tagged manually. That is, importing tags overrides automatic tagging for the objects and the categories involved. As in manual tagging, importing tags from a text file changes the objects locally in a particular Engine and not the objects in other Engines nor the definition of the categories. Categories are centralized, but importing tags from text files is not.

Again, because tagging from text files is equivalent to manual tagging, the last tag that is applied to an object (within a category) is the tag that prevails. In your CSV file, if multiple tagging rules that belong to the same category match a particular object, the import process successively tags the object for every matching rule. Therefore, the last matching rule in the file gives the object its definitive tag. Beware that the list of rules may appear differently in the import dialog. The order of the rules in the file determines their order of application.

Format of the CSV file

The file to import must be a text file organized as a table, where each line of text represents a row of the table and a delimiter character (usually a comma) separates values into columns within a row. This is commonly known as a Comma-Separated Value file or CSV file. For the purpose of importing tags, the CSV file is organized into columns of keywords. The first element of each column is the name of the category to which the keywords in the column belong. A special column is used to match the lines of the CSV file with the objects to be tagged. Unlike other columns, this column does not hold keywords of a category, but values of an attribute that designates the object to be tagged. Only attributes that identify an object, such as the ID or the name, can be used to do the match. The allowed attributes for matching depend on the type of the object. Each line of the CSV file can therefore be seen as a row of a table, where one value identifies the object to be tagged and the rest of the values are the keywords that will be applied to the object.

The CSV file can have other columns with information that is not related to categories. These columns can be ignored during the import process.

Limit on the size of the CSV file

The maximum size of the CSV file to import tags is 140 KB, which corresponds approximately to 2'500 rows.

If the number of objects to tag is bigger, split the CSV file into two or more files and import them separately.

Import process

To import tags from a CSV file:

  1. In the Finder, click the sprocket icon located on the right hand side of the header of the main window.
  2. Select Import tags from file... from the menu.
  3. Choose the CSV file in the standard dialog to open files. A wizard to set the import options shows up.
  4. Select the text encoding (e.g. Western European or UTF), the character that delimits columns (e.g. comma or semicolon) and the character that qualifies a value as text (e.g. single or double quotes).
  5. Optional: Click the button Show file to see the file that you are importing. This is useful to validate your previous selection of text encoding and special characters.
  6. Click Next to go on with the import process.
  7. Select the type of the objects that you want to tag in the drop down list labeled Apply on.
  8. Select the attribute of the object that will be used to do the matching in the drop down list Match objects with.
  9. Choose the column of the CSV file whose values match those of the attribute of the object in the drop down using column.
  10. Check the columns of the CSV file that correspond to the categories that you want to import in the list entitled Create or update categories with columns.
  11. Optional: Click the button Select All to select all the columns at once.
  12. Optional: Click Unselect to remove the selection from all the columns.
  13. Click Import to proceed with the importation of tags. A final dialog shows you the number of objects that have been tagged and the problems found during tagging. If needed, repeat the import until you are satisfied with the result.