Available Transformation Functions

Note: d:swarm uses functions of the Metamorph framework for data transformation. More detailed information about these functions you can find at https://github.com/culturegraph/metafacture-core/wiki/Metamorph-functions.

Transformation Description Parameter  Explanation Example
case Letter characters are transformed to lower or upper case. language  locale en (for English)
upper lower case is converted to upper case SLUB DRESDEN
lower upper case is converted to lower case slub desden
compose Wraps the value in a prefix and postfix. Prefixing a mapping value “swarm” with “d:” will result in “d:swarm”. prefix prefix string
postfix postfix string d:
concat Combines the values of several attributes into one element, adding option prefix and postfix strings, and passes result to output.

Value 1: “SLUB”

Value 2: “Dresden”

delimiter: “-”

prefix: “Pre”

postfix: “Post”

Result: “PreSLUB-DresdenPost”

delimiter delimiter used to separate concatenated values
prefix prefix string
postfix postfix string
constant Replaces the value with a constant string. value replace value
count Counts occurrences of an attribute and passes result to output. no parameter
equals Filtering based on equality of the inpupt attribute and the function parameter. If the same, the input attribute is passed to output. string comparison value
htmlanchor Creates an HTML anchor tag with the following pattern:

titleHomepage SLUB Dresden

prefix prefix string http://www.
postfix postfix string .de
title link text Homepage SLUB Dresden
isbn ISBN cleaning, checkdigit verication and transformation between ISBN 10 and ISBN 13. Non-digit characters can be eliminated. ISBN can be validated. isbn13 transformation to ISBN 13
isbn10 transformation to ISBN 10
clean elimination of non-digit characters
verifyCheckDigit validation
normalize-utf8 UTF-8 normalization. Transforms umlauts into canonical form. no parameter
not-equals Filtering based on inequality. If unequal, attribute value is passed to putput. string comparison value
occurence Filtering based on occurrence.

Values to be mapped (e.g. result of split): “SLUB” “Dresden” “d:swarm” “Datenmanagement”

only: “moreThen 2”

sameEntity: “True”

Result: “d:swarm” “Datenmanagement”

only Position of element moreThen 2



sameEntity True


regexp Regexp matching returning the first occurrence of a pattern. The pattern is a Java regex pattern. format order of the capturing groups ${1}
match regex pattern ^isbn\d\d\-(\d{10,13})
replace Replaces a pattern with a string. The pattern is a Java regex pattern. pattern regex pattern ^isbn\d\d\-(\d{10,13})
with replace value
split Splitting based on a regexp.

Value to be split: “SLUB-Dresden”

delimiter: “-”

Result: “SLUB” and “Dresden” are passed to output

delimiter regex pattern
substring Extracts a substring.

value: “SLUB Dresden” start=0, end=7, returns “SLUB Dr”

end index position of the last character
start index position of the first characte
trim Trims all white spaces at the beginning and at the end of the attribute value. no parameter
urlencode Transforms all characters not allowed in a URL into URL-compatible characters. no parameter

Step by Step:

← Design and Execute Transformations
← Define Filters
Graph Data Model →

Leave a Reply