Developer Mapping Guide > Mapplets > Generated Mapplets
  

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:

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:
    Four transformations within a mapping have been selectd for inclusion in the mapplet.
    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:
The new mapplet replaces the selected transformations in the Developer tool canvas.
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.