Join
The Join processor is used aggregate two datasources using one of several join types (e.g., inner, outer, etc.). The join operator links the records from two datasources by matching values in specified columns.
The Data Designer supports all following types of join:
- Inner join
- Outer Join
- Cross join
Add Join
The simple example below joins two DataSource processor together.
To do so, select the button on the menu bar and click on the location in the designer diagram. Use the Flow connector to connect the two DataSource processors to the
primary
and secondary
inputs of the Join processor. Use the Flow connector again to connect the data
output of Join processor to the desired processor. In this example, the output of the Join processor is connected to the Result processor.
Edit Join
After the Join processor is added onto the designer diagram and connected to the desired processors, you may need to edit the properties of the Join processor.
There are two ways to access the properties of the Join processor.
- Double-click on the Join processor
- Right-click on the Join processor and select the “Properties” option from the pop-up menu
Either one method will launch the Join Wizard.
There are three tabs in this wizard page, namely “Options”, “Primary” and “Secondary”.
The “Options” tab allows you to define the type of join.
Function | Description |
---|---|
Cross Join | If selected, a cross join is performed on the two datasources. It produces every combination of input records. For example, if the primary datasource provides ten records and the secondary datasources provides five records, then fifty records (10x5) will be available as the output. For large datasets a huge number of records could be generated. |
If no matching secondary | Selects whether outer or inner join is performed on the two datasources. Available options: - “Keep primary fields” (default, outer join) - “Discard record” (inner join) This field will be disabled if “Cross Join” field is selected. |
If multiple matching secondaries | Defines how many multiple matches are handled. Available options: - “Keep first secondary only” - “Repeat primary for each secondary” (default) - Discard record This field will be disabled if “Cross Join” field is selected. |
Prefix for primary fields | Adds a prefix to primary fields. It may be advisable to add a prefix just in case there are conflict between the primary and secondary names. |
Prefix for secondary fields | Adds a prefix to secondary fields. It may be advisable to add a prefix just in case there are conflict between the primary and secondary names. |
For the “If multiple matching secondaries” field, below are the option scenarios if a primary record matches three secondary records:
- “Keep first secondary only”
- The system just pass through the primary with just the first secondary
- “Repeat primary for each secondary”
- The system passed through three records, matching the single primary with each secondaries in turn
- “Discard record”
- The system will not pass through the record at all
The “Primary” and “Secondary” tabs display the fields of the datasource connected to the pirmary
and secondary
inputs of the Join processor respectively.
The fields of the secondary datasource that are not required can be discarded. Choose the appropriate key(s) in the “Secondary” tab by associating them with the corresponding primary keys. Records will be selected from the secondary datasource where the identified keys match those of the primary.
Delete Join
To remove the Join processor, simply select the Join processor and click on the “delete” key on your keyboard. Alternatively, right-click on the Join processor to display the pop-up menu and select “Delete Graphic” option.
Pop-up Menu
To access the pop-up menu of the Join processor, right-click on the processor.
There are three functions in the pop-up menu.
Function | Description |
---|---|
Properties | Launches the Join Wizard that allows you to edit the properties of the Join processor. |
View Output | Switches to the “Data” tab, which displays the records of the datasource after the join operation. |
Delete Graphic | Deletes the Join processor. |