Skip to end of metadata
Go to start of metadata

Introduction

You can create transformation mappings when the source and target schemas use the same or different data structure types. Depending on which data structure types are used, the transformation mapping may be described as instance or multiple mapping.

Data Structure Types

In Jitterbit Harmony, source and target schemas may use data structures that are considered to be either flat or hierarchical.

Flat Structure

A flat data structure consists of one or more single fields and records in a two-dimensional structure. Examples include CSV files, simple XML files, and single database tables. A flat data structure is also referred to as a flat file structure.

Example Flat Structure in XML Format
<customer>
	<id>10123</id>
	<name>ABC Co.</name>
	<street>1 Main St.</street>
	<city>Anytown</city>
	<state>NY</state>
	<zip>12345</zip>
</customer>

Hierarchical Structure

A hierarchical data structure has one or more parent-child or nested relationships between fields and records in a complex structure. A hierarchical data structure is sometimes referred to as a relationalmultilevelcomplex data, or tree structure.

Example Hierarchical Structure in XML Format
<customer>
	<id>10123</id>
	<name>ABC Co.</name>
		<addresses>
			<address>
				<street>1 Main St.</street>
				<city>Anytown</city>
				<state>NY</state>
				<zip>12345</zip>
			</address>
			<address>
				<street>1 Time Square</street>
				<city>New York City</city>
				<state>NY</state>
				<zip>54321</zip>
			</address>
		</addresses>
</customer>

Normalization

If you are mapping data from a flat structure to a hierarchical structure, the data may need to be normalized before being transformed.

By default, Jitterbit Harmony uses a normalization algorithm to construct the target tree. This will convert the flat structure of the source into a hierarchical source structure that can then be mapped to the hierarchical target structure.

In the target structure, the root element and all of the multiple-instance elements under the root are used to create the structure of secondary source elements. The attributes (or fields) of these secondary source elements are flat data elements that are then used in the mappings of the corresponding target element.

With the source structure properly defined, the normalization process is simplified to combining nodes with the same parents.

There are three options for normalization:

  • Complete Normalization: All the elements with the same parent and all the fields are reduced to one element. (This is the default.)
  • Partial Normalization: The same as complete normalization, except that the lowest children are not normalized.
  • No Normalization: Each flat record creates a branch of elements; no reduction of elements is performed when creating the hierarchical source structure.

It is possible for the hierarchical structure to contain a single instance node. In that case, only the first element for this root will be kept, and flat records that conflict with this root data node will be ignored.

To disable normalization, set the Jitterbit variable jitterbit.transformation.disable_normalization to true (see Transformation Jitterbit Variables).

Instance and Multiple Mapping

Transformation mapping is the process used to define the relationship of data between inputs and a resulting output of data. Depending on which data structure types are used, the transformation mapping may be described as instance mapping or multiple mapping.

Instance Mapping

Instance mapping describes when the mapping of a target instance depends on possibly more than one instance of a source. Instance mapping can be either flat-to-flat (one-to-one) or hierarchical-to-flat (many-to-one).

Multiple Mapping

Multiple mapping describes the mapping of two hierarchical data structures or the mapping from a single, flat structure that is actually hierarchical in nature, with its lower segments containing multiple sets of values such as name/value pairs. Multiple mapping can be either hierarchical-to-hierarchical (many-to-many) or flat-to-hierarchical (one-to-many).

Examples

Sample situations for both instance and multiple mapping can be found within the Design Studio documentation:

Although these examples are for Design Studio, the same concepts can be applied in Cloud Studio.

TIP: For hands-on training modules that have examples of mapping simple and complex database, text, and XML files, see Getting Training to sign up for the Jitterbit University Foundations and Core Training courses.

On This Page

Last updated:  Mar 27, 2019

  • No labels