Because any MapForce component always has an input and an output side, you can define a node function or a default value on either side, depending on your needs. To understand this better, let's recall how a mapping works: it first reads data from a source component (for example, a database or a file), then optionally processes it in some way (for example, using functions or filters), and finally writes data to some target component (for example, a database or a file). Considering this, you can apply node functions and set defaults at various stages:
|•||Immediately after data is read from the source file or database (but before it is further processed by your mapping). For example, in the mapping below the function or default is defined on the output side of the source component (notice the icon, which denotes that node functions or defaults are present):|
|•||Immediately before data is written to the target file or database (and after it finished all intermediary processing). For example, in the mapping below, the function or default is defined on the input side of the target component:|
|•||At an intermediary stage in the mapping process. For example, if the mapping contains an intermediary variable of complex type (say, an XML structure), you could trim all values before they are supplied to the XML structure, or immediately after they are returned by the XML structure).|
To summarize the above, you can define node functions either on the "input" or the "output" side of a component. Functions (or defaults) defined on the input side will process data before it enters the corresponding item on the component. Conversely, when defined on the output side, they will process data immediately after it is returned by the corresponding item. If the item where you defined the function has child items, then you can optionally propagate the default function to apply to all children as well.
© 2019 Altova GmbH