TM transforms are displayed in a simple, humanly readable, high-level transformation syntax, “Simple Mapping Language” SML. SML is very easy to learn, and provides the most powerful and flexible solution to Extract, Transform and Load (ETL) tasks.
SML has been developed to simplify the process of describing the transformation of data from a variety of source to target data stores. It hides many of the differences between different types of data stores, and makes it possible to concentrate on the data without worrying about the details of how the data is stored.
There are three concepts behind SML:
Straightforward statements written in SML perform both simple transformations (such as copying simple attributes to simple attributes) and more complex ones (for example, following relationships from one element to another).
The functions built into SML are powerful enough to describe quite complex transformations between source and target models.
TM also gives you the ability to create and use User Defined Functions (UDF). Java functions can be used in order to cope with scenarios where pure SML is insufficient; for example, transforming a set of spatial co-ordinates from Cartesian to polar values requires trigonometric functions, which are not available in SML.
Transform statements are semi-declarative and include
coding
patterns to control flow and perform iterations such as BEGIN END,
CASE, FOR EACH, IF THEN ELSE and REPEAT.
Over 330 built-in functions are provided for the following categories: Aggregate, Cascade, Data Quality, Database Specific, Error Handling, Error Recording, Internationalisation, Logging and Testing, Maths, Matrix, Multiple Projects, Other, Pseudo-attributes, String, Transaction Handling, XML.
Local variables, accessible in the transform, and global variables, accessible by all sub-transforms of the transform project, may be used.
TM provides automatic type conversion in many cases. However, a type map can be defined, as a special type of UDF, to convert automatically between User Defined Types such as 'measurements in feet', 'title type' and pre-defined XSD types.
An Example of a Transform Written in SML
