Union transformation

The Union transformation is used to merge data from multiple sources. Union is a multiple input, single output transformation. It is the opposite of router transformations, which we discussed earlier. The basic criterion to use a Union transformation is that you should have data with the matching data type. If you do not have data with the matching data type coming from multiple sources, the Union transformation will not work. The Union transformation merges the data coming from multiple sources and does not remove duplicates, so it acts as the union of all SQL statements.

As mentioned, union requires data to come from multiple sources. Union reads the data concurrently from multiple sources and processes the data. You can use heterogeneous sources to merge the data using a Union transformation.

A mapping indicating the Union transformation is shown in the following screenshot:

Union transformation

Working on Union transformation is a little different from other transformations. To create a Union transformation, perform the following steps:

  1. Once you create a Union transformation, drag all the required ports from one source to the Union transformation. As soon you drag the port, the union creates an input group and also creates another output group with the same ports as the input.
  2. Add the output groups from the Group tab in the Union transformation. Add as many groups as the input sources you have, as shown in the following screenshot:
    Union transformation
  3. Once you add the groups, the Union transformation creates the groups with the same ports, as shown in the preceding mapping.
  4. Link the ports from the other source to the input ports of the other group in the Union transformation.

With this, we have created a mapping using a Union transformation.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset