IBM InfoSphere Streams Version 4.1.0

Mapping Definition Document

The mapping definition document is an XML document that defines the mapping between the fields of the binary structure and the SPL tuple attributes for the StructureParse operator.

For each attribute of the mandatory data output port, the mapping definition document specifies the data source (structure field or fields) that is stored in the output port attribute.

Hints

  • The operator ignores specified attribute names that do not exist in the output port schema.
  • If an output port attribute does not have a specified mapping, the input port schema is evaluated to check whether an input port attribute of the same name and type exists, for example filename, which is then forwarded from the input to the output.
  • If there is neither a specified mapping nor a fitting input port attribute, the output attribute is initialized with its type-dependent default value, for example 0 for integer values.

Format

The first line of a mapping definition document specifies the encoding of the file, with the <mapping> XML tag as the XML root element. The schema location and other settings are required to ensure that the XSD-driven validation is executed.

You can use the following example to create a new mapping definition document:

<?xml version="1.0" encoding="UTF-8"?>
<mapping
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.ibm.com/software/data/infosphere/streams/parser StructureParseMapping.xsd"
	xmlns=http://www.ibm.com/software/data/infosphere/streams/parser
>
</mapping>
Mapping Definition
For each of the output port attributes, specify the structure and field that will feed the attribute.