The ETL Metadata Injection step inserts data from multiple sources into another transformation at runtime. This insertion reduces the need to call repetitive tasks each time a different input source is used.
In PDI, you can create a transformation to use as a template for your repetitive tasks. This transformation is known as the template transformation. The template transformation is a child transformation that is reused by the ETL Metadata Injection step with the metadata created from various input sources. You will create another transformation to prepare what common values you want to use as metadata and inject these selected values through the ETL Metadata Injection step into your template transformation, as shown in the following diagram:
For example, you might have a simple transformation to load transaction data values from a supplier, filter specific values, and output them to a file. If you have more than one supplier, you would need to run this simple transformation for each supplier. Yet, with metadata injection, you can expand this simple repetitive transformation by inserting metadata from another transformation that contains the ETL Metadata Injection step. The ETL Metadata Injection step coordinates the data values from the various inputs through the metadata you define. This process reduces the need for you to adjust and run the repetitive transformation for each specific input. See the Example section for more details on the example.
The following basic procedure is recommended for using this step to inject metadata:
- Optimize your data for injection, such as preparing folder structures and inputs.
- Develop transformations for the following task:
- The repetitive process (the template transformation)
- Metadata injection through the ETL Metadata Injection step
- Handling of multiple inputs (as needed)
The metadata is injected into the template transformation through any step that supports metadata injection. See Steps supporting metadata injection for which steps support metadata injection.