Generated Mapplets
You can generate a mapplet from a segment in a mapping or mapplet. You might want to generate a mapplet when a mapping or mapplet contains a connected transformation flow that you want to reuse.
The Developer tool validates the segment as a mapplet as part of the generation process. Review the rules and guidelines for generated mapplets to avoid validation errors.
Generated Mapplet Rules and Guidelines
Mapplet generation fails if any of the following conditions are true:
- •The selected transformations are not in sequence.
- •The segment contains both Read and Write transformations. However, a segment can include multiple Read or multiple Write transformations.
- •The segment includes nonreusable Sequence Generator transformations, Input transformations, Output transformations, or transformations containing set operations.
- •The selected segment does not include all transformations in a pipeline branch.
- •The first and last transformations in a segment contain dynamic fields.
- •The segment includes incoming run-time links to the first transformation or outgoing run-time links from the last transformation.
- •The segment consists of a single parameterized Read, Write, or Lookup transformation.
Generating a Mapplet
Generate a mapplet from a segment containing connected transformations. The segment can contain Read, Write, or midstream transformations.
1. Open the mapping or mapplet that contains the segment you want to generate into a mapplet.
2. Select the transformations to include in the mapplet.
3. Right-click one of the selected transformations, and select Extract Mapplet.
The following image shows a mapping with four transformations selected:
The generation process validates the segment and reports any validation errors.
4. Browse to the Mapplets node you want to generate the mapplet in.
The Developer tool generates the mapplet in the Mapplets node within the current project by default.
5. Click Finish.
The mapplet replaces the transformations selected in the original mapping or mapplet. The tool adds Input or Output transformations to the mapplet based on whether the segment contains Read, Write, or midstream transformations.
The following image shows the selected transformations replaced by the mapplet:
Note that you must explicitly save the modified mapping or mapplet to replace the selected transformations with the mapplet. To return the mapping or mapplet to its original state, select File > Undo three times.