The Concat processor is used to concatenate the records of two or more data sources. If the schemas of the inputs are different, you can choose either the union of schemas (fields which don't exist in a particular input will be null) or the intersection of schemas (only fields which exist in all schemas will be retained).
The Concat processor is selected from the menu bar of the Designer window and then placed in the designer window workspace.
Properties
The editable properties are shown in Figure 4.31, “Concat Wizard”.
The Schema combo box contains the Union and Intersection options to choose which fields are passed through to the output.
The data sources that are connected to the Concat processor are listed in the window list box. The Up and Down arrows are used to move the selected data source up or down to change the order in which the records are concatenated.
As an illustration, let's concat the Stores and Sales data sources:
Add a Composite DataSource named Concat
.
Select the Sales data source and drag and drop it onto the diagram. Repeat for the Stores data source.
Add a Concat processor to the diagram.
Connect the Stores data source and Sales data source to the Concat processor. Then connect the output of the Concat to the Result. The diagram appears as shown in Figure 4.32, “Sample Concat Flow”.
Combining all the fields of the data sources using the Union option
Open the Concat Properties and select the Union option from the Schema combo box.
The names of the data sources are listed in the window provided below the combo box.
Use the up and down arrows to order the inputs as desired - for example to ensure Stores records come before Sales.
Click Finish button in the Concat Wizard and review the output of Result. All the fields in the two data sources are combined together and displayed. Where no field data is available, the processor inserts nulls.
Combining the common field of the data sources using the Intersection option
Follow the procedure as outlined above, but now choose the Intersection option from the Properties dialog. Now when you review the Result output, you will see that only one field exists in both datasource schemas, store_id.