Create simple mappings


To create ODI mappings, ODI Generator uses a statement that resembles an INSERT SELECT SQL statement. In the context of this tutorial, a simple mapping denotes a mapping that has only one datastore as the source and only one datastore as the target. Optionally the mapping can contain additional components as filter components, distinct component, group by component, etc. 

The code below creates a simple mapping without any additional component besides source and target datastores. You can notice the syntax used to specify LKM and IKM knowledge modules and other parameters for the only physical design created for this mapping. It is possible to create mappings with multiple physical designs.

The following code snippet creates a mapping containing a filter. The code includes also the TRUNCATE statement which can be used to "recreate" the content of a mapping without having to recreate the mapping itself. This way we maintain the original mapping object identifier.