Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

For information about configuration options for the Batch Metadata Editing tool, see Batch Metadata Editing Configuration

...

Warning
titleDSpace Versioning Compatibility

Out of the box, the batch metadata editing features do not support the DSpace versioning system. Changes are applied straight on the item metadata and no versions of these items are being generated and stored as part of these edit operations. Be careful when using these features.

User Interface Functionality

Both the XML and JSP user interfaces allow administrator users to:

  • Export metadata into a CSV file. 
  • Import metadata in a CSV, with the goal of modifying existing items or creating new ones. 

XML User Interface

In a few easy steps you can export metadata from a collection, change the metadata and import the changed metadata back into the repository. These screenshots were taken on the demo DSpace.

1) Exporting metadata for a particular collection

Image Added

Whenever you are on a collection, you will have the possibility to export the metadata of that specific collection. You just have to click "Export Metadata" in the Context menu

2) Go to the Import Metadata page

Image Added

After you have altered the metadata, you can import it back into the repository quite simply. You just need to go to the homepage.

3) Choose file and upload CSV

Image Added

Choose a file from your computer and click on "Upload CSV"

4) Review and approval of changes

Image Added

On this page you can see which changes you have made within the CSV-file. You can now either accept these changes and click "Apply changes" or not, in that case click "Return".

 

JSP User Interface

In a few easy steps you can export metadata from a collection, change the metadata and import the changed metadata back into the repository. These screenshots were taken on the demo DSpace.

1) Exporting metadata for a particular collection

Image Added

Whenever you are on a collection, you will have the possibility to export the metadata of that specific collection. You just have to click "Export Metadata" in the Admin tools.

2) Go to the Administrator Tools

Image Added

After you have altered the metadata, you can import it back into the repository quite simply. On (almost) every page of the repository you can access the administrator tools.

3) Go to the Import Metadata page

Image Added

Once you are in the administrator tools, just click on "content" and then you only have to select "import metadata" from the list that drops down.

4) Choose file and upload CSV

Image Added

Choose a file from your computer and click on "Upload CSV"

5) Review and approval of changes

Image Added

On this page you can see which changes you have made within the CSV-file. You can now either accept these changes and click "Apply changes" or not, in that case click "Return".

Command Line Functionality

Export parameters

The following table summarizes the basics.

Command used:

[dspace]/bin/dspace metadata-export

Java class:

org.dspace.app.bulkedit.MetadataExport

Arguments short and (long) forms):

Description

-f or --file

Required. The filename of the resulting CSV.

-i or --id

The Item, Collection, or Community handle or Database ID to export. If not specified, all items will be exported.

-a or --all

Include all the metadata fields that are not normally changed (e.g. provenance) or those fields you configured in the [dspace]/config/modules/bulkedit.cfg to be ignored on export.

-h or --help

Display the help page.

...

Example commands

To run the batch editing exporter, at the command line:

...

In the above example we have requested that a collection, assigned handle '1989.1/24' export the entire collection to the file 'col_14.csv' found in the '/batch_export' directory.

Import

...

parameters

The following table summarizes the basics.

...

Silent Mode should be used carefully. It is possible (and probable) that you can overlay the wrong data and cause irreparable damage to the database.

...

Example commands

To run the batch importer, at the command line:

...

Code Block
[dspace]/bin/dspace/ metadata-import -f /dImport/new_file.csv -e joe@user.com -w -n -t

...

New metadata-only items can be added to DSpace using the batch metadata importer. To do this, enter a plus sign '+' in the first 'id' column. The importer will then treat this as a new item. If you are using the command line importer, you will need to use the -e flag to specify the user email address or id of the user that is registered as submitting the items.

If you are using the web user interface for adding metadata-only items, any activated collection workflow steps are effectively bypassed. As a result, these added items are immediately archived into the repository.

Deleting Metadata

It is possible to perform metadata deletes across the board of certain metadata fields from an exported file. For example, let's say you have used keywords (dc.subject) that need to be removed en masse. You would leave the column (dc.subject) intact, but remove the data in the corresponding rows.

...

If an action makes no change (for example, asking to withdraw an item that is already withdrawn) then, just like metadata that has not changed, this will be ignored.

Migrating Data or Exchanging data

...

It is possible that you have data in one Dublin Core (DC) element and you wish to really have it in another. An example would be that your staff have input Library of Congress Subject Headings in the Subject field (dc.subject) instead of the LCSH field (dc.subject.lcsh). Follow these steps and your data is migrated upon import:

  1. Insert a new column. The first row should be the new metadata element. (We will refer to it as the TARGET)
  2. Select the column/rows of the data you wish to change. (We will refer to it as the SOURCE)
  3. Cut and paste this data into the new column (TARGET) you created in Step 1.
  4. Leave the column (SOURCE) you just cut and pasted from empty. Do not delete it.

Common Issues

Metadata values in CSV export seem to have duplicate columns