Metadata Injection

Fundamentals of Metadata Injection ..

Metadata injection inserts data from various sources into a transformation at runtime. This insertion reduces repetitive ETL tasks.

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 step coordinates the data values from the various inputs through the metadata you define.

The repetitive transformation is known as the template transformation. The template transformation is called by the ETL Metadata Injection step.

In this Lab, you will:

• Create a number of transformations that prepare the metadata and inject these specific values through the ETL Metadata Injection step.

Metadata is traditionally defined and configured at design time, in a process known as hard coding, because it does not change at run time.

In this scenario, onboarding the files would require a CSV file input step for each of the different delimiters.

  1. Double-click on the CSV File Input steps to display the metadata properties:

~/How-To--Metadata-Injection/Overview of Metadata Injection/file_hard_coded.ktr

💡Each datasource requires its own Transformation.

The challenge becomes to find a way to dynamically inject the required metadata properties at run time via a template.


Metadata Properties

Steps in a Transformation are configured with associated metadata property values, e.g. step name, filename, delimiter, and so on ..

These metadata properties are saved as .ktr=xml

A neat way to introduce metadata injection is to change a metadata property in the xml of a step.

  1. Copy / Paste the step into Visual Studio Code:

  1. Change a metadata property: <name>Whatever</name>

  2. Copy / Paste xml into a new transformation:

Last updated