Transforms a metadata file into a replayable spreadsheet based on rules defined in a mapping file.
The metadata file should be an Excel spreadsheet or CSV file, with the headers in the first row. The mapping file should be an Excel spreadsheet or CSV file.
The mapping syntax allows four different kinds of transformation.
{Dimensions} mm
) or to combine two or more input fields into a single output field ({Dimensions} {Units}
).{Dimensions} mm
should not be applied if the Dimensions
input field does not have a value. This prevents the output mm
from displaying when the Dimensions
numeric value is absent.The mapping file contains four columns (three if no conditionals are used).
The first column gives the target field -- the field that data will be mapped to in the output (i.e., the column headers in the replayable spreadsheet). Values of this column must be unique.
The second column indicates the source of the data. Its exact syntax depends on the transformation type, as described below. If this column is left blank, the field named in the first column will be created in the output, but will not contain any data.
The third column names the transformation type. If the second column is blank, this column should be blank as well. Otherwise, enter the value as given below.
map
string
complex
The fourth column is optional and states a condition that must be met for the rule to generate output. The value of this column is the header of the input column that must have a value for the rule to be applied. If the given input field does not have a value, a blank string is output instead.
druid
and sourceId
will appear in the generated replayable spreadsheet, even though there is nothing to match them in the source data.Title
and Author
will map to ti1:title
and na1:namePart
respectively.author
will map to ro1:roleText
only if Author
has a value.Dimensions in mm
will map to ph:extent
with mm
appended only if a value is present.